[llvm-commits] [llvm] r83434 - /llvm/trunk/lib/Transforms/Utils/InlineCost.cpp
Evan Cheng
evan.cheng at apple.com
Tue Oct 6 17:32:49 PDT 2009
How about FreeInst?
Evan
On Oct 6, 2009, at 5:02 PM, Eric Christopher wrote:
> Author: echristo
> Date: Tue Oct 6 19:02:18 2009
> New Revision: 83434
>
> URL: http://llvm.org/viewvc/llvm-project?rev=83434&view=rev
> Log:
> While we still have a MallocInst treat it as a call like any other
> for inlining.
>
> When MallocInst goes away this code will be subsumed as part of
> calls and work just fine...
>
> Modified:
> llvm/trunk/lib/Transforms/Utils/InlineCost.cpp
>
> Modified: llvm/trunk/lib/Transforms/Utils/InlineCost.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/InlineCost.cpp?rev=83434&r1=83433&r2=83434&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/Transforms/Utils/InlineCost.cpp (original)
> +++ llvm/trunk/lib/Transforms/Utils/InlineCost.cpp Tue Oct 6
> 19:02:18 2009
> @@ -135,6 +135,10 @@
> NumInsts += 5;
> }
>
> + // This, too, is a call.
> + if (isa<MallocInst>(II))
> + NumInsts += 5;
> +
> if (const AllocaInst *AI = dyn_cast<AllocaInst>(II)) {
> if (!AI->isStaticAlloca())
> this->usesDynamicAlloca = true;
>
>
> _______________________________________________
> 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