diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2011-12-28 23:24:21 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2011-12-28 23:24:21 +0000 |
commit | b48a18903a5769f0ecb295db069252576b1388b0 (patch) | |
tree | 6536862781402e176a196c81e6f25a3b69ac9cbf /test/Analysis/TypeBasedAliasAnalysis | |
parent | da813f420907ad29802ce9e80238258a48385212 (diff) | |
download | external_llvm-b48a18903a5769f0ecb295db069252576b1388b0.zip external_llvm-b48a18903a5769f0ecb295db069252576b1388b0.tar.gz external_llvm-b48a18903a5769f0ecb295db069252576b1388b0.tar.bz2 |
Change CaptureTracking to pass a Use* instead of a Value* when a value is
captured. This allows the tracker to look at the specific use, which may be
especially interesting for function calls.
Use this to fix 'nocapture' deduction in FunctionAttrs. The existing one does
not iterate until a fixpoint and does not guarantee that it produces the same
result regardless of iteration order. The new implementation builds up a graph
of how arguments are passed from function to function, and uses a bottom-up walk
on the argument-SCCs to assign nocapture. This gets us nocapture more often, and
does so rather efficiently and independent of iteration order.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147327 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis/TypeBasedAliasAnalysis')
-rw-r--r-- | test/Analysis/TypeBasedAliasAnalysis/functionattrs.ll | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/Analysis/TypeBasedAliasAnalysis/functionattrs.ll b/test/Analysis/TypeBasedAliasAnalysis/functionattrs.ll index 8fb5fff..1ac5927 100644 --- a/test/Analysis/TypeBasedAliasAnalysis/functionattrs.ll +++ b/test/Analysis/TypeBasedAliasAnalysis/functionattrs.ll @@ -24,7 +24,7 @@ define void @test0_no(i32* %p) nounwind { ; Add the readonly attribute, since there's just a call to a function which ; TBAA says doesn't modify any memory. -; CHECK: define void @test1_yes(i32* %p) nounwind readonly { +; CHECK: define void @test1_yes(i32* nocapture %p) nounwind readonly { define void @test1_yes(i32* %p) nounwind { call void @callee(i32* %p), !tbaa !1 ret void |