<div dir="ltr">Yes, that one crashes for me for every architecture I tried except the experimental AVR target — which doesn't support dwarf.<div><br></div><div><p style="margin:0px;font-size:9px;font-family:Monaco">        .file   "hello.deb.ll"</p>

<p style="margin:0px;font-size:9px;font-family:Monaco">        .text</p>
<p style="margin:0px;font-size:9px;font-family:Monaco">        .globl  main</p>
<p style="margin:0px;font-size:9px;font-family:Monaco">        .align  2</p>
<p style="margin:0px;font-size:9px;font-family:Monaco">        .type   main,@function</p>
<p style="margin:0px;font-size:9px;font-family:Monaco">main:                                   ; @main</p>
<p style="margin:0px;font-size:9px;font-family:Monaco">; BB#0:                                 ; %entry</p>
<p style="margin:0px;font-size:9px;font-family:Monaco">        ldi     r24, lo8(.L.str)</p>
<p style="margin:0px;font-size:9px;font-family:Monaco">        ldi     r25, hi8(.L.str)</p>
<p style="margin:0px;font-size:9px;font-family:Monaco">        push    r25</p>
<p style="margin:0px;font-size:9px;font-family:Monaco">        push    r24</p>
<p style="margin:0px;font-size:9px;font-family:Monaco">        call    printf</p>
<p style="margin:0px;font-size:9px;font-family:Monaco">        in      r30, 61</p>
<p style="margin:0px;font-size:9px;font-family:Monaco">        in      r31, 62</p>
<p style="margin:0px;font-size:9px;font-family:Monaco">        adiw    r30, 2</p>
<p style="margin:0px;font-size:9px;font-family:Monaco">        in      r0, 63</p>
<p style="margin:0px;font-size:9px;font-family:Monaco">        cli</p>
<p style="margin:0px;font-size:9px;font-family:Monaco">        out     62, r31</p>
<p style="margin:0px;font-size:9px;font-family:Monaco">        out     63, r0</p>
<p style="margin:0px;font-size:9px;font-family:Monaco">        out     61, r30</p>
<p style="margin:0px;font-size:9px;font-family:Monaco">        ldi     r22, 1</p>
<p style="margin:0px;font-size:9px;font-family:Monaco">        ldi     r23, 0</p>
<p style="margin:0px;font-size:9px;font-family:Monaco">        ldi     r24, 0</p>
<p style="margin:0px;font-size:9px;font-family:Monaco">        ldi     r25, 0</p>
<p style="margin:0px;font-size:9px;font-family:Monaco">        ret</p>
<p style="margin:0px;font-size:9px;font-family:Monaco">.Ltmp0:</p>
<p style="margin:0px;font-size:9px;font-family:Monaco">        .size   main, .Ltmp0-main</p>
<p style="margin:0px;font-size:9px;font-family:Monaco;min-height:12px"><br></p>
<p style="margin:0px;font-size:9px;font-family:Monaco">        .type   .L.str,@object          ; @.str</p>
<p style="margin:0px;font-size:9px;font-family:Monaco">        .section        .rodata.str1.1,"aMS",@progbits,1</p>
<p style="margin:0px;font-size:9px;font-family:Monaco">.L.str:</p>
<p style="margin:0px;font-size:9px;font-family:Monaco">        .asciz  "Hello World"</p>
<p style="margin:0px;font-size:9px;font-family:Monaco">        .size   .L.str, 12</p></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, May 19, 2014 at 5:59 PM, shruti padmanabha <span dir="ltr"><<a href="mailto:shrupad@umich.edu" target="_blank">shrupad@umich.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Oops, I didn't attach the .ll file after the -debug-ir pass. Adding it here. <div><br></div></div><div class="HOEnZb">
<div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, May 19, 2014 at 1:55 AM, shruti padmanabha <span dir="ltr"><<a href="mailto:shrupad@umich.edu" target="_blank">shrupad@umich.edu</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>Compiling for both x86 and ARM with llc aborts after this pass. </div><div>I have a simple helloworld.c program. </div>


<div><br></div><div>I am attaching the .ll file created by:</div>
<div><i>clang -O3 -g -emit-llvm hello.c -c -o hello.bc</i><br></div><div><i>llvm-dis hello.bc<br></i></div><div><i><br></i></div><div>Thanks again for the response!</div><span><font color="#888888"><div>Shruti</div>

</font></span></div><div><div><div class="gmail_extra"><br>
<br><div class="gmail_quote">On Mon, May 19, 2014 at 1:28 AM, Tobias Grosser <span dir="ltr"><<a href="mailto:tobias@grosser.es" target="_blank">tobias@grosser.es</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div>On 19/05/2014 00:54, shruti padmanabha wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
Hi,<br>
<br>
Thanks for the pointer. I am unfortunately running into llc problems with<br>
this pass.<br>
I did<br></div>
*opt  -debug-ir   hello.bc -o hello.deb.bc*<br>
<br>
*llc -march=arm -debug  -O0 hello.deb.bc  -o hello.deb.s*<div><br>
<br>
This is aborting with the error: llc:<br>
llvm-3.4/lib/CodeGen/<u></u>AsmPrinter/DwarfDebug.cpp:<u></u>1614: void<br>
llvm::DwarfDebug::<u></u>beginFunction(const llvm::MachineFunction*): Assertion<br>
`TheCU && "Unable to find compile unit!"' failed.<br>
I'm assuming this is because llc found some errors in the metadata that<br>
debug-ir prints out. How do I find and correct this?<br>
</div></blockquote>
<br>
This is indeed surprising. I have no idea where this is coming from. Does this only happen on ARM? Can you attach the debug.bc file? Or even better, open a bug report for that?<br>
<br>
I included Daniel who committed the -debug-ir pass as well as Eric who has better knowledge about debug info than me.<br>
<br>
Cheers,<br>
Tobisa<br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br></div>