mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
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
This commit is contained in:
@@ -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!
|
||||
|
||||
|
||||
Reference in New Issue
Block a user