mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 16:17:38 +00:00
Break PseudoSourceValue out of the Value hierarchy. It is now the root of its own tree containing FixedStackPseudoSourceValue (which you can use isa/dyn_cast on) and MipsCallEntry (which you can't). Anything that needs to use either a PseudoSourceValue* and Value* is strongly encouraged to use a MachinePointerInfo instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206255 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -161,13 +161,12 @@ void StackSlotColoring::ScanForSpillSlotRefs(MachineFunction &MF) {
|
||||
for (MachineInstr::mmo_iterator MMOI = MI->memoperands_begin(),
|
||||
EE = MI->memoperands_end(); MMOI != EE; ++MMOI) {
|
||||
MachineMemOperand *MMO = *MMOI;
|
||||
if (const Value *V = MMO->getValue()) {
|
||||
if (const FixedStackPseudoSourceValue *FSV =
|
||||
dyn_cast<FixedStackPseudoSourceValue>(V)) {
|
||||
int FI = FSV->getFrameIndex();
|
||||
if (FI >= 0)
|
||||
SSRefs[FI].push_back(MMO);
|
||||
}
|
||||
if (const FixedStackPseudoSourceValue *FSV =
|
||||
dyn_cast_or_null<FixedStackPseudoSourceValue>(
|
||||
MMO->getPseudoValue())) {
|
||||
int FI = FSV->getFrameIndex();
|
||||
if (FI >= 0)
|
||||
SSRefs[FI].push_back(MMO);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -310,7 +309,7 @@ bool StackSlotColoring::ColorSlots(MachineFunction &MF) {
|
||||
if (NewFI == -1 || (NewFI == (int)SS))
|
||||
continue;
|
||||
|
||||
const Value *NewSV = PseudoSourceValue::getFixedStack(NewFI);
|
||||
const PseudoSourceValue *NewSV = PseudoSourceValue::getFixedStack(NewFI);
|
||||
SmallVectorImpl<MachineMemOperand *> &RefMMOs = SSRefs[SS];
|
||||
for (unsigned i = 0, e = RefMMOs.size(); i != e; ++i)
|
||||
RefMMOs[i]->setValue(NewSV);
|
||||
|
||||
Reference in New Issue
Block a user