aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-11-21 21:45:31 +0000
committerChris Lattner <sabre@nondot.org>2003-11-21 21:45:31 +0000
commita51bcb50b0c74adc741361824ef81dbefb715c53 (patch)
treebe825b81254a24d35e5fb9c9f6e3a2acfcb206ae
parent14b170f5ffaf64090b788b004b09740905aa2711 (diff)
Finegrainify namespacification
Print out the costs for functions that AREN'T inlined as well git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10135 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/IPO/Inliner.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Transforms/IPO/Inliner.cpp b/lib/Transforms/IPO/Inliner.cpp
index bd1bd8370f..c0861f1b67 100644
--- a/lib/Transforms/IPO/Inliner.cpp
+++ b/lib/Transforms/IPO/Inliner.cpp
@@ -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 @@ bool Inliner::runOnSCC(const std::vector<CallGraphNode*> &SCC) {
// 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 @@ bool Inliner::performInlining(CallSite CS, std::set<Function*> &SCC) {
return true;
}
-} // End llvm namespace