Hi Chris,

> Nice!  Can you please add a testcase?

I already did (Transforms/InstCombine/2007-09-11-Trampoline.ll).

> Also, can you please move the   
> body of the transformation out of visitCallSite, so that you end up  
> with something like this:
> 
>    if (BitCastInst *BC = dyn_cast<BitCastInst>(Callee)) {
>      if (IntrinsicInst *In = dyn_cast<IntrinsicInst>(BC->getOperand(0)))
>        if (In->getIntrinsicID() == Intrinsic::init_trampoline)
>          if (Instruction *I = HandleCallThroughInitTrampoline(...))
>            return I;
> 
> in visitCallSite?

Done.

> Thanks work, I think the single intrinsic approach is much cleaner! :)

I thought of pushing this to mainline gcc, but I'm not sure they'll be 
interested.

Ciao,

Duncan.
_______________________________________________
llvm-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to