diff options
author | Dan Gohman <gohman@apple.com> | 2010-11-09 20:17:38 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-11-09 20:17:38 +0000 |
commit | 4cf0dcfb44d9d308f2df48e2878c91297395179c (patch) | |
tree | d44a6dda9dba13f2b6562a08fdd218d1983364cc /lib/Transforms/IPO/FunctionAttrs.cpp | |
parent | 6d44d64f61359c865cbf2d7f331bb9c97ce253d5 (diff) |
Teach FunctionAttrs about the VAArg instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118627 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/FunctionAttrs.cpp')
-rw-r--r-- | lib/Transforms/IPO/FunctionAttrs.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Transforms/IPO/FunctionAttrs.cpp b/lib/Transforms/IPO/FunctionAttrs.cpp index fcdc5f18f1..8bdf5d75da 100644 --- a/lib/Transforms/IPO/FunctionAttrs.cpp +++ b/lib/Transforms/IPO/FunctionAttrs.cpp @@ -195,6 +195,13 @@ bool FunctionAttrs::AddReadAttrs(const CallGraphSCC &SCC) { if (AA->pointsToConstantMemory(Loc, /*OrLocal=*/true)) continue; } + } else if (VAArgInst *VI = dyn_cast<VAArgInst>(I)) { + // Ignore vaargs on local memory. + AliasAnalysis::Location Loc(VI->getPointerOperand(), + AliasAnalysis::UnknownSize, + VI->getMetadata(LLVMContext::MD_tbaa)); + if (AA->pointsToConstantMemory(Loc, /*OrLocal=*/true)) + continue; } // Any remaining instructions need to be taken seriously! Check if they |