diff options
author | Juergen Ributzka <juergen@apple.com> | 2014-02-21 23:29:32 +0000 |
---|---|---|
committer | Juergen Ributzka <juergen@apple.com> | 2014-02-21 23:29:32 +0000 |
commit | 94f20bfe6e9de6a1c80c7bfe2dc77202c88847b4 (patch) | |
tree | 9c422b1403b0b4907af4412fb06a885410f710d9 /lib/CodeGen/PrologEpilogInserter.cpp | |
parent | 84ace05e8ce29d5831a0eb68b373ae1a1777c7cc (diff) | |
download | llvm-94f20bfe6e9de6a1c80c7bfe2dc77202c88847b4.tar.gz llvm-94f20bfe6e9de6a1c80c7bfe2dc77202c88847b4.tar.bz2 llvm-94f20bfe6e9de6a1c80c7bfe2dc77202c88847b4.tar.xz |
[Stackmaps] Move the target-independent frame index elimination for stackmaps and patchpoints into target-specific code.
The lowering of the frame index for stackmaps and patchpoints requires some
target-specific magic and should therefore be handled in the target-specific
eliminateFrameIndex method.
This is related to <rdar://problem/16106219>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201904 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/PrologEpilogInserter.cpp')
-rw-r--r-- | lib/CodeGen/PrologEpilogInserter.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/CodeGen/PrologEpilogInserter.cpp b/lib/CodeGen/PrologEpilogInserter.cpp index 1215e5a5d1..f93195625b 100644 --- a/lib/CodeGen/PrologEpilogInserter.cpp +++ b/lib/CodeGen/PrologEpilogInserter.cpp @@ -779,18 +779,15 @@ void PEI::replaceFrameIndices(MachineBasicBlock *BB, MachineFunction &Fn, // Frame indicies in debug values are encoded in a target independent // way with simply the frame index and offset rather than any // target-specific addressing mode. - if (MI->isDebugValue() || - MI->getOpcode() == TargetOpcode::STACKMAP || - MI->getOpcode() == TargetOpcode::PATCHPOINT) { - assert((!MI->isDebugValue() || i == 0) && - "Frame indicies can only appear as the first operand of a " - "DBG_VALUE machine instruction"); + if (MI->isDebugValue()) { + assert(i == 0 && "Frame indicies can only appear as the first " + "operand of a DBG_VALUE machine instruction"); unsigned Reg; - MachineOperand &Offset = MI->getOperand(i + 1); + MachineOperand &Offset = MI->getOperand(1); Offset.setImm(Offset.getImm() + TFI->getFrameIndexReference( - Fn, MI->getOperand(i).getIndex(), Reg)); - MI->getOperand(i).ChangeToRegister(Reg, false /*isDef*/); + Fn, MI->getOperand(0).getIndex(), Reg)); + MI->getOperand(0).ChangeToRegister(Reg, false /*isDef*/); continue; } |