make legalize types be a command line option: -enable-legalize-types.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53434 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2008-07-10 23:37:50 +00:00
parent 0ebf14c4bb
commit 70587ea813

View 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();