Page MenuHomePhabricator

[AArch64] Enable unwind tables by default for Gnu targets
Needs ReviewPublic

Authored by tellenbach on Sep 26 2019, 2:36 AM.

Details

Summary

Currently the following situation can occur: During AArch64 frame lowering cfi instructions get emitted if debug information is generated but not if not. Since cfi instructions act as scheduling boundaries during instruction scheduling this leads to different scheduling regions and therefore different assembly depending on whether debug information is generated or not.

This patch fixes this problem by enabling unwind tables by default on AArch64 when compiling for a Gnu targets.

Diff Detail

Event Timeline

tellenbach created this revision.Sep 26 2019, 2:36 AM

Please also see the ongoing discussion on the mailing list: http://lists.llvm.org/pipermail/llvm-dev/2019-September/135433.html

Can we add a test to verify cfi instructions are present without debug flag.

This patch would fix PR37240 but is probably not the most optimal solution. For other ideas see http://lists.llvm.org/pipermail/llvm-dev/2019-September/135433.html. I'll leave this patch open until other possibilities have been accepted or abandoned and will abandon or fix this patch then.

do we have a plan to follow up on this patch?

do we have a plan to follow up on this patch?

Hi! I'm currently not working on this (and LLVM in general) anymore. However, the issue seems to be still present and this patch would fix it. I have in mind that I've checked GCC recently and they seem to do something similar. I can check again but will probably take some time.

Thanks for bringing this up again!

cc: @t.p.northover does this fix look reasonable for PR37240?