[llvm-commits] [llvm] r62938 - /llvm/trunk/lib/Transforms/Utils/InlineCost.cpp
Dale Johannesen
dalej at apple.com
Sat Jan 24 13:49:34 PST 2009
Author: johannes
Date: Sat Jan 24 15:49:34 2009
New Revision: 62938
URL: http://llvm.org/viewvc/llvm-project?rev=62938&view=rev
Log:
Revert previous change; even this mild and clearly
more accurate change loses more than it gains on
benchmarks.
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=62938&r1=62937&r2=62938&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/InlineCost.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/InlineCost.cpp Sat Jan 24 15:49:34 2009
@@ -119,14 +119,11 @@
NeverInline = true;
return;
}
-
+
// Calls often compile into many machine instructions. Bump up their
- // cost to reflect this. Allow an extra instruction per parameter.
- if (!isa<IntrinsicInst>(II)) {
- for (CallSite::arg_iterator I = CS.arg_begin(), E = CS.arg_end();
- I != E; ++I)
- NumInsts ++;
- }
+ // cost to reflect this.
+ if (!isa<IntrinsicInst>(II))
+ NumInsts += 5;
}
if (const AllocaInst *AI = dyn_cast<AllocaInst>(II)) {
More information about the llvm-commits
mailing list