• Manos Koukoutos's avatar
    [turbofan] Refactor loop peeling/analysis infrastructure for unrolling · a6e01fb9
    Manos Koukoutos authored
    In preparation of loop unrolling, we move some loop analysis
    infrastructure out of loop-peeling.{h, cc}, and implement some
    additional required functionality.
    
    Changes:
    - Implement inner_loops() in loop-analysis.h. Change some parameters
      in other functions from Loop* to (const Loop*) to accommodate this
      change.
    - Move Peeling class into loop-analysis, rename it to NodeCopier.
    - Simplify NodeCopier::CopyNodes().
    - Allow NodeCopier to produce multiple copies of the targeted Nodes.
    - Introduce LoopFinder::HasMarkedExits(). Move the implementation of
      LoopPeeling::CanPeel() there. CanPeel() is now an alias for
      HasMarkedExits().
    
    Bug: v8:11298
    Change-Id: I245b2e937393e4a78ce4d355e1290aaf6e617114
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2672019
    Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
    Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#72555}
    a6e01fb9
loop-analysis.cc 20.6 KB