aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorChen Li <meloli87@gmail.com>2015-10-28 04:45:47 +0000
committerChen Li <meloli87@gmail.com>2015-10-28 04:45:47 +0000
commit032a5d0cea76ac9bf936009e5471a05657710f46 (patch)
treedbea03fbfb5de5cf00fbadf84889de612b67ee70 /clang/lib/Driver/Tools.cpp
parent140f4c4f29f888cf7672323423321641ab3f821e (diff)
downloadllvm-032a5d0cea76ac9bf936009e5471a05657710f46.zip
llvm-032a5d0cea76ac9bf936009e5471a05657710f46.tar.gz
llvm-032a5d0cea76ac9bf936009e5471a05657710f46.tar.bz2
[IndVarSimplify] Rewrite loop exit values with their initial values from loop preheader
Summary: This patch adds support to check if a loop has loop invariant conditions which lead to loop exits. If so, we know that if the exit path is taken, it is at the first loop iteration. If there is an induction variable used in that exit path whose value has not been updated, it will keep its initial value passing from loop preheader. We can therefore rewrite the exit value with its initial value. This will help remove phis created by LCSSA and enable other optimizations like loop unswitch. Reviewers: sanjoy Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D13974 llvm-svn: 251492
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
0 files changed, 0 insertions, 0 deletions