[PATCH] D40979: [DWARF] Allow duplication of tails with CFI instructions

Francis Visoiu Mistrih via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 19 15:21:17 PST 2017


thegameg added a comment.

In https://reviews.llvm.org/D40979#959827, @djokov wrote:

> The idea behind this code is to fix Linux (which uses DWARF) and leave Darwin (which uses compact-unwind) as-is. That's why `nonDuplicableInstruction` returns true if `(MBB->getParent()->getTarget().getTargetTriple().isOSDarwin())`.


Oh, I'm sorry, I misunderstood your intent.

> AArch64's `generateCompactUnwindEncoding` is part of Darwin's backend so it is not triggered with this change.

I agree.

> If we fix `generateCompactUnwindEncoding(Impl)` in ARM, AArch64 and x86 backends to fallback to DWARF when the info cannot fit into compact encoding, this change might be unnecessary.

I agree.

> Though even if we do that, I wonder whether we should leave the choice to users that they can require compact encoding even if that affects code generation (for example when object file size matters).

I think that is also a concern of emitting "correct" cfi directives in epilogues, right? Even on Linux it would have some size impact (and runtime slowdown in the unwinder) because we have more directives.


Repository:
  rL LLVM

https://reviews.llvm.org/D40979





More information about the llvm-commits mailing list