aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Hello/Hello.cpp6
-rw-r--r--lib/Transforms/Instrumentation/BlockProfiling.cpp12
-rw-r--r--lib/Transforms/Instrumentation/EdgeProfiling.cpp9
-rw-r--r--lib/Transforms/Scalar/CondPropagate.cpp4
4 files changed, 11 insertions, 20 deletions
diff --git a/lib/Transforms/Hello/Hello.cpp b/lib/Transforms/Hello/Hello.cpp
index d07f613..8000d0d 100644
--- a/lib/Transforms/Hello/Hello.cpp
+++ b/lib/Transforms/Hello/Hello.cpp
@@ -16,7 +16,7 @@
#include "llvm/Pass.h"
#include "llvm/Function.h"
#include "llvm/ADT/StringExtras.h"
-#include "llvm/Support/Streams.h"
+#include "llvm/Support/raw_ostream.h"
#include "llvm/ADT/Statistic.h"
using namespace llvm;
@@ -32,7 +32,7 @@ namespace {
HelloCounter++;
std::string fname = F.getName();
EscapeString(fname);
- cerr << "Hello: " << fname << "\n";
+ errs() << "Hello: " << fname << "\n";
return false;
}
};
@@ -51,7 +51,7 @@ namespace {
HelloCounter++;
std::string fname = F.getName();
EscapeString(fname);
- cerr << "Hello: " << fname << "\n";
+ errs() << "Hello: " << fname << "\n";
return false;
}
diff --git a/lib/Transforms/Instrumentation/BlockProfiling.cpp b/lib/Transforms/Instrumentation/BlockProfiling.cpp
index 029b8fe..eb8f225 100644
--- a/lib/Transforms/Instrumentation/BlockProfiling.cpp
+++ b/lib/Transforms/Instrumentation/BlockProfiling.cpp
@@ -19,13 +19,11 @@
//
//===----------------------------------------------------------------------===//
-#include "llvm/Constants.h"
#include "llvm/DerivedTypes.h"
-#include "llvm/LLVMContext.h"
#include "llvm/Module.h"
#include "llvm/Pass.h"
#include "llvm/Support/Compiler.h"
-#include "llvm/Support/Streams.h"
+#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Instrumentation.h"
#include "RSProfiling.h"
#include "ProfilingUtils.h"
@@ -53,8 +51,8 @@ ModulePass *llvm::createFunctionProfilerPass() {
bool FunctionProfiler::runOnModule(Module &M) {
Function *Main = M.getFunction("main");
if (Main == 0) {
- cerr << "WARNING: cannot insert function profiling into a module"
- << " with no main function!\n";
+ errs() << "WARNING: cannot insert function profiling into a module"
+ << " with no main function!\n";
return false; // No main, no instrumentation!
}
@@ -100,8 +98,8 @@ ModulePass *llvm::createBlockProfilerPass() { return new BlockProfiler(); }
bool BlockProfiler::runOnModule(Module &M) {
Function *Main = M.getFunction("main");
if (Main == 0) {
- cerr << "WARNING: cannot insert block profiling into a module"
- << " with no main function!\n";
+ errs() << "WARNING: cannot insert block profiling into a module"
+ << " with no main function!\n";
return false; // No main, no instrumentation!
}
diff --git a/lib/Transforms/Instrumentation/EdgeProfiling.cpp b/lib/Transforms/Instrumentation/EdgeProfiling.cpp
index 2220bbf..ed9ff50 100644
--- a/lib/Transforms/Instrumentation/EdgeProfiling.cpp
+++ b/lib/Transforms/Instrumentation/EdgeProfiling.cpp
@@ -18,13 +18,10 @@
//===----------------------------------------------------------------------===//
#include "ProfilingUtils.h"
-#include "llvm/Constants.h"
-#include "llvm/DerivedTypes.h"
-#include "llvm/LLVMContext.h"
#include "llvm/Module.h"
#include "llvm/Pass.h"
#include "llvm/Support/Compiler.h"
-#include "llvm/Support/Streams.h"
+#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include "llvm/Transforms/Instrumentation.h"
#include <set>
@@ -48,8 +45,8 @@ ModulePass *llvm::createEdgeProfilerPass() { return new EdgeProfiler(); }
bool EdgeProfiler::runOnModule(Module &M) {
Function *Main = M.getFunction("main");
if (Main == 0) {
- cerr << "WARNING: cannot insert edge profiling into a module"
- << " with no main function!\n";
+ errs() << "WARNING: cannot insert edge profiling into a module"
+ << " with no main function!\n";
return false; // No main, no instrumentation!
}
diff --git a/lib/Transforms/Scalar/CondPropagate.cpp b/lib/Transforms/Scalar/CondPropagate.cpp
index 88b5652..562fc60 100644
--- a/lib/Transforms/Scalar/CondPropagate.cpp
+++ b/lib/Transforms/Scalar/CondPropagate.cpp
@@ -14,19 +14,15 @@
#define DEBUG_TYPE "condprop"
#include "llvm/Transforms/Scalar.h"
-#include "llvm/Constants.h"
-#include "llvm/Function.h"
#include "llvm/Instructions.h"
#include "llvm/IntrinsicInst.h"
#include "llvm/Pass.h"
#include "llvm/Type.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include "llvm/Transforms/Utils/Local.h"
-#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/Compiler.h"
-#include "llvm/Support/Streams.h"
using namespace llvm;
STATISTIC(NumBrThread, "Number of CFG edges threaded through branches");