<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Mar 15, 2010, at 11:18 AM, Chris Lattner wrote:</div><blockquote type="cite"><div><font class="Apple-style-span" color="#000000"><br></font>The problem is that test1 is codegen'd and the reference to test_label is emitted to the .s file.  By the time test_func is codegen'd, the block is deleted, so the definition isn't emitted.  I'll fix this.<br><br><blockquote type="cite"><blockquote type="cite">The code generator doesn't want dead blocks coming into it for various reasons, so removing them is important.  I guess we'll have to do something like buffer up the unemitted labels and emit them at the end of the file (in a meaningless location).  This should provide correct code, but is somewhat gross.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Bob/Dan, do you guys have any other ideas on how to handle this?<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Is the problem when you've got a blockaddress that references a dead label in a different function?  If that's the case, the blockaddress value can be an undef.<br></blockquote><br>But the reference has already been emitted to the .s file.  I'll take care of this by just queuing up labels and emitting them at the end of the function they correspond to.</div></blockquote><br></div><div>Oh, I get it.  Yuck.  I can't think of any better solutions ATM.</div></body></html>