summaryrefslogtreecommitdiff
path: root/tools/opt
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-04-28 00:48:17 +0000
committerChris Lattner <sabre@nondot.org>2002-04-28 00:48:17 +0000
commite5fb83ebb84b9562c227c100c064e36d2192d9dc (patch)
treeb0c85939a9b56c12dc5eb2fc15ceb35be5b45e24 /tools/opt
parentd80e973cec7e30839530d94f84748d99b03b0d9e (diff)
downloadllvm-e5fb83ebb84b9562c227c100c064e36d2192d9dc.tar.gz
llvm-e5fb83ebb84b9562c227c100c064e36d2192d9dc.tar.bz2
llvm-e5fb83ebb84b9562c227c100c064e36d2192d9dc.tar.xz
Expose new GCSE pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2339 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/opt')
-rw-r--r--tools/opt/opt.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp
index 2b6f8e32ef..c4870d833d 100644
--- a/tools/opt/opt.cpp
+++ b/tools/opt/opt.cpp
@@ -24,6 +24,7 @@
#include "llvm/Transforms/IPO/PoolAllocate.h"
#include "llvm/Transforms/Scalar/DCE.h"
#include "llvm/Transforms/Scalar/ConstantProp.h"
+#include "llvm/Transforms/Scalar/GCSE.h"
#include "llvm/Transforms/Scalar/IndVarSimplify.h"
#include "llvm/Transforms/Scalar/InstructionCombining.h"
#include "llvm/Transforms/Scalar/PromoteMemoryToRegister.h"
@@ -38,7 +39,7 @@
// Opts enum - All of the transformations we can do...
enum Opts {
// Basic optimizations
- dce, die, constprop, inlining, constmerge, strip, mstrip, mergereturn,
+ dce, die, constprop, gcse, inlining, constmerge, strip, mstrip, mergereturn,
// Miscellaneous Transformations
raiseallocs, funcresolve, cleangcc, lowerrefs,
@@ -73,6 +74,7 @@ struct {
{ dce , createDeadCodeEliminationPass },
{ die , createDeadInstEliminationPass },
{ constprop , createConstantPropogationPass },
+ { gcse , createGCSEPass },
{ inlining , createFunctionInliningPass },
{ constmerge , createConstantMergePass },
{ strip , createSymbolStrippingPass },
@@ -117,6 +119,7 @@ cl::EnumList<enum Opts> OptimizationList(cl::NoFlags,
clEnumVal(dce , "Dead Code Elimination"),
clEnumVal(die , "Dead Instruction Elimination"),
clEnumVal(constprop , "Simple constant propogation"),
+ clEnumVal(gcse , "Global Common Subexpression Elimination"),
clEnumValN(inlining , "inline", "Function integration"),
clEnumVal(constmerge , "Merge identical global constants"),
clEnumVal(strip , "Strip symbols"),