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

Djordje Kovacevic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 20 11:11:49 PST 2017


djokov added a comment.

Ok, then I would suggest that instead of this code we

1. make CFI instructions duplicable;
2. let TailDuplicator::shouldTailDuplicate return false for CFI and Darwin,

or better yet -

3. fix generateCompactUnwindEncoding in ARM, AArch64 and x86 backends to fallback to DWARF when the info cannot fit into compact encoding.

Still, we should probably use 3. only for corner cases like Reid's example.

If I'm not missing something, if we used it for CFI instructions in epilogue (which will start appearing when Violeta resubmits r317579) then practically every function would fallback to DWARF so compact unwind would become quite meaningless.

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

I guess emitting CFI directives in epilogues won't impact file size on Linux because it already uses DWARF, but it would impact it on Darwin if compact unwinder would fallback to DWARF for every function.


Repository:
  rL LLVM

https://reviews.llvm.org/D40979





More information about the llvm-commits mailing list