diff options
| author | George Burgess IV <george.burgess.iv@gmail.com> | 2016-06-07 18:35:37 +0000 |
|---|---|---|
| committer | George Burgess IV <george.burgess.iv@gmail.com> | 2016-06-07 18:35:37 +0000 |
| commit | a1f9a2daebf623c2be291f0bbdd128d718bd7b44 (patch) | |
| tree | c4358d1d41e538c735ec6db854698787e8eed526 /llvm/test/Analysis/CFLAliasAnalysis | |
| parent | 04c14db108e5e4b15f1151c11946bb5a18121c28 (diff) | |
| download | bcm5719-llvm-a1f9a2daebf623c2be291f0bbdd128d718bd7b44.tar.gz bcm5719-llvm-a1f9a2daebf623c2be291f0bbdd128d718bd7b44.zip | |
[CFLAA] Add AttrEscaped, remove bit twiddling functions.
This patch does a few things:
- Unifies AttrAll and AttrUnknown (since they were used for more or less
the same purpose anyway).
- Introduces AttrEscaped, an attribute that notes that a value escapes
our analysis for a given set, but not that an unknown value flows into
said set.
- Removes functions that take bit indices, since we also had functions
that took bitsets, and the use of both (with similar names) was
unclear and bug-prone.
Patch by Jia Chen.
Differential Revision: http://reviews.llvm.org/D21000
llvm-svn: 272040
Diffstat (limited to 'llvm/test/Analysis/CFLAliasAnalysis')
| -rw-r--r-- | llvm/test/Analysis/CFLAliasAnalysis/attr-escape.ll | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/llvm/test/Analysis/CFLAliasAnalysis/attr-escape.ll b/llvm/test/Analysis/CFLAliasAnalysis/attr-escape.ll new file mode 100644 index 00000000000..6e366d5560f --- /dev/null +++ b/llvm/test/Analysis/CFLAliasAnalysis/attr-escape.ll @@ -0,0 +1,18 @@ +; This testcase ensures that CFL AA handles escaped values no more conservative than it should + +; RUN: opt < %s -disable-basicaa -cfl-aa -aa-eval -print-all-alias-modref-info -disable-output 2>&1 | FileCheck %s +; RUN: opt < %s -aa-pipeline=cfl-aa -passes=aa-eval -print-all-alias-modref-info -disable-output 2>&1 | FileCheck %s + +; CHECK: Function: escape_ptrtoint +; CHECK: NoAlias: i32* %a, i32* %x +; CHECK: NoAlias: i32* %b, i32* %x +; CHECK: NoAlias: i32* %a, i32* %b +; CHECK: MayAlias: i32* %a, i32* %aAlias +; CHECK: NoAlias: i32* %aAlias, i32* %b +define void @escape_ptrtoint(i32* %x) { + %a = alloca i32, align 4 + %b = alloca i32, align 4 + %aint = ptrtoint i32* %a to i64 + %aAlias = inttoptr i64 %aint to i32* + ret void +} |

