Finegrainify namespacification
authorChris Lattner <sabre@nondot.org>
Fri, 21 Nov 2003 21:45:31 +0000 (21:45 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 21 Nov 2003 21:45:31 +0000 (21:45 +0000)
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

lib/Transforms/IPO/Inliner.cpp

index bd1bd8370f7aba26cbbcffaa26cdb88bfa7c10db..c0861f1b673c72ecd57611979dc4f64ac4e8074c 100644 (file)
@@ -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