diff options
| author | Jingyue Wu <jingyue@google.com> | 2015-07-21 21:50:39 +0000 |
|---|---|---|
| committer | Jingyue Wu <jingyue@google.com> | 2015-07-21 21:50:39 +0000 |
| commit | d058ea927f613ef4c787526c040dd6a957fc76d2 (patch) | |
| tree | 7fae3738b604d6641fd433dab8b0aa5000af3222 /llvm/test | |
| parent | 525c73ceb70fc5c86cbfc246022402fa3d8a8f17 (diff) | |
| download | bcm5719-llvm-d058ea927f613ef4c787526c040dd6a957fc76d2.tar.gz bcm5719-llvm-d058ea927f613ef4c787526c040dd6a957fc76d2.zip | |
[MDA] change BlockScanLimit into a command line option.
Summary:
In the benchmark (https://github.com/vetter/shoc) we are researching,
the duplicated load is not eliminated because MemoryDependenceAnalysis
hit the BlockScanLimit. This patch change it into a command line option
instead of a hardcoded value.
Patched by Xuetian Weng.
Test Plan: test/Analysis/MemoryDependenceAnalysis/memdep-block-scan-limit.ll
Reviewers: jingyue, reames
Subscribers: reames, llvm-commits
Differential Revision: http://reviews.llvm.org/D11366
llvm-svn: 242842
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/Analysis/MemoryDependenceAnalysis/memdep-block-scan-limit.ll | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/test/Analysis/MemoryDependenceAnalysis/memdep-block-scan-limit.ll b/llvm/test/Analysis/MemoryDependenceAnalysis/memdep-block-scan-limit.ll new file mode 100644 index 00000000000..20ca31456fd --- /dev/null +++ b/llvm/test/Analysis/MemoryDependenceAnalysis/memdep-block-scan-limit.ll @@ -0,0 +1,15 @@ +; RUN: opt -S -memdep -gvn -basicaa < %s | FileCheck %s +; RUN: opt -S -memdep -memdep-block-scan-limit=1 -gvn -basicaa < %s | FileCheck %s --check-prefix=WITH-LIMIT +; CHECK-LABEL: @test( +; CHECK: load +; CHECK-NOT: load +; WITH-LIMIT-LABEL: @test( +; WITH-LIMIT-CHECK: load +; WITH-LIMIT-CHECK: load +define i32 @test(i32* %p) { + %1 = load i32, i32* %p + %2 = add i32 %1, 3 + %3 = load i32, i32* %p + %4 = add i32 %2, %3 + ret i32 %4 +} |

