aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-02-01 04:54:11 +0000
committerChris Lattner <sabre@nondot.org>2002-02-01 04:54:11 +0000
commit0be4101d12bd134a3e707a47a2f3441ef06a26ae (patch)
tree61488a5cda24ab8e886f3161ff2ecc3c227dbd82 /tools
parent417cf7ef96ffcf81f5ca6c48639c804c2aa68bce (diff)
downloadexternal_llvm-0be4101d12bd134a3e707a47a2f3441ef06a26ae.zip
external_llvm-0be4101d12bd134a3e707a47a2f3441ef06a26ae.tar.gz
external_llvm-0be4101d12bd134a3e707a47a2f3441ef06a26ae.tar.bz2
Add mergereturn pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1629 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/opt/opt.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp
index a94ff76..ab2668d 100644
--- a/tools/opt/opt.cpp
+++ b/tools/opt/opt.cpp
@@ -11,6 +11,7 @@
#include "llvm/Bytecode/Reader.h"
#include "llvm/Bytecode/WriteBytecodePass.h"
#include "llvm/Assembly/PrintModulePass.h"
+#include "llvm/Transforms/UnifyMethodExitNodes.h"
#include "llvm/Transforms/ConstantMerge.h"
#include "llvm/Transforms/CleanupGCCOutput.h"
#include "llvm/Transforms/LevelChange.h"
@@ -31,7 +32,7 @@
// Opts enum - All of the transformations we can do...
enum Opts {
// Basic optimizations
- dce, constprop, inlining, constmerge, strip, mstrip,
+ dce, constprop, inlining, constmerge, strip, mstrip, mergereturn,
// Miscellaneous Transformations
trace, tracem, print, raiseallocs, cleangcc,
@@ -79,6 +80,8 @@ struct {
{ constmerge , New<ConstantMerge> },
{ strip , New<SymbolStripping> },
{ mstrip , New<FullSymbolStripping> },
+ { mergereturn, New<UnifyMethodExitNodes> },
+
{ indvars , New<InductionVariableSimplify> },
{ instcombine, New<InstructionCombining> },
{ sccp , New<SCCPPass> },
@@ -106,11 +109,13 @@ cl::Flag Quiet ("q", "Don't print modifying pass names", 0, false);
cl::Alias QuietA ("quiet", "Alias for -q", cl::NoFlags, Quiet);
cl::EnumList<enum Opts> OptimizationList(cl::NoFlags,
clEnumVal(dce , "Dead Code Elimination"),
- clEnumVal(constprop , "Simple Constant Propogation"),
- clEnumValN(inlining , "inline", "Method Integration"),
+ clEnumVal(constprop , "Simple constant propogation"),
+ clEnumValN(inlining , "inline", "Method integration"),
clEnumVal(constmerge , "Merge identical global constants"),
- clEnumVal(strip , "Strip Symbols"),
- clEnumVal(mstrip , "Strip Module Symbols"),
+ clEnumVal(strip , "Strip symbols"),
+ clEnumVal(mstrip , "Strip module symbols"),
+ clEnumVal(mergereturn, "Unify method exit nodes"),
+
clEnumVal(indvars , "Simplify Induction Variables"),
clEnumVal(instcombine, "Combine redundant instructions"),
clEnumVal(sccp , "Sparse Conditional Constant Propogation"),