summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-07-10 23:37:50 +0000
committerChris Lattner <sabre@nondot.org>2008-07-10 23:37:50 +0000
commit17b234cf9b84f428ed4eab01bcf6766981fc3e6e (patch)
treed60a064eda7deac0bc7d8dc080f3203d1661fd31 /llvm/lib/CodeGen
parente4a6db3349b26ce6c848aaa2fc5ff2ea22b68722 (diff)
downloadbcm5719-llvm-17b234cf9b84f428ed4eab01bcf6766981fc3e6e.tar.gz
bcm5719-llvm-17b234cf9b84f428ed4eab01bcf6766981fc3e6e.zip
make legalize types be a command line option: -enable-legalize-types.
llvm-svn: 53434
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index bc1eda34083..b4b81cd4f13 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -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();
OpenPOWER on IntegriCloud