Hi Jakob,<div><br></div><div>I've got a good test case that I'm working on at the moment. I noticed something odd though: Is '0' a valid register unit? I'm seeing a LiveInterval with li->reg == 0 show up, which previously wasn't valid. We have a few checks around the place to disregard the '0' physreg - could these trigger on interaction with a '0' interval? That could introduce some subtle bugs.</div>
<div><br></div><div>Cheers,</div><div>Lang.<br><br><div class="gmail_quote">On Wed, Sep 5, 2012 at 4:07 AM, Jakob Stoklund Olesen <span dir="ltr"><<a href="mailto:stoklund@2pi.dk" target="_blank">stoklund@2pi.dk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><br>
On Sep 2, 2012, at 11:52 PM, Lang Hames <<a href="mailto:lhames@gmail.com">lhames@gmail.com</a>> wrote:<br>
<br>
> Hi Sergei,<br>
><br>
> I just fixed the broken test case for PR13719 with r163107, but from the debugging output you've posted it suspect it won't fix your test case.<br>
><br>
> Your analysis looks good - findLastUseBefore(..) doesn't appear to be handling physregs. I'm surprised that isn't causing more failures. I'll see if I can find a failing case in the LLVM test-suite (it's been a while since I ran live-interval-update over all of it) and try out your modifications to findLastUseBefore.<br>

<br>
</div>I think Sergei's analysis is correct, but you probably don't want to be scanning use-def chains for physregs. You are pretty much guaranteed to visit the entire function.<br>
<br>
Physreg live ranges are usually short. It would be better to scan instructions instead of use-def chains for physregs.<br>
<span class="HOEnZb"><font color="#888888"><br>
/jakob<br>
<br>
</font></span></blockquote></div><br></div>