<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Lang,<br>
<br>
I'm surprised about the fact that you omit R1/R2 reductions in some
cases.<br>
Can you give a more detailed description of the bug (e.g. a PBQP dump)?<br>
<br>
Best regards,<br>
Sebastian<br>
<br>
Lang Hames wrote:
<blockquote
 cite="mid:728927c71001252058r5958e481g44b085a04a8732@mail.gmail.com"
 type="cite">
  <pre wrap="">Hi Sachin, llvm-dev,

I've just committed a new PBQP solver which, among other things,
should take care of this bug.

Please let me know how it works out for you.

Cheers,
Lang.


On Tue, Dec 15, 2009 at 5:54 PM, Lang Hames <a
 class="moz-txt-link-rfc2396E" href="mailto:lhames@gmail.com"><lhames@gmail.com></a> wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Hi Sachin,

Yes. Bernhard Scholz and I have just discussed a fix for this. I hope to
commit it in the next few days. I will let you know as soon as it goes in to
the mainline.

Regards,
Lang.

On Tue, Dec 15, 2009 at 5:34 PM, <a class="moz-txt-link-rfc2396E"
 href="mailto:Sachin.Punyani@microchip.com"><Sachin.Punyani@microchip.com></a> wrote:
    </pre>
    <blockquote type="cite">
      <pre wrap="">Hi Lang,

Thanks for your inputs on the problem. I was just curious to know if you
got any opportunity to work on the solution for this.

Regards
Sachin

      </pre>
      <blockquote type="cite">
        <pre wrap="">-----Original Message-----
From: <a class="moz-txt-link-abbreviated"
 href="mailto:llvmdev-bounces@cs.uiuc.edu">llvmdev-bounces@cs.uiuc.edu</a> [<a
 class="moz-txt-link-freetext" href="mailto:llvmdev-bounces@cs.uiuc.edu">mailto:llvmdev-bounces@cs.uiuc.edu</a>]
On
Behalf Of <a class="moz-txt-link-abbreviated"
 href="mailto:Sachin.Punyani@microchip.com">Sachin.Punyani@microchip.com</a>
Sent: Tuesday, November 17, 2009 12:00 PM
Subject: Re: [LLVMdev] Crash in PBQP register allocator

Thanks Lang!

I think we can use linear scan as work around for short term.

Thanks for your help.

Regards
Sachin

        </pre>
        <blockquote type="cite">
          <pre wrap="">-----Original Message-----
From: Lang Hames [<a class="moz-txt-link-freetext"
 href="mailto:lhames@gmail.com">mailto:lhames@gmail.com</a>]
Sent: Sunday, November 15, 2009 10:08 AM
To: Sachin Punyani - I00202
Cc: <a class="moz-txt-link-abbreviated"
 href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a>
Subject: Re: [LLVMdev] Crash in PBQP register allocator

Hi Sachin,

Confirmed: This is being caused by a subtle issue in the heuristic
PBQP solver. Specifically: R1/R2 reductions as currently implemented
can, on rare occasions, lead to the heuristic solver failing to find a
finite cost solution, even though one exists. The infinite cost
solution will always be in violation of some rule of register
allocation (failing to handle an interference, or spilling an infinite
cost node for instance).

There are several ways to fix the issue with the solver, but most
would pesimmize allocation quality in the general case. I will look
for a better solution when I return to the University of Sydney in a
couple of weeks. In the mean time I have added an assert to the
allocator to ensure that infinite cost solutions do not produce
miscompilations. For programs which trigger the assert you'll just
have to fall back on linear scan I'm afraid.

(If you particularly want PBQP to work in the short term you could
apply the following fix: Simply pre-color all infinite cost intervals
and remove the register option from any live intervals with which they
interfere).

Cheers,
Lang.

On Thu, Nov 12, 2009 at 4:29 PM, Lang Hames <a
 class="moz-txt-link-rfc2396E" href="mailto:lhames@gmail.com"><lhames@gmail.com></a> wrote:
          </pre>
          <blockquote type="cite">
            <pre wrap="">This looks like a bug in the PBQP solver. I'm currently
investigating.

Cheers,
Lang.

On Thu, Nov 12, 2009 at 12:46 AM,  <a class="moz-txt-link-rfc2396E"
 href="mailto:Sachin.Punyani@microchip.com"><Sachin.Punyani@microchip.com></a>
            </pre>
          </blockquote>
        </blockquote>
        <pre wrap="">wrote:
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <pre wrap="">Hi,



Please see the two ".ll' files attached.



Command line used

llc -march=pic16  -pre-RA-sched=list-burr -regalloc=pbqp new.obc



The above test case crashes only when I use the combination of
list-
              </pre>
            </blockquote>
          </blockquote>
          <pre wrap="">burr
          </pre>
          <blockquote type="cite">
            <blockquote type="cite">
              <pre wrap="">scheduler and pbqp register allocator. If any of them (scheduler or
              </pre>
            </blockquote>
          </blockquote>
          <pre wrap="">register
          </pre>
          <blockquote type="cite">
            <blockquote type="cite">
              <pre wrap="">allocator) is replaced with some alternate then I don't see the
              </pre>
            </blockquote>
          </blockquote>
        </blockquote>
        <pre wrap="">crash.
        </pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <blockquote type="cite">
              <pre wrap="">I could not figure out the reason. Please provide some pointers to
              </pre>
            </blockquote>
          </blockquote>
          <pre wrap="">reasons
          </pre>
          <blockquote type="cite">
            <blockquote type="cite">
              <pre wrap="">of the crash.



Regards

Sachin

_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a
 class="moz-txt-link-freetext" href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a>
<a class="moz-txt-link-freetext"
 href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>


              </pre>
            </blockquote>
          </blockquote>
        </blockquote>
        <pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a
 class="moz-txt-link-freetext" href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a>
<a class="moz-txt-link-freetext"
 href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>
        </pre>
      </blockquote>
    </blockquote>
    <pre wrap="">    </pre>
  </blockquote>
  <pre wrap=""><!---->
_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a
 class="moz-txt-link-freetext" href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a>
<a class="moz-txt-link-freetext"
 href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>

  </pre>
</blockquote>
<br>
</body>
</html>