mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
Spill slots cannot alias.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84432 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -63,7 +63,7 @@ namespace {
|
||||
|
||||
virtual bool isConstant(const MachineFrameInfo *MFI) const;
|
||||
|
||||
virtual bool isAliased() const;
|
||||
virtual bool isAliased(const MachineFrameInfo *MFI) const;
|
||||
|
||||
virtual void printCustom(raw_ostream &OS) const {
|
||||
OS << "FixedStack" << FI;
|
||||
@ -91,7 +91,7 @@ bool PseudoSourceValue::isConstant(const MachineFrameInfo *) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool PseudoSourceValue::isAliased() const {
|
||||
bool PseudoSourceValue::isAliased(const MachineFrameInfo *MFI) const {
|
||||
if (this == getStack() ||
|
||||
this == getGOT() ||
|
||||
this == getConstantPool() ||
|
||||
@ -105,9 +105,12 @@ bool FixedStackPseudoSourceValue::isConstant(const MachineFrameInfo *MFI) const{
|
||||
return MFI && MFI->isImmutableObjectIndex(FI);
|
||||
}
|
||||
|
||||
bool FixedStackPseudoSourceValue::isAliased() const{
|
||||
bool FixedStackPseudoSourceValue::isAliased(const MachineFrameInfo *MFI) const {
|
||||
// Negative frame indices are used for special things that don't
|
||||
// appear in LLVM IR. Non-negative indices may be used for things
|
||||
// like static allocas.
|
||||
return FI >= 0;
|
||||
if (!MFI)
|
||||
return FI >= 0;
|
||||
// Spill slots should not alias others.
|
||||
return !MFI->isFixedObjectIndex(FI) && !MFI->isSpillSlotObjectIndex(FI);
|
||||
}
|
||||
|
Reference in New Issue
Block a user