[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
Chris Lattner
clattner at apple.com
Thu May 3 17:18:55 PDT 2007
> + } else if (CallInst *CI = dyn_cast<CallInst>(UsersToProcess
> [i].Inst)) {
> + // Addressing modes can also be folded into prefetches.
> + Function *CalledFunc = CI->getCalledFunction();
> + if (CalledFunc != NULL &&
> + CalledFunc->getIntrinsicID() == Intrinsic::prefetch &&
> + CI->getOperand(1) == UsersToProcess
> [i].OperandValToReplace)
> + isAddress = true;
> + }
Cool. One easier way to do this is with llvm/IntrinsicInst.h. You
can do stuff like:
} else if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(UsersToProcess
[i].Inst)) {
if (II->getIntrinsicID() == Intrinsic::prefetch && ...
Which is ever so slightly nicer :)
-Chris
>
> MoveImmediateValues(TLI, UsersToProcess[i].Inst,
> UsersToProcess[i].Base,
> UsersToProcess[i].Imm, isAddress, L);
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list