mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-01 00:33:09 +00:00
Cleanup collectChangingRegs
The handling of the epilogue is best expressed as an early exit and there is no reason to look for register defs in DbgValue MIs. Patch by Frederic Riss! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214986 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e7a280ac86
commit
6e62bbdafc
@ -152,10 +152,11 @@ static void collectChangingRegs(const MachineFunction *MF,
|
||||
std::set<unsigned> &Regs) {
|
||||
for (const auto &MBB : *MF) {
|
||||
auto FirstEpilogueInst = getFirstEpilogueInst(MBB);
|
||||
bool IsInEpilogue = false;
|
||||
|
||||
for (const auto &MI : MBB) {
|
||||
IsInEpilogue |= &MI == FirstEpilogueInst;
|
||||
if (!MI.getFlag(MachineInstr::FrameSetup) && !IsInEpilogue)
|
||||
if (&MI == FirstEpilogueInst)
|
||||
break;
|
||||
if (!MI.getFlag(MachineInstr::FrameSetup))
|
||||
collectClobberedRegisters(MI, TRI, Regs);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user