[LLVMdev] Generating instruction bundles ?

Evan Cheng evan.cheng at apple.com
Thu Sep 25 08:59:22 PDT 2008


On Sep 25, 2008, at 6:51 AM, Stephane Marchesin wrote:

>
> So I guess the question became obvious by now: how can I do this in
> llvm? I've been thinking about a couple of solutions:
> - Use the tablegen template system to generate all the variants for
> eacho operation (with/without absolute value, with/without negation,
> with/without post-scaling, with/without all kinds of shuffling, and
> all combinations of those). Is this possible ? We're talking about
> approximately 70000 variants per instruction here, approximately 300
> if we ignore the shuffling which has 256 combinations by itself.
> - Use an additional pass that reorders and packs instructions together
> (similary to what the ia64 optimizing assembler does), maybe relying
> on the instruction scheduler to place the instructions for me.
> - Rewrite some of tablegen to support that feature. I'm under the
> impression it would be a lot of work for a very specific case, but I
> could be wrong here.

LLVM codegen is missing some pieces for wide machines. So you should  
expect to roll up your sleeves and write your own. :-)

I am not sure if I completely understand the description. Is an  
instruction bundle made up of fixed number operations? If so, you  
could model each operation as a separate machine instruction. You can  
add a "bundle formation" (using e.g. bottom up greedy or clustering  
technique) pass to reorder instructions to form the bundles.

Evan

>
>
> Ideas ?
>
> Thanks in advance,
> Stephane
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list