summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/ValueObjectChild.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
commitfc87752d5540688f723ad5f45540439755beee92 (patch)
tree2890bef945160b10521fd6b9974c9fb7bbf73d71 /lldb/source/Core/ValueObjectChild.cpp
parentd82ac375948d7eb5e404011252e0b420197ccd7f (diff)
downloadbcm5719-llvm-fc87752d5540688f723ad5f45540439755beee92.tar.gz
bcm5719-llvm-fc87752d5540688f723ad5f45540439755beee92.zip
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. llvm-svn: 123131
Diffstat (limited to 'lldb/source/Core/ValueObjectChild.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud