[PATCH] D42848: Correct dwarf unwind information in function epilogue

Violeta Vukobrat via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 21 07:46:18 PST 2018


violetav added inline comments.


================
Comment at: lib/CodeGen/BranchFolding.cpp:300
+///  Whether MI should be counted as an instruction when calculating common tail.
+static bool countsAsInstruction(const MachineInstr &MI) {
+  return !(MI.isDebugValue() || MI.isCFIInstruction());
----------------
aprantl wrote:
> This should probably be `!isMetaInstruction()`?
It sounds reasonable that other pseudo instructions shouldn't affect the decisions concerning tail merging. However, currently there is a lack of support required for their merging. I am not familiar with how these instructions should be handled; should they be part of the common tail if they exist in some but not all blocks that share that tail, etc. As this patch is concerned with adding CFI instructions in epilogue, I thought I'd rather leave out the support for merging other pseudo instructions for some other patch.


Repository:
  rL LLVM

https://reviews.llvm.org/D42848





More information about the llvm-commits mailing list