[LLVMdev] About hyperblock in LLVM

Andrew Trick atrick at apple.com
Thu Nov 10 09:40:13 PST 2011


On Nov 8, 2011, at 12:41 AM, 陳韋任 wrote:

> On Mon, Nov 07, 2011 at 09:34:04PM -0800, Andrew Trick wrote:
>> On Nov 3, 2011, at 3:20 AM, 王文涛 wrote:
>>>   If so,LLVM have already gained the ability to produce hyperblock or I need to write codes to let LLVM produce hyperblock?
>> 
>> You will not be able to represent hyperblocks without developing your own extensions to the IR. The extent to which you would be able to reuse LLVM optimizations after converting to your hyperblock IR (if at all) would depend on the restrictions you place on the type of hyperblocks that can be formed. Anything beyond single-entry, single exit regions would probably be too difficult to cleanly represent. The existing LLVM optimizations that take advantage of control flow information would be effectively disabled after converting to hyperblocks.
> 
>  You mean hyperblock IR -> LLVM IR? [1]'s approach is
> LLVM IR -> htberblock IR.
> 
> [1] http://llvm.org/pubs/2007-03-Computer-Trident.pdf

Their approach makes sense. First fully optimize LLVM IR, then lower to a custom hyperblock IR. I'm not sure what I said contradicts that. I am adding the caveat that once IR is lowered, LLVM won't be able to do much with it.

-Andy



More information about the llvm-dev mailing list