[PATCH] D21513: [CFLAA] Try to be less conservative on more functions
George Burgess IV via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 20 18:49:43 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL273229: [CFLAA] Be more aggressive with interprocedural analysis. (authored by gbiv).
Changed prior to commit:
http://reviews.llvm.org/D21513?vs=61262&id=61334#toc
Repository:
rL LLVM
http://reviews.llvm.org/D21513
Files:
llvm/trunk/lib/Analysis/CFLAliasAnalysis.cpp
llvm/trunk/test/Analysis/CFLAliasAnalysis/basic-interproc-ret.ll
llvm/trunk/test/Analysis/CFLAliasAnalysis/interproc-ret-arg.ll
Index: llvm/trunk/test/Analysis/CFLAliasAnalysis/interproc-ret-arg.ll
===================================================================
--- llvm/trunk/test/Analysis/CFLAliasAnalysis/interproc-ret-arg.ll
+++ llvm/trunk/test/Analysis/CFLAliasAnalysis/interproc-ret-arg.ll
@@ -4,10 +4,6 @@
; 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
-; We have to xfail this since @return_arg_callee is treated as an opaque
-; function, and the anlysis couldn't prove that %b and %c are not aliases
-; XFAIL: *
-
define i32* @return_arg_callee(i32* %arg1, i32* %arg2) {
ret i32* %arg1
}
@@ -22,4 +18,4 @@
%c = call i32* @return_arg_callee(i32* %a, i32* %b)
ret void
-}
\ No newline at end of file
+}
Index: llvm/trunk/test/Analysis/CFLAliasAnalysis/basic-interproc-ret.ll
===================================================================
--- llvm/trunk/test/Analysis/CFLAliasAnalysis/basic-interproc-ret.ll
+++ llvm/trunk/test/Analysis/CFLAliasAnalysis/basic-interproc-ret.ll
@@ -1,26 +0,0 @@
-; This testcase ensures that CFL AA gives conservative answers on variables
-; that involve arguments.
-
-; RUN: opt < %s -cfl-aa -aa-eval -print-may-aliases -disable-output 2>&1 | FileCheck %s
-
-; CHECK: Function: test
-; CHECK: 4 Total Alias Queries Performed
-; CHECK: 3 no alias responses
-; ^ The 1 MayAlias is due to %arg1. Sadly, we don't currently have machinery
-; in place to check whether %arg1 aliases %a, because BasicAA takes care of
-; that for us.
-
-define i32* @test2(i32* %arg1) {
- store i32 0, i32* %arg1
-
- %a = alloca i32, align 4
- ret i32* %a
-}
-
-define void @test() {
- %a = alloca i32, align 4
- %b = alloca i32, align 4
- %c = call i32* @test2(i32* %a)
-
- ret void
-}
Index: llvm/trunk/lib/Analysis/CFLAliasAnalysis.cpp
===================================================================
--- llvm/trunk/lib/Analysis/CFLAliasAnalysis.cpp
+++ llvm/trunk/lib/Analysis/CFLAliasAnalysis.cpp
@@ -377,7 +377,7 @@
}
static bool isFunctionExternal(Function *Fn) {
- return Fn->isDeclaration() || !Fn->hasLocalLinkage();
+ return !Fn->hasExactDefinition();
}
bool tryInterproceduralAnalysis(CallSite CS,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21513.61334.patch
Type: text/x-patch
Size: 2347 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160621/e5968580/attachment.bin>
More information about the llvm-commits
mailing list