About hyperblock in LLVM

Hi guys,

I am new for llvm,and I want to write a backend for TRIPS arch.
So I am wondering if llvm can produce hyperblock easily,can anyone help?
Any tips are welcomed.

Thank you !

wangwentao , HIT

         So I am wondering if llvm can produce hyperblock easily,can anyone

                                                 ^^^^^^^^^^
  Do you mean the one mentioned in the paper below?
  http://www.eecs.umich.edu/~mahlke/papers/1992/mahlke_micro92.pdf

Regards,
chenwj

Hi, Wang

  After doing a little study by reading [1], it seems the hyberblock
is pretty similar to the concept of bundle in VLIW. Am I right? If
so, there were discussions about VLIW on the list before.

Regards,
chenwj

[1] http://en.wikipedia.org/wiki/Explicit_Data_Graph_Execution

Thank you! I have read this article,and there is one dissertion about this in the attached file.
What I really want to know is that if LLVM is appropriate for a block-based arch.
If so,LLVM have already gained the ability to produce hyperblock or I need to write codes to let LLVM produce hyperblock?

Regards,
Wangwentao ,HIT

asmith.pdf (2.75 MB)

bmaher.pdf (1.04 MB)

Hi ,Chen

Thanks for your answer.Maybe there are some common things,but I think hyperblock is more complex.
I will see the topics about VLIW.Thank you for the direction.
By the way ,what do you use LLVM for ?360.gif

Anyway,you are a kind hearted man.Thank you!

Regards,

Wangwentao ,HIT

        Thanks for your answer.Maybe there are some common things,but I
think hyperblock is more complex.

  Perhaps you can elaborate what hyperblock is and how it's different
from bundle in VLIW.

        I will see the topics about VLIW.Thank you for the direction.

  http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-September/043338.html

        By the way ,what do you use LLVM for ?[?]

  Dynamic binary translation. :slight_smile:

Regards,
chenwj

      If so,LLVM have already gained the ability to produce hyperblock or I
need to write codes to let LLVM produce hyperblock?

  You might need to refer to this paper
  http://llvm.org/pubs/2007-03-Computer-Trident.pdf

Regards,
chenwj

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.

-Andy

You mean hyperblock IR -> LLVM IR? [1]'s approach is
LLVM IR -> htberblock IR.

[1] http://llvm.org/pubs/2007-03-Computer-Trident.pdf

Regards,
chenwj

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