[llvm-commits] CVS: llvm/lib/Transforms/IPO/Inliner.cpp
Chris Lattner
lattner at cs.uiuc.edu
Fri Nov 21 15:47:02 PST 2003
Changes in directory llvm/lib/Transforms/IPO:
Inliner.cpp updated: 1.5 -> 1.6
---
Log message:
Finegrainify namespacification
Print out the costs for functions that AREN'T inlined as well
---
Diffs of the changes: (+5 -4)
Index: llvm/lib/Transforms/IPO/Inliner.cpp
diff -u llvm/lib/Transforms/IPO/Inliner.cpp:1.5 llvm/lib/Transforms/IPO/Inliner.cpp:1.6
--- llvm/lib/Transforms/IPO/Inliner.cpp:1.5 Tue Nov 11 16:41:33 2003
+++ llvm/lib/Transforms/IPO/Inliner.cpp Fri Nov 21 15:45:31 2003
@@ -23,8 +23,7 @@
#include "Support/CommandLine.h"
#include "Support/Debug.h"
#include "Support/Statistic.h"
-
-namespace llvm {
+using namespace llvm;
namespace {
Statistic<> NumInlined("inline", "Number of functions inlined");
@@ -77,7 +76,10 @@
// try to do so...
int InlineCost = inSCC ? getRecursiveInlineCost(CS) :
getInlineCost(CS);
- if (InlineCost < (int)InlineThreshold) {
+ if (InlineCost >= (int)InlineThreshold) {
+ DEBUG(std::cerr << " NOT Inlining: cost=" << InlineCost
+ << ", Call: " << *CS.getInstruction());
+ } else {
DEBUG(std::cerr << " Inlining: cost=" << InlineCost
<< ", Call: " << *CS.getInstruction());
@@ -137,4 +139,3 @@
return true;
}
-} // End llvm namespace
More information about the llvm-commits
mailing list