[llvm] r251904 - [X86] Generate .cfi_adjust_cfa_offset correctly when pushing arguments

Kreitzer, David L via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 4 15:07:26 PST 2015


I believe this is exactly the purpose of the -f[no-]asynchronous-unwind-tables option, which clang at least accepts. This is how gcc documents it:

-fasynchronous-unwind-tables
Generate unwind table in DWARF 2 format, if supported by target machine. The table is exact at each instruction boundary, so it can be used for stack unwinding from asynchronous events (such as debugger or garbage collector).

- Dave

From: Smith, Kevin B
Sent: Wednesday, November 04, 2015 11:19 AM
To: Kuperstein, Michael M; Rafael Espíndola; rnk at google.com; friss at apple.com; Kreitzer, David L
Cc: llvm-commits
Subject: RE: [llvm] r251904 - [X86] Generate .cfi_adjust_cfa_offset correctly when pushing arguments

+1 to Rafael’s comment.

From: Kuperstein, Michael M
Sent: Wednesday, November 04, 2015 7:32 AM
To: Rafael Espíndola; rnk at google.com<mailto:rnk at google.com>; friss at apple.com<mailto:friss at apple.com>; Kreitzer, David L; Smith, Kevin B
Cc: llvm-commits
Subject: RE: [llvm] r251904 - [X86] Generate .cfi_adjust_cfa_offset correctly when pushing arguments

Adding people who participated in the original review.

From: Rafael Espíndola [mailto:rafael.espindola at gmail.com]
Sent: Wednesday, November 04, 2015 14:46
To: Kuperstein, Michael M
Cc: llvm-commits
Subject: RE: [llvm] r251904 - [X86] Generate .cfi_adjust_cfa_offset correctly when pushing arguments


I would personally prefer to be precise by default and have a command line option to switch it off

Cheers,
Rafael
On Nov 3, 2015 12:13 PM, "Kuperstein, Michael M" <michael.m.kuperstein at intel.com<mailto:michael.m.kuperstein at intel.com>> wrote:
Sorry, I wasn't clear - when I said "always", I meant both -O2 and -Os -fomit-frame-pointers.
But "-Os -fomit-frame-pointers" isn't a configuration that's normally used, so I'm not entirely sure it was a conscious decision.

Anyway, if there's consensus that we need to always be precise, the code is already in place, we just need to flip the switch - but I'm afraid of the size impact.

-----Original Message-----
From: Rafael Espíndola [mailto:rafael.espindola at gmail.com<mailto:rafael.espindola at gmail.com>]
Sent: Tuesday, November 03, 2015 18:09
To: Kuperstein, Michael M
Cc: llvm-commits
Subject: Re: [llvm] r251904 - [X86] Generate .cfi_adjust_cfa_offset correctly when pushing arguments

On 3 November 2015 at 10:55, Kuperstein, Michael M <michael.m.kuperstein at intel.com<mailto:michael.m.kuperstein at intel.com>> wrote:
> GCC is always precise, but that seems unnecessary when we only care about performing unwinding for synchronous EH (since in this case, we only need to be right at call sites), and inflates the module size.
>
> It's actually a bit hard to compare apples-to-apples here, since for -O2, there's no definitely harm in emitting extra CFI, but clang doesn't use pushes, and for -Os, GCC defaults to -no-omit-frame-pointer, so the issue does not arise.

-Os -fomit-frame-pointers?

I think it is incorrect to say that we don't care about asynchronous unwinding (not exceptions). The .eh_frame is part of the ABI and any tool wanting to unwind can depend on it being precise.

Cheers,
Rafael
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151104/5a981011/attachment.html>


More information about the llvm-commits mailing list