summaryrefslogtreecommitdiff
path: root/lib/Transforms/IPO/ArgumentPromotion.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2006-11-26 10:02:32 +0000
committerBill Wendling <isanbard@gmail.com>2006-11-26 10:02:32 +0000
commit0a81aac4b46eed130d20714af5a1c01b05d0275e (patch)
tree6be25b94a25b2af80396217a7e417da8bc460adb /lib/Transforms/IPO/ArgumentPromotion.cpp
parentb7427031372337e6d67f9573ec6c722ab5ea913e (diff)
downloadllvm-0a81aac4b46eed130d20714af5a1c01b05d0275e.tar.gz
llvm-0a81aac4b46eed130d20714af5a1c01b05d0275e.tar.bz2
llvm-0a81aac4b46eed130d20714af5a1c01b05d0275e.tar.xz
Replace #include <iostream> with llvm_* streams.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31924 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/ArgumentPromotion.cpp')
-rw-r--r--lib/Transforms/IPO/ArgumentPromotion.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/Transforms/IPO/ArgumentPromotion.cpp b/lib/Transforms/IPO/ArgumentPromotion.cpp
index 646f5b8e08..e9841697a7 100644
--- a/lib/Transforms/IPO/ArgumentPromotion.cpp
+++ b/lib/Transforms/IPO/ArgumentPromotion.cpp
@@ -44,7 +44,6 @@
#include "llvm/ADT/DepthFirstIterator.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/StringExtras.h"
-#include <iostream>
#include <set>
using namespace llvm;
@@ -231,9 +230,9 @@ bool ArgPromotion::isSafeToPromoteArgument(Argument *Arg) const {
if (std::find(GEPIndices.begin(), GEPIndices.end(), Operands) ==
GEPIndices.end()) {
if (GEPIndices.size() == 3) {
- DEBUG(std::cerr << "argpromotion disable promoting argument '"
- << Arg->getName() << "' because it would require adding more "
- << "than 3 arguments to the function.\n");
+ DOUT << "argpromotion disable promoting argument '"
+ << Arg->getName() << "' because it would require adding more "
+ << "than 3 arguments to the function.\n";
// We limit aggregate promotion to only promoting up to three elements
// of the aggregate.
return false;
@@ -501,8 +500,8 @@ Function *ArgPromotion::DoPromotion(Function *F,
LI->replaceAllUsesWith(I2);
AA.replaceWithNewValue(LI, I2);
LI->getParent()->getInstList().erase(LI);
- DEBUG(std::cerr << "*** Promoted load of argument '" << I->getName()
- << "' in function '" << F->getName() << "'\n");
+ DOUT << "*** Promoted load of argument '" << I->getName()
+ << "' in function '" << F->getName() << "'\n";
} else {
GetElementPtrInst *GEP = cast<GetElementPtrInst>(I->use_back());
std::vector<Value*> Operands(GEP->op_begin()+1, GEP->op_end());
@@ -521,8 +520,8 @@ Function *ArgPromotion::DoPromotion(Function *F,
NewName += ".x";
TheArg->setName(NewName+".val");
- DEBUG(std::cerr << "*** Promoted agg argument '" << TheArg->getName()
- << "' of function '" << F->getName() << "'\n");
+ DOUT << "*** Promoted agg argument '" << TheArg->getName()
+ << "' of function '" << F->getName() << "'\n";
// All of the uses must be load instructions. Replace them all with
// the argument specified by ArgNo.