make legalize types be a command line option: -enable-legalize-types.
authorChris Lattner <sabre@nondot.org>
Thu, 10 Jul 2008 23:37:50 +0000 (23:37 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 10 Jul 2008 23:37:50 +0000 (23:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53434 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

index bc1eda34083bf8330a042a2cdbc750618bd8a261..b4b81cd4f1368a11e70d27c9a55a337b1a684b95 100644 (file)
@@ -50,7 +50,9 @@
 using namespace llvm;
 
 static cl::opt<bool>
-EnableValueProp("enable-value-prop", cl::Hidden, cl::init(false));
+EnableValueProp("enable-value-prop", cl::Hidden);
+static cl::opt<bool>
+EnableLegalizeTypes("enable-legalize-types", cl::Hidden);
 
 
 #ifndef NDEBUG
@@ -5296,10 +5298,11 @@ void SelectionDAGISel::CodeGenAndEmitDAG(SelectionDAG &DAG) {
   
   // Second step, hack on the DAG until it only uses operations and types that
   // the target supports.
-#if 0  // Enable this some day.
-  DAG.LegalizeTypes();
-  // Someday even later, enable a dag combine pass here.
-#endif
+  if (EnableLegalizeTypes) {// Enable this some day.
+    DAG.LegalizeTypes();
+    // TODO: enable a dag combine pass here.
+  }
+  
   if (TimePassesIsEnabled) {
     NamedRegionTimer T("DAG Legalization");
     DAG.Legalize();