aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/GCStrategy.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-01-09 22:26:35 +0000
committerChris Lattner <sabre@nondot.org>2011-01-09 22:26:35 +0000
commit992efb03785f2a368fbb63b09373be1d6a96ce5a (patch)
tree14906ff0c13ed69b70d5155ea2a375da023e5205 /lib/CodeGen/GCStrategy.cpp
parent42e9c963921776cb498c33b6c6c03f29971316f3 (diff)
Step #2 to improve trip count analysis for loops like this:
void f(int* begin, int* end) { std::fill(begin, end, 0); } which turns into a != exit expression where one pointer is strided and (thanks to step #1) known to not overflow, and the other is loop invariant. The observation here is that, though the IV is strided by 4 in this case, that the IV *has* to become equal to the end value. It cannot "miss" the end value by stepping over it, because if it did, the strided IV expression would eventually wrap around. Handle this by turning A != B into "A-B != 0" where the A-B part is known to be NUW. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123131 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/GCStrategy.cpp')
0 files changed, 0 insertions, 0 deletions