summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2009-07-31 19:52:24 +0000
committerBill Wendling <isanbard@gmail.com>2009-07-31 19:52:24 +0000
commit2602bb4cdcc5bfa2d9c8828ea8a9cbaab9fce8f6 (patch)
tree3ca0f2047d8e7fe4863181f4b735310a0bce7122 /llvm/lib
parentca9a4f10455321b78ea9e275c4a04584a5f2c739 (diff)
downloadbcm5719-llvm-2602bb4cdcc5bfa2d9c8828ea8a9cbaab9fce8f6.tar.gz
bcm5719-llvm-2602bb4cdcc5bfa2d9c8828ea8a9cbaab9fce8f6.zip
- Convert the rest of the DOUTs to DEBUG+errs().
- One formatting change. No intended functionality change. llvm-svn: 77717
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/IPO/Inliner.cpp27
1 files changed, 13 insertions, 14 deletions
diff --git a/llvm/lib/Transforms/IPO/Inliner.cpp b/llvm/lib/Transforms/IPO/Inliner.cpp
index d6dd3610689..ba0372b5b15 100644
--- a/llvm/lib/Transforms/IPO/Inliner.cpp
+++ b/llvm/lib/Transforms/IPO/Inliner.cpp
@@ -95,33 +95,32 @@ bool Inliner::shouldInline(CallSite CS) {
float FudgeFactor = getInlineFudgeFactor(CS);
if (IC.isAlways()) {
- DOUT << " Inlining: cost=always"
- << ", Call: " << *CS.getInstruction() << "\n";
+ DEBUG(errs() << " Inlining: cost=always"
+ << ", Call: " << *CS.getInstruction() << "\n");
return true;
}
if (IC.isNever()) {
- DOUT << " NOT Inlining: cost=never"
- << ", Call: " << *CS.getInstruction() << "\n";
+ DEBUG(errs() << " NOT Inlining: cost=never"
+ << ", Call: " << *CS.getInstruction() << "\n");
return false;
}
int Cost = IC.getValue();
int CurrentThreshold = InlineThreshold;
Function *Fn = CS.getCaller();
- if (Fn && !Fn->isDeclaration()
- && Fn->hasFnAttr(Attribute::OptimizeForSize)
- && InlineThreshold != 50) {
+ if (Fn && !Fn->isDeclaration() &&
+ Fn->hasFnAttr(Attribute::OptimizeForSize) &&
+ InlineThreshold != 50)
CurrentThreshold = 50;
- }
if (Cost >= (int)(CurrentThreshold * FudgeFactor)) {
- DOUT << " NOT Inlining: cost=" << Cost
- << ", Call: " << *CS.getInstruction() << "\n";
+ DEBUG(errs() << " NOT Inlining: cost=" << Cost
+ << ", Call: " << *CS.getInstruction() << "\n");
return false;
} else {
- DOUT << " Inlining: cost=" << Cost
- << ", Call: " << *CS.getInstruction() << "\n";
+ DEBUG(errs() << " Inlining: cost=" << Cost
+ << ", Call: " << *CS.getInstruction() << "\n");
return true;
}
}
@@ -131,7 +130,7 @@ bool Inliner::runOnSCC(const std::vector<CallGraphNode*> &SCC) {
const TargetData *TD = getAnalysisIfAvailable<TargetData>();
SmallPtrSet<Function*, 8> SCCFunctions;
- DOUT << "Inliner visiting SCC:";
+ DEBUG(errs() << "Inliner visiting SCC:");
for (unsigned i = 0, e = SCC.size(); i != e; ++i) {
Function *F = SCC[i]->getFunction();
if (F) SCCFunctions.insert(F);
@@ -154,7 +153,7 @@ bool Inliner::runOnSCC(const std::vector<CallGraphNode*> &SCC) {
CallSites.push_back(CS);
}
- DOUT << ": " << CallSites.size() << " call sites.\n";
+ DEBUG(errs() << ": " << CallSites.size() << " call sites.\n");
// Now that we have all of the call sites, move the ones to functions in the
// current SCC to the end of the list.
OpenPOWER on IntegriCloud