diff options
author | Hans Wennborg <hans@hanshq.net> | 2016-03-31 18:33:38 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2016-03-31 18:33:38 +0000 |
commit | e1a2e90ffadd810ef6bd580e90b42a83958dfc11 (patch) | |
tree | ab342aa8c1dafe2bfd02a92e89b084c34cb29f77 /llvm/lib/Target/Mips/MipsFrameLowering.cpp | |
parent | 19cb9476a2beea3ed33bf001080e73de1d3b7220 (diff) | |
download | llvm-e1a2e90ffadd810ef6bd580e90b42a83958dfc11.zip llvm-e1a2e90ffadd810ef6bd580e90b42a83958dfc11.tar.gz llvm-e1a2e90ffadd810ef6bd580e90b42a83958dfc11.tar.bz2 |
Change eliminateCallFramePseudoInstr() to return an iterator
This will become necessary in a subsequent change to make this method
merge adjacent stack adjustments, i.e. it might erase the previous
and/or next instruction.
It also greatly simplifies the calls to this function from Prolog-
EpilogInserter. Previously, that had a bunch of logic to resume iteration
after the call; now it just continues with the returned iterator.
Note that this changes the behaviour of PEI a little. Previously,
it attempted to re-visit the new instruction created by
eliminateCallFramePseudoInstr(). That code was added in r36625,
but I can't see any reason for it: the new instructions will obviously
not be pseudo instructions, they will not have FrameIndex operands,
and we have already accounted for the stack adjustment.
Differential Revision: http://reviews.llvm.org/D18627
llvm-svn: 265036
Diffstat (limited to 'llvm/lib/Target/Mips/MipsFrameLowering.cpp')
-rw-r--r-- | llvm/lib/Target/Mips/MipsFrameLowering.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/Mips/MipsFrameLowering.cpp b/llvm/lib/Target/Mips/MipsFrameLowering.cpp index 2db0b9b..c53b96c 100644 --- a/llvm/lib/Target/Mips/MipsFrameLowering.cpp +++ b/llvm/lib/Target/Mips/MipsFrameLowering.cpp @@ -143,7 +143,7 @@ uint64_t MipsFrameLowering::estimateStackSize(const MachineFunction &MF) const { } // Eliminate ADJCALLSTACKDOWN, ADJCALLSTACKUP pseudo instructions -void MipsFrameLowering:: +MachineBasicBlock::iterator MipsFrameLowering:: eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator I) const { unsigned SP = STI.getABI().IsN64() ? Mips::SP_64 : Mips::SP; @@ -156,5 +156,5 @@ eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, STI.getInstrInfo()->adjustStackPtr(SP, Amount, MBB, I); } - MBB.erase(I); + return MBB.erase(I); } |