From e1a2e90ffadd810ef6bd580e90b42a83958dfc11 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Thu, 31 Mar 2016 18:33:38 +0000 Subject: 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 --- llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.h') diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.h b/llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.h index 0422e1f20e1..e20fc5df744 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.h +++ b/llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.h @@ -34,7 +34,7 @@ class WebAssemblyFrameLowering final : public TargetFrameLowering { /*TransientStackAlignment=*/16, /*StackRealignable=*/true) {} - void eliminateCallFramePseudoInstr( + MachineBasicBlock::iterator eliminateCallFramePseudoInstr( MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator I) const override; -- cgit v1.2.3