Hi Susan,<div><br></div><div>Jakob pointed out to me that the Gcra.cpp allocator doesn't record basic-block live-ins, which are used by the verifier to check correctness.</div><div><br></div><div>You can record which variables are live into a basic block with MachineBasicBlock::addLiveIn(unsigned physReg). I don't know the verifier well, but if it's using other built in infrastructure for register allocation then it may not be a good fit for your allocator.</div>
<div><br></div><div>I'll try to find time to look at the example files you sent in the next couple of days.</div><div><br></div><div>Cheers,</div><div>Lang.</div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Thu, Nov 15, 2012 at 5:21 PM, Susan Horwitz <span dir="ltr"><<a href="mailto:horwitz@cs.wisc.edu" target="_blank">horwitz@cs.wisc.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Well, now I can't reproduce what I thought I had before (an example that works fine with your code except when using that flag).  I do have a small example that works fine with *my* code except when using that flag.  I've attached the source (.c), the assembly that my code produces w/o using the "verify" flag (.s), the output of trying to create assembly *with* the "verify" flag (.out), and the .bc file used as input to my register allocator.  If you can identify a problem by looking at these files, that would be great!<br>

<br>
I can supply my register allocator if you'd like to have it, but it involves a number of (longish) files.<br>
<br>
Thanks for any insights you can provide on this!<br>
<br>
Susan<div class="im"><br>
<br>
<br>
On 11/15/2012 06:45 PM, Lang Hames wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
Hi Susan,<br>
<br>
To my knowledge the verifier doesn't produce false positives with any of<br>
the in-tree allocators. If it is raising an error that is worth<br>
investigating. Is it raising an error on any simple test cases? Can you<br>
share the failing case?<br>
<br>
- Lang.<br>
<br>
<br>
On Thu, Nov 15, 2012 at 2:44 PM, Susan Horwitz <<a href="mailto:horwitz@cs.wisc.edu" target="_blank">horwitz@cs.wisc.edu</a><br></div><div class="im">
<mailto:<a href="mailto:horwitz@cs.wisc.edu" target="_blank">horwitz@cs.wisc.edu</a>>> wrote:<br>
<br>
    I tried using this flag and it gave me errors on code that otherwise<br>
    assembles and runs just fine (using the version of Gcra.cpp that<br>
    Lang wrote).  So I'm wondering if I should really be using the flag?<br>
      I'm using it like this:<br>
<br>
    llc -verify-machineinstrs -load Debug/lib/P4.so -regalloc=gc xxx.bc<br>
<br>
    Susan<br>
<br>
<br>
<br>
    On 11/15/2012 01:13 PM, Jakob Stoklund Olesen wrote:<br>
<br>
<br>
        On Nov 15, 2012, at 7:53 AM, Susan Horwitz<<a href="mailto:horwitz@cs.wisc.edu" target="_blank">horwitz@cs.wisc.edu</a><br></div>
        <mailto:<a href="mailto:horwitz@cs.wisc.edu" target="_blank">horwitz@cs.wisc.edu</a>>><div class="im"><br>
        wrote:<br>
<br>
            Lang -<br>
<br>
            Attached is a new example for which I still get assembler<br>
            errors.<br>
<br>
            Susan<br>
<br>
<br>
        Hi Susan,<br>
<br>
        You should never be getting assembler errors if 'llc<br>
        -verify-machineinstrs' approves of your machine code. It might give<br>
        you better error messages than the assembler.<br>
<br>
        /jakob<br>
<br>
<br>
<br>
</div></blockquote>
<br>
</blockquote></div><br></div>