This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Enable -funwind-tables by default on powerpc
AbandonedPublic

Authored by stefanp on Aug 17 2018, 9:54 AM.

Details

Summary

This is related to the bug

https://bugs.llvm.org/show_bug.cgi?id=32611

As shown in the above bug some functions with the nounwind attribute still require unwind tables. Using the uwtable attribute fixes that issue.
At this point this patch changes the default behaviour on ppc linux to add the uwtable attribute on all functions.

Diff Detail

Event Timeline

stefanp created this revision.Aug 17 2018, 9:54 AM

Interesting. Why? Does this effectively match GCC's behavior?

Also, if you know, should this actually be the default behavior for all targets? I'm somewhat surprised if x86 and PPC are special cases.

GCC does call the exception handler correctly for this example. However, it does not (at least not that I can tell) have a default option like the one llvm uses -funwind-tables.

The default behaviour for IsUnwindTablesDefault is to return false for all targets. I can only assume that this is incorrect on all targets since all of this is handled in target indep code. However, x86 and ppc are the only machines I have access to test on.

stefanp abandoned this revision.Aug 20 2018, 11:38 AM

Determined this is not the correct way to solve this problem.
Going to abandon this change.