From 0be4101d12bd134a3e707a47a2f3441ef06a26ae Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 1 Feb 2002 04:54:11 +0000 Subject: [PATCH] Add mergereturn pass git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1629 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/opt/opt.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp index a94ff76b33e..ab2668daaeb 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 }, { strip , New }, { mstrip , New }, + { mergereturn, New }, + { indvars , New }, { instcombine, New }, { sccp , New }, @@ -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 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"),