mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-02 18:42:36 +00:00
Fix argument attribute queries with bundle operands
When iterating over data operands in AA, don't make argument-attribute-specific queries on bundle operands. Trying to fix self hosting... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289765 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d0f6642fb6
commit
146bbc6051
@ -460,7 +460,8 @@ ModRefInfo AAResults::callCapturesBefore(const Instruction *I,
|
||||
// pointer were passed to arguments that were neither of these, then it
|
||||
// couldn't be no-capture.
|
||||
if (!(*CI)->getType()->isPointerTy() ||
|
||||
(!CS.doesNotCapture(ArgNo) && !CS.isByValArgument(ArgNo)))
|
||||
(!CS.doesNotCapture(ArgNo) &&
|
||||
ArgNo < CS.getNumArgOperands() && !CS.isByValArgument(ArgNo)))
|
||||
continue;
|
||||
|
||||
// If this is a no-capture pointer argument, see if we can tell that it
|
||||
@ -469,9 +470,9 @@ ModRefInfo AAResults::callCapturesBefore(const Instruction *I,
|
||||
// escape.
|
||||
if (isNoAlias(MemoryLocation(*CI), MemoryLocation(Object)))
|
||||
continue;
|
||||
if (CS.doesNotAccessMemory(ArgNo))
|
||||
if (ArgNo < CS.getNumArgOperands() && CS.doesNotAccessMemory(ArgNo))
|
||||
continue;
|
||||
if (CS.onlyReadsMemory(ArgNo)) {
|
||||
if (ArgNo < CS.getNumArgOperands() && CS.onlyReadsMemory(ArgNo)) {
|
||||
R = MRI_Ref;
|
||||
continue;
|
||||
}
|
||||
|
@ -740,7 +740,8 @@ ModRefInfo BasicAAResult::getModRefInfo(ImmutableCallSite CS,
|
||||
// pointer were passed to arguments that were neither of these, then it
|
||||
// couldn't be no-capture.
|
||||
if (!(*CI)->getType()->isPointerTy() ||
|
||||
(!CS.doesNotCapture(OperandNo) && !CS.isByValArgument(OperandNo)))
|
||||
(!CS.doesNotCapture(OperandNo) &&
|
||||
OperandNo < CS.getNumArgOperands() && !CS.isByValArgument(OperandNo)))
|
||||
continue;
|
||||
|
||||
// If this is a no-capture pointer argument, see if we can tell that it
|
||||
|
Loading…
x
Reference in New Issue
Block a user