• titzer's avatar
    [turbofan] Handle dead diamonds in scheduling and add a test. · 45d75bca
    titzer authored
    The background here is that graphs generated from WASM are not trimmed.
    That means there can be some floating control diamonds that are not
    reachable from end. An assertion in the scheduler for phis from floating
    diamonds checks that the use edge in this situation is the control edge,
    but in general, any edge could cause this.
    
    Scheduling still works without this assertion. The longer term fix
    is to either trim the graphs (more compile time overhead for WASM)
    or improve the scheduler's handling of dead code in the graph. Currently
    it does not schedule dead code but the potential use positions of
    dead code are used in the computation of the common dominator of uses. We could
    recognize dead nodes in PrepareUses() and check in GetBlockForUse()
    as per TODO.
    
    R=bradnelson@chromium.org, mstarzinger@chromium.org
    BUG=
    
    Review URL: https://codereview.chromium.org/1846933002
    
    Cr-Commit-Position: refs/heads/master@{#35245}
    45d75bca
scheduler-unittest.cc 23.9 KB