Expose cfg simplification pass
authorChris Lattner <sabre@nondot.org>
Tue, 21 May 2002 20:05:16 +0000 (20:05 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 21 May 2002 20:05:16 +0000 (20:05 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2699 91177308-0d34-0410-b5e6-96231b3b80d8

tools/opt/opt.cpp

index 3eedc7c1b6b10320895f3bb2f7c455d3892c6d65..95dde03b590fad5e5a7bb740e98c143e9bdb465c 100644 (file)
@@ -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<enum Opts> 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"),