Chris:<br><br>I was trying to avoid using the custom instruction emitter method. Not as if I didn't look before I asked the question to see if there was an easier way.<br><br><br>-scooter<br><br><div class="gmail_quote">
On Tue, Jan 6, 2009 at 10:07 PM, Chris Lattner <span dir="ltr"><<a href="mailto:clattner@apple.com">clattner@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d"><br>
On Jan 6, 2009, at 5:53 PM, Scott Michel wrote:<br>
<br>
> It's yet another CellSPU thing: integer division is a long code<br>
> sequence we have to insert that has branches within it (test for 0<br>
> divisor, etc.) Can't really emit the sequence of instructions via<br>
> tblgen (can't have labels or BBs). The other alternative is a custom<br>
> instruction emitter.<br>
><br>
> Life could be easier if I could insert BRCONDs and other branches<br>
> from within target-dependent lowering -- if I had access to the<br>
> current MBB.<br>
><br>
> Is this possible or just a FAQ?<br>
<br>
</div>It isn't currently possible for a selection dag to represent more than<br>
one machine basic block. I think Christopher Lamb had some code that<br>
did some of this, but I don't know how far he got.<br>
<br>
The way we currently work around this is with a "custom scheduler<br>
insertion hook". For example, see how SELECT_CC_* works on PPC: at<br>
isel time we claim that we have the operation, then the scheduler<br>
invokes a virtual function to insert it, which expands out into<br>
multiple MBBs.<br>
<font color="#888888"><br>
-Chris<br>
</font><div><div></div><div class="Wj3C7c">_______________________________________________<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>
</div></div></blockquote></div><br>