[llvm-commits] [llvm] r86975 - in /llvm/trunk: lib/Transforms/IPO/Inliner.cpp test/Transforms/Inline/delete-call.ll

Duncan Sands baldrick at free.fr
Thu Nov 12 02:06:54 PST 2009


Hi Chris,

> +      // If this call site is dead and it is to a readonly function, we should
> +      // just delete the call instead of trying to inline it, regardless of
> +      // size.  This happens because IPSCCP propagates the result out of the
> +      // call and then we're left with the dead call.
> +      if (CS.getInstruction()->use_empty() &&
> +          !CS.getInstruction()->mayHaveSideEffects()) {

how about using isInstructionTriviallyDead here?

Ciao,

Duncan.



More information about the llvm-commits mailing list