diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2011-10-22 19:58:20 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2011-10-22 19:58:20 +0000 |
commit | 614fef6d5a1e24d01ffe7247b1841fd7e08e1e85 (patch) | |
tree | fde79a92e8e5d07bd5b179e32d877d8557ebf9f6 /test/Transforms/DeadStoreElimination/simple.ll | |
parent | 5eebf6ff2052c2ee928abaf387b6458a765393c4 (diff) | |
download | external_llvm-614fef6d5a1e24d01ffe7247b1841fd7e08e1e85.zip external_llvm-614fef6d5a1e24d01ffe7247b1841fd7e08e1e85.tar.gz external_llvm-614fef6d5a1e24d01ffe7247b1841fd7e08e1e85.tar.bz2 |
Make SCEV's brute force analysis stronger in two ways. Firstly, we should be
able to constant fold load instructions where the argument is a constant.
Second, we should be able to watch multiple PHI nodes through the loop; this
patch only supports PHIs in loop headers, more can be done here.
With this patch, we now constant evaluate:
static const int arr[] = {1, 2, 3, 4, 5};
int test() {
int sum = 0;
for (int i = 0; i < 5; ++i) sum += arr[i];
return sum;
}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142731 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/DeadStoreElimination/simple.ll')
0 files changed, 0 insertions, 0 deletions