[llvm-commits] [llvm] r41844 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
Duncan Sands
baldrick at free.fr
Mon Sep 17 03:29:56 PDT 2007
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.
More information about the llvm-commits
mailing list