[llvm-commits] CVS: reopt/lib/TraceJIT/TraceJITOpts.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Wed Jul 21 13:18:56 PDT 2004
Changes in directory reopt/lib/TraceJIT:
TraceJITOpts.cpp updated: 1.1 -> 1.2
---
Log message:
Add some sample optimizations, and an option to turn them on.
---
Diffs of the changes: (+10 -0)
Index: reopt/lib/TraceJIT/TraceJITOpts.cpp
diff -u reopt/lib/TraceJIT/TraceJITOpts.cpp:1.1 reopt/lib/TraceJIT/TraceJITOpts.cpp:1.2
--- reopt/lib/TraceJIT/TraceJITOpts.cpp:1.1 Tue Jul 20 17:41:43 2004
+++ reopt/lib/TraceJIT/TraceJITOpts.cpp Wed Jul 21 15:18:45 2004
@@ -13,8 +13,18 @@
#include "reopt/TraceJIT.h"
#include "llvm/Transforms/Scalar.h"
+#include "llvm/Analysis/LoadValueNumbering.h"
+#include "Support/CommandLine.h"
using namespace llvm;
+namespace {
+ cl::opt<bool> RunOptimizationPasses ("run-opt-passes", cl::init(false));
+};
+
void TraceJIT::addOptimizationPasses (FunctionPassManager &PM) {
+ if (RunOptimizationPasses) {
+ PM.add(createInstructionCombiningPass());
+ PM.add(createDeadCodeEliminationPass());
+ }
}
More information about the llvm-commits
mailing list