mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-13 09:14:38 +00:00
[PowerPC] Remove wild call to RegScavenger::initRegState().
This call should in fact be made by RegScavenger::enterBasicBlock() called below. The first call does nothing except for triggering UB, indicated by UBSan (passing nullptr to memset()). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254548 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9343bd9aff
commit
dae9c83029
@ -74,10 +74,6 @@ public:
|
|||||||
/// Start tracking liveness from the begin of the specific basic block.
|
/// Start tracking liveness from the begin of the specific basic block.
|
||||||
void enterBasicBlock(MachineBasicBlock *mbb);
|
void enterBasicBlock(MachineBasicBlock *mbb);
|
||||||
|
|
||||||
/// Allow resetting register state info for multiple
|
|
||||||
/// passes over/within the same function.
|
|
||||||
void initRegState();
|
|
||||||
|
|
||||||
/// Move the internal MBB iterator and update register states.
|
/// Move the internal MBB iterator and update register states.
|
||||||
void forward();
|
void forward();
|
||||||
|
|
||||||
@ -180,6 +176,9 @@ private:
|
|||||||
unsigned InstrLimit,
|
unsigned InstrLimit,
|
||||||
MachineBasicBlock::iterator &UseMI);
|
MachineBasicBlock::iterator &UseMI);
|
||||||
|
|
||||||
|
/// Allow resetting register state info for multiple
|
||||||
|
/// passes over/within the same function.
|
||||||
|
void initRegState();
|
||||||
};
|
};
|
||||||
|
|
||||||
} // End llvm namespace
|
} // End llvm namespace
|
||||||
|
@ -570,7 +570,6 @@ bool PPCFrameLowering::findScratchRegister(MachineBasicBlock *MBB,
|
|||||||
(!UseAtEnd && (&MBB->getParent()->front() == MBB)))
|
(!UseAtEnd && (&MBB->getParent()->front() == MBB)))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
RS.initRegState();
|
|
||||||
RS.enterBasicBlock(MBB);
|
RS.enterBasicBlock(MBB);
|
||||||
|
|
||||||
if (UseAtEnd && !MBB->empty()) {
|
if (UseAtEnd && !MBB->empty()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user