• jarin's avatar
    [turbofan] Redundant branch elimination. · 106aecf2
    jarin authored
    Removes a branch that checks for a condition that has been checked on dominators of the branch.
    
    This introduces a new reducer that propagates the list of checked conditions (and their boolean values) through the control flow graph. If it encounters a branch checking a condition with a known value, the branch is eliminated.
    
    The analysis relies on loops being reducible: if a condition has been checked on all paths to loop entry, then it is checked in the loop (regardless what of the conditions checked inside the loop).
    
    The implementation is fairly naive and could be improved:
    
    - all the operation on the condition lists could be made allocation-free when revisited.
    
    - we could try to use a map structure rather than a linked list (to make
    lookups faster).
    
    - the merging of control flow could be changed to take into account
      conditions from non-dominating paths (as long as all paths check
      the condition).
    
    Review URL: https://codereview.chromium.org/1376293005
    
    Cr-Commit-Position: refs/heads/master@{#31347}
    106aecf2
Name
Last commit
Last update
..
base Loading commit data...
compiler Loading commit data...
heap Loading commit data...
interpreter Loading commit data...
libplatform Loading commit data...
runtime Loading commit data...
DEPS Loading commit data...
atomic-utils-unittest.cc Loading commit data...
char-predicates-unittest.cc Loading commit data...
counters-unittest.cc Loading commit data...
run-all-unittests.cc Loading commit data...
test-utils.cc Loading commit data...
test-utils.h Loading commit data...
unittests.gyp Loading commit data...
unittests.isolate Loading commit data...
unittests.status Loading commit data...