summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/gccas/gccas.cpp6
-rw-r--r--llvm/tools/opt/opt.cpp24
2 files changed, 18 insertions, 12 deletions
diff --git a/llvm/tools/gccas/gccas.cpp b/llvm/tools/gccas/gccas.cpp
index 7e2b6f3e46c..24a5e87b1ba 100644
--- a/llvm/tools/gccas/gccas.cpp
+++ b/llvm/tools/gccas/gccas.cpp
@@ -11,8 +11,8 @@
#include "llvm/Assembly/Parser.h"
#include "llvm/Transforms/CleanupGCCOutput.h"
#include "llvm/Transforms/LevelChange.h"
-#include "llvm/Optimizations/DCE.h"
#include "llvm/Transforms/ConstantMerge.h"
+#include "llvm/Transforms/Scalar/DCE.h"
#include "llvm/Transforms/Scalar/IndVarSimplify.h"
#include "llvm/Transforms/Scalar/InstructionCombining.h"
#include "llvm/Bytecode/Writer.h"
@@ -64,13 +64,13 @@ int main(int argc, char **argv) {
// a little bit. Do this now.
//
PassManager Passes;
- Passes.add(new opt::DeadCodeElimination()); // Remove Dead code/vars
+ Passes.add(new DeadCodeElimination()); // Remove Dead code/vars
Passes.add(new CleanupGCCOutput()); // Fix gccisms
Passes.add(new InductionVariableSimplify()); // Simplify indvars
Passes.add(new RaisePointerReferences()); // Eliminate casts
Passes.add(new ConstantMerge()); // Merge dup global consts
Passes.add(new InstructionCombining()); // Combine silly seq's
- Passes.add(new opt::DeadCodeElimination()); // Remove Dead code/vars
+ Passes.add(new DeadCodeElimination()); // Remove Dead code/vars
// Run our queue of passes all at once now, efficiently. This form of
// runAllPasses frees the Pass objects after runAllPasses completes.
diff --git a/llvm/tools/opt/opt.cpp b/llvm/tools/opt/opt.cpp
index bbf1489ca62..36de3bfbf73 100644
--- a/llvm/tools/opt/opt.cpp
+++ b/llvm/tools/opt/opt.cpp
@@ -9,20 +9,26 @@
#include "llvm/Module.h"
#include "llvm/Bytecode/Reader.h"
#include "llvm/Bytecode/Writer.h"
-#include "llvm/Optimizations/AllOpts.h"
-#include "llvm/Transforms/Instrumentation/TraceValues.h"
#include "llvm/Assembly/PrintModulePass.h"
#include "llvm/Transforms/ConstantMerge.h"
#include "llvm/Transforms/CleanupGCCOutput.h"
#include "llvm/Transforms/LevelChange.h"
+#include "llvm/Transforms/MethodInlining.h"
+#include "llvm/Transforms/SymbolStripping.h"
#include "llvm/Transforms/IPO/SimpleStructMutation.h"
#include "llvm/Transforms/IPO/GlobalDCE.h"
+#include "llvm/Transforms/Scalar/DCE.h"
+#include "llvm/Transforms/Scalar/ConstantProp.h"
+#include "llvm/Transforms/Scalar/InductionVars.h"
#include "llvm/Transforms/Scalar/IndVarSimplify.h"
#include "llvm/Transforms/Scalar/InstructionCombining.h"
+#include "llvm/Transforms/Instrumentation/TraceValues.h"
#include "Support/CommandLine.h"
#include <fstream>
#include <memory>
+
+
enum Opts {
// Basic optimizations
dce, constprop, inlining, constmerge, strip, mstrip,
@@ -41,16 +47,16 @@ struct {
enum Opts OptID;
Pass *ThePass;
} OptTable[] = {
- { dce , new opt::DeadCodeElimination() },
- { constprop , new opt::ConstantPropogation() },
- { inlining , new opt::MethodInlining() },
+ { dce , new DeadCodeElimination() },
+ { constprop , new ConstantPropogation() },
+ { inlining , new MethodInlining() },
{ constmerge , new ConstantMerge() },
- { strip , new opt::SymbolStripping() },
- { mstrip , new opt::FullSymbolStripping() },
+ { strip , new SymbolStripping() },
+ { mstrip , new FullSymbolStripping() },
{ indvars , new InductionVariableSimplify() },
{ instcombine, new InstructionCombining() },
- { sccp , new opt::SCCPPass() },
- { adce , new opt::AgressiveDCE() },
+ { sccp , new SCCPPass() },
+ { adce , new AgressiveDCE() },
{ raise , new RaisePointerReferences() },
{ trace , new InsertTraceCode(true, true) },
{ tracem , new InsertTraceCode(false, true) },
OpenPOWER on IntegriCloud