mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-08 21:47:23 +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.
|
||||
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.
|
||||
void forward();
|
||||
|
||||
@ -180,6 +176,9 @@ private:
|
||||
unsigned InstrLimit,
|
||||
MachineBasicBlock::iterator &UseMI);
|
||||
|
||||
/// Allow resetting register state info for multiple
|
||||
/// passes over/within the same function.
|
||||
void initRegState();
|
||||
};
|
||||
|
||||
} // End llvm namespace
|
||||
|
@ -569,8 +569,7 @@ bool PPCFrameLowering::findScratchRegister(MachineBasicBlock *MBB,
|
||||
if ((UseAtEnd && MBB->isReturnBlock()) ||
|
||||
(!UseAtEnd && (&MBB->getParent()->front() == MBB)))
|
||||
return true;
|
||||
|
||||
RS.initRegState();
|
||||
|
||||
RS.enterBasicBlock(MBB);
|
||||
|
||||
if (UseAtEnd && !MBB->empty()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user