<div dir="ltr">Adding Quentin here...<br><br><div class="gmail_quote"><div dir="ltr">On Wed, Apr 26, 2017 at 11:31 AM Carlo Kok <<a href="mailto:ck@remobjects.com">ck@remobjects.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
On 2017-04-26 19:56, Eric Christopher wrote:<br>
> That's really weird. I'm quite surprised that the entry block was moved<br>
> so much later in the function but haven't had a chance to look more at<br>
> it. Probably want to take a look and find out where that's happening and<br>
> why.<br>
<br>
From irc, thegameg helped me find the -enable-shrink-wrap=false, which<br>
"fixes" this, although this option doesn't seem to have a switch from<br>
code, only from the llc command line.<br>
<br></blockquote><div><br></div><div>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.</div><div><br></div><div>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...</div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Unless I'm missing something obvious, this will always screw up debug<br>
info on Windows 32bits.<br>
<br></blockquote><div><br></div><div>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.</div><div><br></div><div>Tricky.</div><div><br></div><div>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.</div><div><br></div><div>Adrian/Dave: Any other ideas here?</div><div><br></div><div>-eric</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The check in code to enable this calls:<br>
<br>
<br>
bool usesWindowsCFI() const {<br>
return ExceptionsType == ExceptionHandling::WinEH &&<br>
(WinEHEncodingType != WinEH::EncodingType::Invalid &&<br>
WinEHEncodingType != WinEH::EncodingType::X86);<br>
}<br>
<br>
Where EncodingType::X86: //Windows x86, uses no CFI, just EH tables<br>
<br>
The comment seems to imply there are EH tables for i386 Windows, however<br>
I can't find them.<br>
<br>
--<br>
Carlo Kok<br>
RemObjects Software<br>
</blockquote></div></div>