aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/X86/X86CallFrameOptimization.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2017-06-29 13:58:24 +0000
committerDaniel Jasper <djasper@google.com>2017-06-29 13:58:24 +0000
commit559aa75382e941a1c0c2fc5724d5274c20f2adf8 (patch)
treec8f215d8add480f68484fcc2ef8043b94f967598 /llvm/lib/Target/X86/X86CallFrameOptimization.cpp
parent8a44b7be76f35f26d56327952bd133a48c07f301 (diff)
downloadllvm-559aa75382e941a1c0c2fc5724d5274c20f2adf8.zip
llvm-559aa75382e941a1c0c2fc5724d5274c20f2adf8.tar.gz
llvm-559aa75382e941a1c0c2fc5724d5274c20f2adf8.tar.bz2
Revert "r306529 - [X86] Correct dwarf unwind information in function epilogue"
I am 99% sure that this breaks the PPC ASAN build bot: http://lab.llvm.org:8011/builders/sanitizer-ppc64be-linux/builds/3112/steps/64-bit%20check-asan/logs/stdio If it doesn't go back to green, we can recommit (and fix the original commit message at the same time :) ). llvm-svn: 306676
Diffstat (limited to 'llvm/lib/Target/X86/X86CallFrameOptimization.cpp')
-rw-r--r--llvm/lib/Target/X86/X86CallFrameOptimization.cpp18
1 files changed, 5 insertions, 13 deletions
diff --git a/llvm/lib/Target/X86/X86CallFrameOptimization.cpp b/llvm/lib/Target/X86/X86CallFrameOptimization.cpp
index a7d157b..765af67d 100644
--- a/llvm/lib/Target/X86/X86CallFrameOptimization.cpp
+++ b/llvm/lib/Target/X86/X86CallFrameOptimization.cpp
@@ -234,12 +234,6 @@ bool X86CallFrameOptimization::runOnMachineFunction(MachineFunction &MF) {
assert(isPowerOf2_32(SlotSize) && "Expect power of 2 stack slot size");
Log2SlotSize = Log2_32(SlotSize);
- // Set initial incoming and outgoing cfa offset and register values for basic
- // blocks. This is done here because this pass runs before PEI and can insert
- // CFI instructions.
- // TODO: Find a better solution to this problem.
- TFL->initializeCFIInfo(MF);
-
if (skipFunction(*MF.getFunction()) || !isLegal(MF))
return false;
@@ -542,13 +536,11 @@ void X86CallFrameOptimization::adjustCallSequence(MachineFunction &MF,
// For debugging, when using SP-based CFA, we need to adjust the CFA
// offset after each push.
// TODO: This is needed only if we require precise CFA.
- if (!TFL->hasFP(MF)) {
- TFL->BuildCFI(MBB, std::next(Push), DL,
- MCCFIInstruction::createAdjustCfaOffset(nullptr, SlotSize));
- // Update the CFI information for MBB and it's successors.
- MBB.updateCFIInfo(std::next(Push));
- MBB.updateCFIInfoSucc();
- }
+ if (!TFL->hasFP(MF))
+ TFL->BuildCFI(
+ MBB, std::next(Push), DL,
+ MCCFIInstruction::createAdjustCfaOffset(nullptr, SlotSize));
+
MBB.erase(MOV);
}