Changeset 145299 in webkit for trunk/Source/JavaScriptCore/ChangeLog
- Timestamp:
- Mar 8, 2013, 6:51:06 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r145247 r145299 1 2013-03-08 Filip Pizlo <[email protected]> 2 3 DFG overflow check elimination is too smart for its own good 4 https://bugs.webkit.org/show_bug.cgi?id=111832 5 6 Reviewed by Oliver Hunt and Gavin Barraclough. 7 8 This improves overflow check elimination in three ways: 9 10 1) It reduces the amount of time the compiler will spend doing it. 11 12 2) It fixes bugs where overflow check elimination was overzealous. Precisely, for a binary operation 13 over @a and @b where both @a and @b will type check that their inputs (@a->children, @b->children) 14 are int32's and then perform a possibly-overflowing operation, we must be careful not to assume 15 that @a's non-int32 parts don't matter if at the point that @a runs we have as yet not proved that 16 @b->children are int32's and that hence @b might produce a large enough result that doubles would 17 start chopping low bits. The specific implication of this is that for a binary operation to not 18 propagate that it cares about non-int32 parts (NodeUsedAsNumber), we must prove that at least one 19 of the inputs is guaranteed to produce a result within 2^32 and that there won't be a tower of such 20 operations large enough to ultimately produce a double greater than 2^52 (roughly). We achieve the 21 latter by disabling this optimization for very large basic blocks. It's noteworthy that blocks that 22 large won't even make it into the DFG currently. 23 24 3) It makes the overflow check elimination more precise for cases where the inputs to an Add or Sub 25 are the outputs of a bit-op. For example in (@a + (@b | 0)) | 0, we don't need to propagate 26 NodeUsedAsNumber to either @a or @b. 27 28 This is neutral on V8v7 and a slight speed-up on compile time benchmarks. 29 30 * CMakeLists.txt: 31 * GNUmakefile.list.am: 32 * JavaScriptCore.xcodeproj/project.pbxproj: 33 * Target.pri: 34 * dfg/DFGArrayMode.cpp: 35 (JSC::DFG::ArrayMode::refine): 36 * dfg/DFGBackwardsPropagationPhase.cpp: Added. 37 (DFG): 38 (BackwardsPropagationPhase): 39 (JSC::DFG::BackwardsPropagationPhase::BackwardsPropagationPhase): 40 (JSC::DFG::BackwardsPropagationPhase::run): 41 (JSC::DFG::BackwardsPropagationPhase::isNotNegZero): 42 (JSC::DFG::BackwardsPropagationPhase::isNotZero): 43 (JSC::DFG::BackwardsPropagationPhase::isWithinPowerOfTwoForConstant): 44 (JSC::DFG::BackwardsPropagationPhase::isWithinPowerOfTwoNonRecursive): 45 (JSC::DFG::BackwardsPropagationPhase::isWithinPowerOfTwo): 46 (JSC::DFG::BackwardsPropagationPhase::mergeDefaultFlags): 47 (JSC::DFG::BackwardsPropagationPhase::propagate): 48 (JSC::DFG::performBackwardsPropagation): 49 * dfg/DFGBackwardsPropagationPhase.h: Added. 50 (DFG): 51 * dfg/DFGCPSRethreadingPhase.cpp: 52 (JSC::DFG::CPSRethreadingPhase::run): 53 (JSC::DFG::CPSRethreadingPhase::clearIsLoadedFrom): 54 (CPSRethreadingPhase): 55 (JSC::DFG::CPSRethreadingPhase::canonicalizeGetLocalFor): 56 (JSC::DFG::CPSRethreadingPhase::canonicalizeFlushOrPhantomLocalFor): 57 * dfg/DFGDriver.cpp: 58 (JSC::DFG::compile): 59 * dfg/DFGGraph.cpp: 60 (JSC::DFG::Graph::dump): 61 * dfg/DFGNodeFlags.cpp: 62 (JSC::DFG::dumpNodeFlags): 63 (DFG): 64 * dfg/DFGNodeFlags.h: 65 (DFG): 66 * dfg/DFGPredictionPropagationPhase.cpp: 67 (PredictionPropagationPhase): 68 (JSC::DFG::PredictionPropagationPhase::propagate): 69 * dfg/DFGUnificationPhase.cpp: 70 (JSC::DFG::UnificationPhase::run): 71 * dfg/DFGVariableAccessData.h: 72 (JSC::DFG::VariableAccessData::VariableAccessData): 73 (JSC::DFG::VariableAccessData::mergeIsLoadedFrom): 74 (VariableAccessData): 75 (JSC::DFG::VariableAccessData::setIsLoadedFrom): 76 (JSC::DFG::VariableAccessData::isLoadedFrom): 77 1 78 2013-03-08 Roger Fong <[email protected]> 2 79
Note:
See TracChangeset
for help on using the changeset viewer.