On Thu, Oct 21, 2010 at 8:56 AM, Devang Patel <span dir="ltr"><<a href="mailto:dpatel@apple.com">dpatel@apple.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div style="word-wrap:break-word"><div class="im"><br><div><div>On Oct 20, 2010, at 10:49 PM, Talin wrote:</div><br><blockquote type="cite"><span style="border-collapse:separate;font-family:Verdana;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><ul>

<li><font face="arial, sans-serif"><span style="border-collapse:collapse">First, there are a bunch of .bc files that are generated by my frontend, and which contain debugging metadata (I checked using llvm-dis and the metadata appears to be OK). These are then combined by my linker, tartln, which combines the functions of 'opt' and 'llc', as well as having some custom passes for reflection and garbage collection. (In fact, about half of the source code for tartln was lifted directly from opt and llc, although this cut & paste operation occurred somewhere around the 2.5 timeframe, and I've tried to keep the code up to date since then.)</span></font></li>

<ul><li><font face="arial, sans-serif"><span style="border-collapse:collapse">The output of this compilation phase is a .o file.</span></font></li></ul></ul></span></blockquote></div><br></div><div>If you can send me couple of small .bc files and linked .o file (mach-O) created using tartln then I'll try to see if I can find anything suspicious here. </div>

</div></blockquote><div><br></div><div>OK I'll work on that when I get home. It may take a while to come up with a "small" .bc file, since even a "hello world" type program pulls in a substantial amount of library code (i/o libraries, container classes, root-level exception handling, argv handling, garbage collection runtime code, and so on.)</div>

<div><br></div><div>It may be something as simple as me doing something stupid in my build script, (although I did remember to use -fno-omit-framepointer).</div><div><br></div><div>I suppose I should mention one odd thing about my current build script: the current optimization level is -O2. I can't use -O0, this causes an assertion failure in the lowering pass for LLVM intrinsics. The problem has to do with inlining and llvm.gcroot(). My frontend insures that all calls to llvm.gcroot() are in the first block of a function, but the inlining pass does not preserve this constraint - which causes the assertion failure. For some reason optimization makes this problem go away.</div>

<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div style="word-wrap:break-word"><div><br></div><div>-</div><div>Devang</div></div></blockquote></div>

<br>-- <br>-- Talin<br>