summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/MachOObjectFile.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2011-10-25 12:28:52 +0000
committerDuncan Sands <baldrick@free.fr>2011-10-25 12:28:52 +0000
commita370f3e34e210ff2ca4725be9fdb588e7785ab73 (patch)
tree42d64342594e36286c29ff1510f45e8676d21b9d /llvm/lib/Object/MachOObjectFile.cpp
parente89ac0666b090c63277e8dcf1d49bb7762da308b (diff)
downloadbcm5719-llvm-a370f3e34e210ff2ca4725be9fdb588e7785ab73.tar.gz
bcm5719-llvm-a370f3e34e210ff2ca4725be9fdb588e7785ab73.zip
Restore commits 142790 and 142843 - they weren't breaking the build
bots. Original commit messages: - Reapply r142781 with fix. Original message: Enhance SCEV's brute force loop analysis to handle multiple PHI nodes in the loop header when computing the trip count. With this, we now constant evaluate: struct ListNode { const struct ListNode *next; int i; }; static const struct ListNode node1 = {0, 1}; static const struct ListNode node2 = {&node1, 2}; static const struct ListNode node3 = {&node2, 3}; int test() { int sum = 0; for (const struct ListNode *n = &node3; n != 0; n = n->next) sum += n->i; return sum; } - Now that we look at all the header PHIs, we need to consider all the header PHIs when deciding that the loop has stopped evolving. Fixes miscompile in the gcc torture testsuite! llvm-svn: 142919
Diffstat (limited to 'llvm/lib/Object/MachOObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud