|
| 1 | +2018-05-05 Filip Pizlo <fpizlo@apple.com> |
| 2 | + |
| 3 | + DFG AI should have O(1) clobbering |
| 4 | + https://bugs.webkit.org/show_bug.cgi?id=185287 |
| 5 | + |
| 6 | + Reviewed by Saam Barati. |
| 7 | + |
| 8 | + This fixes an old scalability probem in AI. Previously, if we did clobberWorld(), then we |
| 9 | + would traverse all of the state available to the AI at that time and clobber it. |
| 10 | + |
| 11 | + This changes clobberWorld() to be O(1). It just does some math to a clobber epoch. |
| 12 | + |
| 13 | + This is a ~1% speed-up for compile times. |
| 14 | + |
| 15 | + * JavaScriptCore.xcodeproj/project.pbxproj: |
| 16 | + * Sources.txt: |
| 17 | + * dfg/DFGAbstractInterpreter.h: |
| 18 | + (JSC::DFG::AbstractInterpreter::forNode): |
| 19 | + (JSC::DFG::AbstractInterpreter::setForNode): |
| 20 | + (JSC::DFG::AbstractInterpreter::clearForNode): |
| 21 | + (JSC::DFG::AbstractInterpreter::variables): Deleted. |
| 22 | + * dfg/DFGAbstractInterpreterInlines.h: |
| 23 | + (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects): |
| 24 | + (JSC::DFG::AbstractInterpreter<AbstractStateType>::clobberWorld): |
| 25 | + (JSC::DFG::AbstractInterpreter<AbstractStateType>::forAllValues): |
| 26 | + (JSC::DFG::AbstractInterpreter<AbstractStateType>::clobberStructures): |
| 27 | + (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeDoubleUnaryOpEffects): |
| 28 | + * dfg/DFGAbstractValue.cpp: |
| 29 | + (JSC::DFG::AbstractValue::fastForwardToSlow): |
| 30 | + * dfg/DFGAbstractValue.h: |
| 31 | + (JSC::DFG::AbstractValue::fastForwardTo): |
| 32 | + (JSC::DFG::AbstractValue::clobberStructuresFor): Deleted. |
| 33 | + (JSC::DFG::AbstractValue::observeInvalidationPoint): Deleted. |
| 34 | + (JSC::DFG::AbstractValue::observeInvalidationPointFor): Deleted. |
| 35 | + * dfg/DFGAbstractValueClobberEpoch.cpp: Added. |
| 36 | + (JSC::DFG::AbstractValueClobberEpoch::dump const): |
| 37 | + * dfg/DFGAbstractValueClobberEpoch.h: Added. |
| 38 | + (JSC::DFG::AbstractValueClobberEpoch::AbstractValueClobberEpoch): |
| 39 | + (JSC::DFG::AbstractValueClobberEpoch::first): |
| 40 | + (JSC::DFG::AbstractValueClobberEpoch::clobber): |
| 41 | + (JSC::DFG::AbstractValueClobberEpoch::observeInvalidationPoint): |
| 42 | + (JSC::DFG::AbstractValueClobberEpoch::operator== const): |
| 43 | + (JSC::DFG::AbstractValueClobberEpoch::operator!= const): |
| 44 | + (JSC::DFG::AbstractValueClobberEpoch::structureClobberState const): |
| 45 | + (JSC::DFG::AbstractValueClobberEpoch::clobberEpoch const): |
| 46 | + * dfg/DFGAtTailAbstractState.h: |
| 47 | + (JSC::DFG::AtTailAbstractState::setForNode): |
| 48 | + (JSC::DFG::AtTailAbstractState::clearForNode): |
| 49 | + (JSC::DFG::AtTailAbstractState::numberOfArguments const): |
| 50 | + (JSC::DFG::AtTailAbstractState::numberOfLocals const): |
| 51 | + (JSC::DFG::AtTailAbstractState::operand): |
| 52 | + (JSC::DFG::AtTailAbstractState::local): |
| 53 | + (JSC::DFG::AtTailAbstractState::argument): |
| 54 | + (JSC::DFG::AtTailAbstractState::clobberStructures): |
| 55 | + (JSC::DFG::AtTailAbstractState::observeInvalidationPoint): |
| 56 | + (JSC::DFG::AtTailAbstractState::variables): Deleted. |
| 57 | + * dfg/DFGCFAPhase.cpp: |
| 58 | + (JSC::DFG::CFAPhase::performBlockCFA): |
| 59 | + * dfg/DFGConstantFoldingPhase.cpp: |
| 60 | + (JSC::DFG::ConstantFoldingPhase::foldConstants): |
| 61 | + * dfg/DFGFlowMap.h: |
| 62 | + (JSC::DFG::FlowMap::at): |
| 63 | + (JSC::DFG::FlowMap::atShadow): |
| 64 | + (JSC::DFG::FlowMap::at const): |
| 65 | + (JSC::DFG::FlowMap::atShadow const): |
| 66 | + * dfg/DFGInPlaceAbstractState.cpp: |
| 67 | + (JSC::DFG::InPlaceAbstractState::beginBasicBlock): |
| 68 | + (JSC::DFG::InPlaceAbstractState::endBasicBlock): |
| 69 | + * dfg/DFGInPlaceAbstractState.h: |
| 70 | + (JSC::DFG::InPlaceAbstractState::forNode): |
| 71 | + (JSC::DFG::InPlaceAbstractState::setForNode): |
| 72 | + (JSC::DFG::InPlaceAbstractState::clearForNode): |
| 73 | + (JSC::DFG::InPlaceAbstractState::variablesForDebugging): |
| 74 | + (JSC::DFG::InPlaceAbstractState::numberOfArguments const): |
| 75 | + (JSC::DFG::InPlaceAbstractState::numberOfLocals const): |
| 76 | + (JSC::DFG::InPlaceAbstractState::operand): |
| 77 | + (JSC::DFG::InPlaceAbstractState::local): |
| 78 | + (JSC::DFG::InPlaceAbstractState::argument): |
| 79 | + (JSC::DFG::InPlaceAbstractState::variableAt): |
| 80 | + (JSC::DFG::InPlaceAbstractState::clobberStructures): |
| 81 | + (JSC::DFG::InPlaceAbstractState::observeInvalidationPoint): |
| 82 | + (JSC::DFG::InPlaceAbstractState::fastForward): |
| 83 | + (JSC::DFG::InPlaceAbstractState::variables): Deleted. |
| 84 | + * dfg/DFGSpeculativeJIT64.cpp: |
| 85 | + (JSC::DFG::SpeculativeJIT::compile): |
| 86 | + * ftl/FTLLowerDFGToB3.cpp: |
| 87 | + (JSC::FTL::DFG::LowerDFGToB3::compileGetStack): |
| 88 | + |
1 | 89 | 2018-05-06 Filip Pizlo <fpizlo@apple.com> |
2 | 90 |
|
3 | 91 | InPlaceAbstractState::beginBasicBlock shouldn't have to clear any abstract values |
|
0 commit comments