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

Kuperstein, Michael M via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 3 07:55:43 PST 2015


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.

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

> +  // Returns true if we need to generate precise CFI. Currently  // 
> + this is equivalent to hasDebugInfo(), but if we ever implement  // 
> + async EH, it will require precise CFI as well.
> +  bool usePreciseUnwindInfo() const { return hasDebugInfo(); }

What does gcc do in here?

Part of the idea behind .eh_frame is that it is always be possible to unwind the stack without requiring a base register. It seems strange to have imprecise information in it.

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.


More information about the llvm-commits mailing list