[llvm-dev] no-frame-pointer-elim & optimized
Eric Christopher via llvm-dev
llvm-dev at lists.llvm.org
Wed Apr 26 11:43:03 PDT 2017
Adding Quentin here...
On Wed, Apr 26, 2017 at 11:31 AM Carlo Kok <ck at remobjects.com> wrote:
>
>
> On 2017-04-26 19:56, Eric Christopher wrote:
> > That's really weird. I'm quite surprised that the entry block was moved
> > so much later in the function but haven't had a chance to look more at
> > it. Probably want to take a look and find out where that's happening and
> > why.
>
> From irc, thegameg helped me find the -enable-shrink-wrap=false, which
> "fixes" this, although this option doesn't seem to have a switch from
> code, only from the llc command line.
>
>
This is a good point. I've not overly thought about how shrink wrapping is
going to correlate with entry/exit blocks and prologues. That said, the
whole point of shrink wrapping is that the stack adjustments are hidden.
I'd have to page in that code to make more than a hand wavy "here's how
you'll fix this" though. More thoughts right below though...
> Unless I'm missing something obvious, this will always screw up debug
> info on Windows 32bits.
>
>
It's pretty much everywhere and just means that the debugger will have some
weird state until you actually hit that point. in the code. The problem is
that you probably want the debugger to stop at the "beginning" of the
function, but with shrink wrapping you won't have stack adjustments at all
for that code and if you wait and put the prologue end at the end of the
"stack adjustments" then you likely won't stop at all in the function.
Tricky.
At the moment I'm inclined to believe that this is "correct", but that we
really need a better way of distinguishing these entry points.
Adrian/Dave: Any other ideas here?
-eric
> The check in code to enable this calls:
>
>
> bool usesWindowsCFI() const {
> return ExceptionsType == ExceptionHandling::WinEH &&
> (WinEHEncodingType != WinEH::EncodingType::Invalid &&
> WinEHEncodingType != WinEH::EncodingType::X86);
> }
>
> Where EncodingType::X86: //Windows x86, uses no CFI, just EH tables
>
> The comment seems to imply there are EH tables for i386 Windows, however
> I can't find them.
>
> --
> Carlo Kok
> RemObjects Software
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170426/854925a2/attachment.html>
More information about the llvm-dev
mailing list