Ignore:
Timestamp:
Jun 4, 2012, 4:27:34 PM (13 years ago)
Author:
[email protected]
Message:

DFG arguments simplification takes unkindly to direct accesses to the arguments register
https://bugs.webkit.org/show_bug.cgi?id=88261

Source/JavaScriptCore:

Reviewed by Geoffrey Garen.

Fixed arguments simplification for direct accesses to the arguments register, which may
arise if CSE had not run. Fixed CSE so that it does run prior to arguments simplification,
by making it a full-fledged member of the fixpoint. Fixed other issues in arguments
simplification, like realizing that it needs to bail if there is a direct assignment to
the arguments register, and failing to turn CreateArguments into PhantomArguments. Also
fixed CSE's handling of store elimination of captured locals in the presence of a
GetMyArgumentByVal (or one of its friends), and fixed CSE to correctly fixup variables at
tail if the Flush it removes is the last operation on a local in a basic block.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::dump):

  • dfg/DFGArgumentsSimplificationPhase.cpp:

(JSC::DFG::ArgumentsSimplificationPhase::run):
(JSC::DFG::ArgumentsSimplificationPhase::isOKToOptimize):

  • dfg/DFGCSEPhase.cpp:

(JSC::DFG::CSEPhase::run):
(JSC::DFG::CSEPhase::setLocalStoreElimination):
(JSC::DFG::CSEPhase::performNodeCSE):
(CSEPhase):

  • dfg/DFGDriver.cpp:

(JSC::DFG::compile):

LayoutTests:

Reviewed by Geoffrey Garen.

  • fast/js/dfg-arguments-alias-one-block-expected.txt: Added.
  • fast/js/dfg-arguments-alias-one-block-osr-exit-expected.txt: Added.
  • fast/js/dfg-arguments-alias-one-block-osr-exit.html: Added.
  • fast/js/dfg-arguments-alias-one-block-overwrite-arguments-expected.txt: Added.
  • fast/js/dfg-arguments-alias-one-block-overwrite-arguments.html: Added.
  • fast/js/dfg-arguments-alias-one-block-overwrite-expected.txt: Added.
  • fast/js/dfg-arguments-alias-one-block-overwrite.html: Added.
  • fast/js/dfg-arguments-alias-one-block.html: Added.
  • fast/js/script-tests/dfg-arguments-alias-one-block-osr-exit.js: Added.

(foo):

  • fast/js/script-tests/dfg-arguments-alias-one-block-overwrite-arguments.js: Added.

(foo):

  • fast/js/script-tests/dfg-arguments-alias-one-block-overwrite.js: Added.

(foo):

  • fast/js/script-tests/dfg-arguments-alias-one-block.js: Added.

(foo):

File:
1 edited

Legend:

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

    r119342 r119437  
    8383        changed |= performArgumentsSimplification(dfg);
    8484        changed |= performCFGSimplification(dfg);
     85        changed |= performCSE(dfg, FixpointNotConverged);
    8586        if (!changed)
    8687            break;
    87         performCSE(dfg, FixpointNotConverged);
    8888        dfg.resetExitStates();
    8989    }
Note: See TracChangeset for help on using the changeset viewer.