[llvm] [SelectionDAG] Mark frame index as "aliased" at argument copy elison (PR #89712)
Björn Pettersson via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 23 01:54:44 PDT 2024
================
@@ -11128,14 +11128,15 @@ static void tryToElideArgumentCopy(
}
// Perform the elision. Delete the old stack object and replace its only use
- // in the variable info map. Mark the stack object as mutable.
+ // in the variable info map. Mark the stack object as mutable and aliased.
----------------
bjope wrote:
isAliased is used inside ScheduleDAGInstrs.cpp getUnderlyingObjectsForInstr:
```
if (const PseudoSourceValue *PSV = MMO->getPseudoValue()) {
// Function that contain tail calls don't have unique PseudoSourceValue
// objects. Two PseudoSourceValues might refer to the same or
// overlapping locations. The client code calling this function assumes
// this is not the case. So return a conservative answer of no known
// object.
if (MFI.hasTailCall())
return false;
// For now, ignore PseudoSourceValues which may alias LLVM IR values
// because the code that uses this function has no way to cope with
// such aliases.
if (PSV->isAliased(&MFI))
return false;
bool MayAlias = PSV->mayAlias(&MFI);
Objects.emplace_back(PSV, MayAlias);
} else if (const Value *V = MMO->getValue()) {
```
https://github.com/llvm/llvm-project/pull/89712
More information about the llvm-commits
mailing list