summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenAction.cpp
diff options
context:
space:
mode:
authorFlorian Hahn <flo@fhahn.com>2019-09-11 08:23:23 +0000
committerFlorian Hahn <flo@fhahn.com>2019-09-11 08:23:23 +0000
commite4961218fd5b9bb36810b8dc05481f29068dbbdd (patch)
tree65d82737ebc53555ba1f3e6cc22ded34a24ee156 /clang/lib/CodeGen/CodeGenAction.cpp
parent17ea9b463c66a6a9e978e87b9363c24e8e7e6e42 (diff)
downloadbcm5719-llvm-e4961218fd5b9bb36810b8dc05481f29068dbbdd.tar.gz
bcm5719-llvm-e4961218fd5b9bb36810b8dc05481f29068dbbdd.zip
[LoopInterchange] Properly move condition, induction increment and ops to latch.
Currently we only rely on the induction increment to come before the condition to ensure the required instructions get moved to the new latch. This patch duplicates and moves the required instructions to the newly created latch. We move the condition to the end of the new block, then process its operands. We stop at operands that are defined outside the loop, or are the induction PHI. We duplicate the instructions and update the uses in the moved instructions, to ensure other users remain intact. See the added test2 for such an example. Reviewers: efriedma, mcrosier Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D67367 llvm-svn: 371595
Diffstat (limited to 'clang/lib/CodeGen/CodeGenAction.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud