• 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
benchmarks Loading commit data...
build Loading commit data...
docs Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party/binutils Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.gitignore Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
Makefile Loading commit data...
Makefile.android Loading commit data...
Makefile.nacl Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...