[PATCH] D32246: Don't emit CFI instructions at the end of a function

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 19 15:23:15 PDT 2017


MatzeB added inline comments.


================
Comment at: lib/CodeGen/AsmPrinter/AsmPrinter.cpp:941-947
+  auto *MBB = MI.getParent();
+  auto I = std::next(MI.getIterator());
+  while (I != MBB->end() && I->isCFIInstruction())
+    ++I;
+  if (I == MBB->instr_end() &&
+      MBB->getReverseIterator() == MBB->getParent()->rbegin())
+    return;
----------------
Should this look ignore MachineInstr::isTransient() instructions in general as they all shouldn't generate any actual machine code.


Repository:
  rL LLVM

https://reviews.llvm.org/D32246





More information about the llvm-commits mailing list