From 814908b33c75560559c8f33c631220a9d21c2260 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 21 May 2002 20:05:16 +0000 Subject: [PATCH] Expose cfg simplification pass git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2699 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/opt/opt.cpp | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp index 3eedc7c1b6b..95dde03b590 100644 --- a/tools/opt/opt.cpp +++ b/tools/opt/opt.cpp @@ -39,7 +39,7 @@ static TargetData TD("opt target"); enum Opts { // Basic optimizations dce, die, constprop, gcse, licm, inlining, constmerge, - strip, mstrip, mergereturn, + strip, mstrip, mergereturn, simplifycfg, // Miscellaneous Transformations raiseallocs, lowerallocs, funcresolve, cleangcc, lowerrefs, @@ -75,16 +75,17 @@ struct { enum Opts OptID; Pass * (*PassCtor)(); } OptTable[] = { - { dce , createDeadCodeEliminationPass }, - { die , createDeadInstEliminationPass }, - { constprop , createConstantPropogationPass }, - { gcse , createGCSEPass }, - { licm , createLICMPass }, - { inlining , createFunctionInliningPass }, - { constmerge , createConstantMergePass }, - { strip , createSymbolStrippingPass }, - { mstrip , createFullSymbolStrippingPass }, + { dce , createDeadCodeEliminationPass }, + { die , createDeadInstEliminationPass }, + { constprop , createConstantPropogationPass }, + { gcse , createGCSEPass }, + { licm , createLICMPass }, + { inlining , createFunctionInliningPass }, + { constmerge , createConstantMergePass }, + { strip , createSymbolStrippingPass }, + { mstrip , createFullSymbolStrippingPass }, { mergereturn, createUnifyFunctionExitNodesPass }, + { simplifycfg, createCFGSimplificationPass }, { indvars , createIndVarSimplifyPass }, { instcombine, createInstructionCombiningPass }, @@ -98,7 +99,7 @@ struct { { trace , createTraceValuesPassForBasicBlocks }, { tracem , createTraceValuesPassForFunction }, - { paths , createProfilePathsPass }, + { paths , createProfilePathsPass }, { print , createPrintFunctionPass }, { printm , createPrintModulePass }, @@ -136,6 +137,7 @@ cl::EnumList OptimizationList(cl::NoFlags, clEnumVal(strip , "Strip symbols"), clEnumVal(mstrip , "Strip module symbols"), clEnumVal(mergereturn, "Unify function exit nodes"), + clEnumVal(simplifycfg, "CFG Simplification"), clEnumVal(indvars , "Simplify Induction Variables"), clEnumVal(instcombine, "Combine redundant instructions"),