diff options
author | Dan Gohman <gohman@apple.com> | 2010-08-04 22:56:29 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-08-04 22:56:29 +0000 |
commit | fa1c49b920198ad87b69db0b3e82b08de34add3d (patch) | |
tree | 51a96163cfbba2cd870af97f498c96bd4776d518 /test | |
parent | 62393bcbf164da6e87fcb3446f792f0028e43222 (diff) | |
download | external_llvm-fa1c49b920198ad87b69db0b3e82b08de34add3d.zip external_llvm-fa1c49b920198ad87b69db0b3e82b08de34add3d.tar.gz external_llvm-fa1c49b920198ad87b69db0b3e82b08de34add3d.tar.bz2 |
The two-callsite form of AliasAnalysis::getModRefInfo is documented
to return Ref if the left callsite only reads memory read or written
by the right callsite; fix BasicAliasAnalysis to implement this.
Add AliasAnalysisEvaluator support for testing the two-callsite
form of getModRefInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110270 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Analysis/BasicAA/args-rets-allocas-loads.ll | 8 | ||||
-rw-r--r-- | test/Analysis/BasicAA/getmodrefinfo-cs-cs.ll | 12 |
2 files changed, 16 insertions, 4 deletions
diff --git a/test/Analysis/BasicAA/args-rets-allocas-loads.ll b/test/Analysis/BasicAA/args-rets-allocas-loads.ll index 5d3f67e..42893d8 100644 --- a/test/Analysis/BasicAA/args-rets-allocas-loads.ll +++ b/test/Analysis/BasicAA/args-rets-allocas-loads.ll @@ -302,9 +302,9 @@ define void @caller_a(double* %arg_a0, ; CHECK: 36 may alias responses (30.0%) ; CHECK: 0 must alias responses (0.0%) ; CHECK: Alias Analysis Evaluator Pointer Alias Summary: 70%/30%/0% -; CHECK: 128 Total ModRef Queries Performed -; CHECK: 44 no mod/ref responses (34.3%) +; CHECK: 184 Total ModRef Queries Performed +; CHECK: 44 no mod/ref responses (23.9%) ; CHECK: 0 mod responses (0.0%) ; CHECK: 0 ref responses (0.0%) -; CHECK: 84 mod & ref responses (65.6%) -; CHECK: Alias Analysis Evaluator Mod/Ref Summary: 34%/0%/0%/65% +; CHECK: 140 mod & ref responses (76.0%) +; CHECK: Alias Analysis Evaluator Mod/Ref Summary: 23%/0%/0%/76% diff --git a/test/Analysis/BasicAA/getmodrefinfo-cs-cs.ll b/test/Analysis/BasicAA/getmodrefinfo-cs-cs.ll new file mode 100644 index 0000000..4ee637e --- /dev/null +++ b/test/Analysis/BasicAA/getmodrefinfo-cs-cs.ll @@ -0,0 +1,12 @@ +; RUN: opt < %s -aa-eval -print-all-alias-modref-info -disable-output |& FileCheck %s + +; CHECK: {{[[:<:]]}}Ref: call void @ro() <-> call void @f0() + +declare void @f0() +declare void @ro() readonly + +define void @test() { + call void @f0() + call void @ro() + ret void +} |