[llvm-commits] [llvm] r83441 - /llvm/trunk/lib/Transforms/Utils/InlineCost.cpp
Eric Christopher
echristo at apple.com
Tue Oct 6 17:54:08 PDT 2009
Author: echristo
Date: Tue Oct 6 19:54:08 2009
New Revision: 83441
URL: http://llvm.org/viewvc/llvm-project?rev=83441&view=rev
Log:
Add FreeInst to the "is a call" check for Insts that are calls, but
not intrinsics.
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=83441&r1=83440&r2=83441&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/InlineCost.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/InlineCost.cpp Tue Oct 6 19:54:08 2009
@@ -135,8 +135,8 @@
NumInsts += 5;
}
- // This, too, is a call.
- if (isa<MallocInst>(II))
+ // These, too, are calls.
+ if (isa<MallocInst>(II) || isa<FreeInst>(II))
NumInsts += 5;
if (const AllocaInst *AI = dyn_cast<AllocaInst>(II)) {
More information about the llvm-commits
mailing list