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

Djordje Kovacevic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 19 11:08:14 PST 2017


djokov added a comment.

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())`.

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

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.
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).

BTW, the test in this patch came up from Reid's example attached to r317726.


Repository:
  rL LLVM

https://reviews.llvm.org/D40979





More information about the llvm-commits mailing list