Ignore:
Timestamp:
Jul 24, 2013, 9:03:35 PM (12 years ago)
Author:
[email protected]
Message:

fourthTier: DFG should CSE MakeRope
https://bugs.webkit.org/show_bug.cgi?id=117905

Source/JavaScriptCore:

Reviewed by Geoffrey Garen.

Adds MakeRope to the CSE phase and removes the comment that says that
we could do it but aren't doing it.

Also fixed SpeculatedType dumping so that if you have a Cell type then
it just prints "Cell" and if you just have Object then it just prints
"Object", instead of printing the long list of types.

  • bytecode/SpeculatedType.cpp:

(JSC::dumpSpeculation):

  • dfg/DFGCSEPhase.cpp:

(JSC::DFG::CSEPhase::performNodeCSE):

LayoutTests:

Reviewed by Geoffrey Garen.

This benchmark speeds up by 50%.

  • fast/js/regress/make-rope-cse-expected.txt: Added.
  • fast/js/regress/make-rope-cse.html: Added.
  • fast/js/regress/script-tests/make-rope-cse.js: Added.

(foo):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGCSEPhase.cpp

    r153241 r153242  
    10491049        dataLogF("   %s @%u: ", Graph::opName(node->op()), node->index());
    10501050#endif
    1051        
    1052         // NOTE: there are some nodes that we deliberately don't CSE even though we
    1053         // probably could, like MakeRope and ToPrimitive. That's because there is no
    1054         // evidence that doing CSE on these nodes would result in a performance
    1055         // progression. Hence considering these nodes in CSE would just mean that this
    1056         // code does more work with no win. Of course, we may want to reconsider this,
    1057         // since MakeRope is trivially CSE-able. It's not trivially doable for
    1058         // ToPrimitive, but we could change that with some speculations if we really
    1059         // needed to.
    10601051       
    10611052        switch (node->op()) {
     
    11021093        case CompareEqConstant:
    11031094        case ValueToInt32:
     1095        case MakeRope:
    11041096            if (cseMode == StoreElimination)
    11051097                break;
Note: See TracChangeset for help on using the changeset viewer.