[llvm-commits] [llvm] r89523 - /llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp
Duncan Sands
baldrick at free.fr
Sat Nov 21 00:00:15 PST 2009
> +struct SizeOpt : public LibCallOptimization {
> + virtual Value *CallOptimizer(Function *Callee, CallInst *CI, IRBuilder<> &B) {
> + // TODO: We can do more with this, but delaying to here should be no change
> + // in behavior.
> + ConstantInt *Const = dyn_cast<ConstantInt>(CI->getOperand(2));
> +
> + if (!Const) return 0;
PS: do you need to check the prototype here, or is it guaranteed to be correct
since this is an intrinsic?
Ciao,
D.
More information about the llvm-commits
mailing list