<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2015-08-18 4:35 GMT-07:00 Vikram TV <span dir="ltr"><<a href="mailto:vikram.tarikere@gmail.com" target="_blank">vikram.tarikere@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">tvvikram added inline comments.<br>
<br>
================<br>
</span><span class="">Comment at: test/DebugInfo/extend-debug-range.ll:1<br>
@@ +1,2 @@<br>
+; RUN: llc -print-machineinstrs=dbgval-fixup %s 2>&1 | FileCheck %s<br>
+<br>
----------------<br>
</span>arphaman wrote:<br>
<span class="">> tvvikram wrote:<br>
> > I am checking the generated machine instructions after the new pass to check for propagated debug ranges. But llc will also generate the .s file. Now, I tried using -stop-after option to llc, but it still generates the .s file.<br>
</span><span class="">> If you would like to test just the individual DebugValueFixup pass, you can use the new 'run-pass' option in llc. The run-pass option expects an MIR file as input. MIR files contain the serialized machine instructions. I'm still working on the documentation for this format, but you can take a look at the current docs at <a href="http://llvm.org/docs/MIRLangRef.html" rel="noreferrer" target="_blank">http://llvm.org/docs/MIRLangRef.html</a>.<br>
><br>
> To generate an input MIR file for this test, you can use the 'stop-after' option with llc. You can pass the current 'extend-debug-range.ll' file directly to it and llc will print the MIR into stdout. You have to specify a name of a pass that runs before the DebugValueFixup for the 'stop-after' option. I see that the DebugValueFixup pass should run after the StackMapLivenessAnalysis pass, so you can obtain the MIR input file by running the following command:<br>
><br>
>     llc -stop-after stackmap-liveness extend-debug-range.ll -o /dev/null > debug-value-fixup.mir<br>
><br>
> The generated MIR input file will be target dependent, so you will have to place the test in the appropriate target directory in test/CodeGen.<br>
><br>
> After you've generated an input MIR file, you can transform it into an actual test that tests your pass.<br>
> You can use a RUN line similar to this:<br>
><br>
>      RUN: llc -o /dev/null -run-pass=dbgval-fixup -march=??? %s | FileCheck %s<br>
><br>
> When running this test case, llc will print the produced MIR with the machine instructions that were transformed by your pass directly to stdout.<br>
</span>I tried the above commands but I keep getting the following error with the second command:<br>
<br>
<br>
```<br>
$llc -run-pass=extend-dbg-range-loc -march=x86-64 d.mir -o /dev/null<br>
error: d.mir:172:76: expected an implicit register operand 'implicit-def %eflags'<br>
    dead %eax = XOR32rr undef %eax, undef %eax, implicit-def dead %eflags, implicit-def %al, debug-location !25<br>
```<br></blockquote><div><br></div><div>This bug should be fixed by r<span style="font-size:13px;line-height:normal">245315, can you please try again?</span></div><div><span style="font-size:13px;line-height:normal">Thanks again,</span></div><div><span style="font-size:13px;line-height:normal">Alex</span></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
[Please note that the pass has been renamed to extend-dbg-range-loc]<br>
<br>
<br>
<a href="http://reviews.llvm.org/D11933" rel="noreferrer" target="_blank">http://reviews.llvm.org/D11933</a><br>
<br>
<br>
<br>
</blockquote></div><br></div></div>