PEI: Only call updateLiveness once per function

This only needs to be called once for the function, and it visits all
the necessary blocks in the function. It looks like
631f6b888c accidentally moved this into
the loop over all save blocks.
This commit is contained in:
Matt Arsenault 2020-12-18 10:51:54 -05:00
parent 94da2cf650
commit fd0f5fb8de
1 changed files with 5 additions and 5 deletions

View File

@ -620,12 +620,12 @@ void PEI::spillCalleeSavedRegs(MachineFunction &MF) {
if (!MFI.hasCalls())
NumLeafFuncWithSpills++;
for (MachineBasicBlock *SaveBlock : SaveBlocks) {
for (MachineBasicBlock *SaveBlock : SaveBlocks)
insertCSRSaves(*SaveBlock, CSI);
// Update the live-in information of all the blocks up to the save
// point.
// Update the live-in information of all the blocks up to the save point.
updateLiveness(MF);
}
for (MachineBasicBlock *RestoreBlock : RestoreBlocks)
insertCSRRestores(*RestoreBlock, CSI);
}