mirror of
https://github.com/RPCSX/llvm.git
synced 2025-03-02 09:58:06 +00:00
LocalStackSlotAllocation: Turn one-iteration loop into if.
No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201974 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
46e8559826
commit
ddc8ff23af
@ -377,18 +377,11 @@ bool LocalStackSlotPass::insertFrameReferenceRegisters(MachineFunction &Fn) {
|
|||||||
// processed all FrameRefs before this one, just check whether or not
|
// processed all FrameRefs before this one, just check whether or not
|
||||||
// the next FrameRef will be able to reuse this new register. If not,
|
// the next FrameRef will be able to reuse this new register. If not,
|
||||||
// then don't bother creating it.
|
// then don't bother creating it.
|
||||||
bool CanReuse = false;
|
if (ref + 1 >= e ||
|
||||||
for (int refn = ref + 1; refn < e; ++refn) {
|
!lookupCandidateBaseReg(
|
||||||
FrameRef &FRN = FrameReferenceInsns[refn];
|
BaseOffset, FrameSizeAdjust,
|
||||||
MachineBasicBlock::iterator J = FRN.getMachineInstr();
|
FrameReferenceInsns[ref + 1].getLocalOffset(),
|
||||||
MachineInstr *MIN = J;
|
FrameReferenceInsns[ref + 1].getMachineInstr(), TRI)) {
|
||||||
|
|
||||||
CanReuse = lookupCandidateBaseReg(BaseOffset, FrameSizeAdjust,
|
|
||||||
FRN.getLocalOffset(), MIN, TRI);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!CanReuse) {
|
|
||||||
BaseOffset = PrevBaseOffset;
|
BaseOffset = PrevBaseOffset;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user