• bmeurer's avatar
    [turbofan] Proper dead code elimination as regular reducer. · 733a2463
    bmeurer authored
    The three different concerns that the ControlReducer used to deal with
    are now properly separated into
    
      a.) DeadCodeElimination, which is a regular AdvancedReducer, that
          propagates Dead via control edges,
      b.) CommonOperatorReducer, which does strength reduction on common
          operators (i.e. Branch, Phi, and friends), and
      c.) GraphTrimming, which removes dead->live edges from the graph.
    
    This will make it possible to run the DeadCodeElimination together with
    other passes that actually introduce Dead nodes, i.e. typed lowering;
    and it opens the door for general inlining without two stage fix point
    iteration.
    
    To make the DeadCodeElimination easier and more uniform, we basically
    reverted the introduction of DeadValue and DeadEffect, and changed the
    Dead operator to produce control, value and effect. Note however that
    this is not a requirement, but merely a way to make dead propagation
    easier and more uniform. We could always go back and decide to have
    different Dead operators if some other change requires that.
    
    Note that there are several additional opportunities for cleanup now,
    i.e. OSR deconstruction could be a regular reducer now, and we don't
    need to use TheHole as dead value marker in the GraphReducer. And we can
    actually run the dead code elimination together with the other passes
    instead of using separate passes over the graph.  We will do this in
    follow up CLs.
    
    R=jarin@chromium.org, mstarzinger@chromium.org
    
    Review URL: https://codereview.chromium.org/1193833002
    
    Cr-Commit-Position: refs/heads/master@{#29146}
    733a2463
cctest.gyp 10.5 KB