[LLVMdev] Whole-function isel

Evan Cheng evan.cheng at apple.com
Tue Apr 22 00:27:36 PDT 2008


Very nice! Why did you decide on hyperblock instead of SEME region and  
how are you forming the blocks?

Evan

On Apr 20, 2008, at 9:59 PM, Christopher Lamb wrote:

> I thought I'd share a little bit of progress I made this weekend.  
> I've gotten the first interesting test-case (a simple switch)  
> through hyperblock-based DAGISel, and there's a pretty picture too!  
> Each part of the switch is emitted directly into the DAG, rather  
> than being deferred.
>
> This is the function:
> define i32 @foo(i32 %x, i32 %z) nounwind  {
> entry:
>        switch i32 %x, label %UnifiedReturnBlock [
>                 i32 0, label %bb
>                 i32 1, label %bb5
>        ]
> bb:             ; preds = %entry
>        %tmp4 = mul i32 %z, %x          ; <i32> [#uses=1]
>        ret i32 %tmp4
> bb5:            ; preds = %entry
>        %tmp8 = add i32 %z, %x          ; <i32> [#uses=1]
>        ret i32 %tmp8
> UnifiedReturnBlock:             ; preds = %entry
>        ret i32 %z
> }
>
> And here's the X86 DAG right before it gets fed one BB at a time  
> into pre-RA scheduling. Each color is a different basic block.
>
> Cheers!
> --
> Chris
>
> <simple_switch.pdf>_______________________________________________
> 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