diff options
author | Dan Gohman <gohman@apple.com> | 2010-11-11 21:50:19 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-11-11 21:50:19 +0000 |
commit | 6d8eb156e6be727570b300bac7712f745a318c7d (patch) | |
tree | cd4250cc4395e8077f2dac80017fbe44ae96a94b /lib/Transforms/IPO/ArgumentPromotion.cpp | |
parent | ef5b390263ebe6e22c89cb16faebf0fb3c4ce1ee (diff) | |
download | external_llvm-6d8eb156e6be727570b300bac7712f745a318c7d.zip external_llvm-6d8eb156e6be727570b300bac7712f745a318c7d.tar.gz external_llvm-6d8eb156e6be727570b300bac7712f745a318c7d.tar.bz2 |
Add helper functions for computing the Location of load, store,
and vaarg instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118845 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/ArgumentPromotion.cpp')
-rw-r--r-- | lib/Transforms/IPO/ArgumentPromotion.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/Transforms/IPO/ArgumentPromotion.cpp b/lib/Transforms/IPO/ArgumentPromotion.cpp index fe30381..17ef703 100644 --- a/lib/Transforms/IPO/ArgumentPromotion.cpp +++ b/lib/Transforms/IPO/ArgumentPromotion.cpp @@ -433,10 +433,7 @@ bool ArgPromotion::isSafeToPromoteArgument(Argument *Arg, bool isByVal) const { LoadInst *Load = Loads[i]; BasicBlock *BB = Load->getParent(); - AliasAnalysis::Location Loc(Load->getPointerOperand(), - AA.getTypeStoreSize(Load->getType()), - Load->getMetadata(LLVMContext::MD_tbaa)); - + AliasAnalysis::Location Loc = AA.getLocation(Load); if (AA.canInstructionRangeModify(BB->front(), *Load, Loc)) return false; // Pointer is invalidated! |