From b2e1ddbd0b82f4ceda01942f394f699ef72e9048 Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Wed, 16 Jul 2008 11:36:51 +0000 Subject: [PATCH] Turn on LegalizeTypes by default. llvm-svn: 53671 --- lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 10 ++++++---- test/CodeGen/Generic/2007-11-21-UndeadIllegalNode.ll | 2 -- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index bf68040c97a..6253e4631eb 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -52,7 +52,7 @@ using namespace llvm; static cl::opt EnableValueProp("enable-value-prop", cl::Hidden); static cl::opt -EnableLegalizeTypes("enable-legalize-types", cl::Hidden); +DisableLegalizeTypes("disable-legalize-types", cl::Hidden); #ifndef NDEBUG @@ -5296,14 +5296,16 @@ void SelectionDAGISel::CodeGenAndEmitDAG(SelectionDAG &DAG) { DOUT << "Optimized lowered selection DAG:\n"; DEBUG(DAG.dump()); - + // Second step, hack on the DAG until it only uses operations and types that // the target supports. - if (EnableLegalizeTypes) {// Enable this some day. + if (!DisableLegalizeTypes) {// Remove this some day. DAG.LegalizeTypes(); + DOUT << "Type legalized selection DAG:\n"; + DEBUG(DAG.dump()); // TODO: enable a dag combine pass here. } - + if (TimePassesIsEnabled) { NamedRegionTimer T("DAG Legalization", GroupName); DAG.Legalize(); diff --git a/test/CodeGen/Generic/2007-11-21-UndeadIllegalNode.ll b/test/CodeGen/Generic/2007-11-21-UndeadIllegalNode.ll index 1f4e5e19760..cedee6ffbe0 100644 --- a/test/CodeGen/Generic/2007-11-21-UndeadIllegalNode.ll +++ b/test/CodeGen/Generic/2007-11-21-UndeadIllegalNode.ll @@ -1,6 +1,4 @@ ; RUN: llvm-as < %s | llc -o - -; XFAIL: * -; Un-XFAIL this once LegalizeDAGTypes is turned on. target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32" target triple = "i686-pc-linux-gnu"