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 | 90fe2c51ce60358409948eb2f5d3b7b82328a786 (patch) | |
tree | 9eaf300aea4db566280e1f0720e7558d765aaf30 /test/Analysis/CFLAliasAnalysis | |
parent | c7f790d744f4dd5d263bd25ff1cef022fb7a2ebe (diff) |
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272040 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis/CFLAliasAnalysis')
-rw-r--r-- | test/Analysis/CFLAliasAnalysis/attr-escape.ll | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/Analysis/CFLAliasAnalysis/attr-escape.ll b/test/Analysis/CFLAliasAnalysis/attr-escape.ll new file mode 100644 index 00000000000..6e366d5560f --- /dev/null +++ b/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 +} |