aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2015-08-03 20:32:27 +0000
committerChandler Carruth <chandlerc@gmail.com>2015-08-03 20:32:27 +0000
commit87adb7a2e2fb409b0e46e6706e69eecc247b6950 (patch)
tree8be7205bc7f793cc80ca340717af1bf3a1e5394c /llvm/lib/CodeGen/MachineBasicBlock.cpp
parent693744127b055b760b11069e441601eff1fbb378 (diff)
downloadllvm-87adb7a2e2fb409b0e46e6706e69eecc247b6950.zip
llvm-87adb7a2e2fb409b0e46e6706e69eecc247b6950.tar.gz
llvm-87adb7a2e2fb409b0e46e6706e69eecc247b6950.tar.bz2
[Unroll] Improve the brute force loop unroll estimate by propagating
through PHI nodes across iterations. This patch teaches the new advanced loop unrolling heuristics to propagate constants into the loop from the preheader and around the backedge after simulating each iteration. This lets us brute force solve simple recurrances that aren't modeled effectively by SCEV. It also makes it more clear why we need to process the loop in-order rather than bottom-up which might otherwise make much more sense (for example, for DCE). This came out of an attempt I'm making to develop a principled way to account for dead code in the unroll estimation. When I implemented a forward-propagating version of that it produced incorrect results due to failing to propagate *cost* between loop iterations through the PHI nodes, and it occured to me we really should at least propagate simplifications across those edges, and it is quite easy thanks to the loop being in canonical and LCSSA form. Differential Revision: http://reviews.llvm.org/D11706 llvm-svn: 243900
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
0 files changed, 0 insertions, 0 deletions