diff options
author | Michael Kuperstein <michael.m.kuperstein@intel.com> | 2014-12-09 06:10:44 +0000 |
---|---|---|
committer | Michael Kuperstein <michael.m.kuperstein@intel.com> | 2014-12-09 06:10:44 +0000 |
commit | c69bb43f35cc89a758ed5569d28b2fa6f83a80d2 (patch) | |
tree | ad396f19032250316d5965267e19ecab6825e558 /llvm/lib/Target/X86/X86FrameLowering.h | |
parent | 598bd05bd772c968c42ce64ea2bce92c32916ca0 (diff) | |
download | bcm5719-llvm-c69bb43f35cc89a758ed5569d28b2fa6f83a80d2.tar.gz bcm5719-llvm-c69bb43f35cc89a758ed5569d28b2fa6f83a80d2.zip |
[X86] Convert esp-relative movs of function arguments into pushes, step 1
This handles the simplest case for mov -> push conversion:
1. x86-32 calling convention, everything is passed through the stack.
2. There is no reserved call frame.
3. Only registers or immediates are pushed, no attempt to combine a mem-reg-mem sequence into a single PUSHmm.
Differential Revision: http://reviews.llvm.org/D6503
llvm-svn: 223757
Diffstat (limited to 'llvm/lib/Target/X86/X86FrameLowering.h')
-rw-r--r-- | llvm/lib/Target/X86/X86FrameLowering.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86FrameLowering.h b/llvm/lib/Target/X86/X86FrameLowering.h index 2ee71159c19..ee0ee227cad 100644 --- a/llvm/lib/Target/X86/X86FrameLowering.h +++ b/llvm/lib/Target/X86/X86FrameLowering.h @@ -76,6 +76,16 @@ public: void eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator MI) const override; + +private: + /// convertArgMovsToPushes - This method tries to convert a call sequence + /// that uses sub and mov instructions to put the argument onto the stack + /// into a series of pushes. + /// Returns true if the transformation succeeded, false if not. + bool convertArgMovsToPushes(MachineFunction &MF, + MachineBasicBlock &MBB, + MachineBasicBlock::iterator I, + uint64_t Amount) const; }; } // End llvm namespace |