diff options
author | Serge Pavlov <sepavloff@gmail.com> | 2017-04-13 14:10:52 +0000 |
---|---|---|
committer | Serge Pavlov <sepavloff@gmail.com> | 2017-04-13 14:10:52 +0000 |
commit | 49acf9c8ebba8deada0d22524c0482848d5de486 (patch) | |
tree | 38056d09a32f30bd2cdf9f6f5ddbdf6c65631bb5 /llvm/lib/Target/X86/X86FrameLowering.cpp | |
parent | e32a66b2de3ce7dec25f32b46974880b9ce20875 (diff) | |
download | bcm5719-llvm-49acf9c8ebba8deada0d22524c0482848d5de486.tar.gz bcm5719-llvm-49acf9c8ebba8deada0d22524c0482848d5de486.zip |
Use methods to access data stored with frame instructions
Instructions CALLSEQ_START..CALLSEQ_END and their target dependent
counterparts keep data like frame size, stack adjustment etc. These
data are accessed by getOperand using hard coded indices. It is
error prone way. This change implements the access by special methods,
which improve readability and allow changing data representation without
massive changes of index values.
Differential Revision: https://reviews.llvm.org/D31953
llvm-svn: 300196
Diffstat (limited to 'llvm/lib/Target/X86/X86FrameLowering.cpp')
-rw-r--r-- | llvm/lib/Target/X86/X86FrameLowering.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86FrameLowering.cpp b/llvm/lib/Target/X86/X86FrameLowering.cpp index fc5c9ac2e25..78e0bca4158 100644 --- a/llvm/lib/Target/X86/X86FrameLowering.cpp +++ b/llvm/lib/Target/X86/X86FrameLowering.cpp @@ -2626,8 +2626,8 @@ eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, unsigned Opcode = I->getOpcode(); bool isDestroy = Opcode == TII.getCallFrameDestroyOpcode(); DebugLoc DL = I->getDebugLoc(); - uint64_t Amount = !reserveCallFrame ? I->getOperand(0).getImm() : 0; - uint64_t InternalAmt = (isDestroy || Amount) ? I->getOperand(1).getImm() : 0; + uint64_t Amount = !reserveCallFrame ? TII.getFrameSize(*I) : 0; + uint64_t InternalAmt = (isDestroy || Amount) ? TII.getFrameAdjustment(*I) : 0; I = MBB.erase(I); auto InsertPos = skipDebugInstructionsForward(I, MBB.end()); |