summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2011-10-23 23:43:14 +0000
committerNick Lewycky <nicholas@mxc.ca>2011-10-23 23:43:14 +0000
commit795cb48f1a1f01ce55b32d3d3caca728a4122d7d (patch)
treeca2b503b3ec7e2802ca5e925f615e2c2613ace01 /include
parent22c8946239de6d0cd6c51eeea245498e3c95ed87 (diff)
downloadllvm-795cb48f1a1f01ce55b32d3d3caca728a4122d7d.tar.gz
llvm-795cb48f1a1f01ce55b32d3d3caca728a4122d7d.tar.bz2
llvm-795cb48f1a1f01ce55b32d3d3caca728a4122d7d.tar.xz
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; } git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142781 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions