Enable Nate's excellent DAG combiner work by default. This allows the
removal of a bunch of ad-hoc and crufty code from SelectionDAG.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23682 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index f7b5478..3a344a2 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -37,18 +37,6 @@
#include <iostream>
using namespace llvm;
-// Temporary command line code to enable use of the dag combiner as a beta
-// option.
-namespace llvm {
- bool CombinerEnabled;
-}
-namespace {
- cl::opt<bool, true>
- CombineDAG("enable-dag-combiner", cl::Hidden,
- cl::desc("Run the DAG combiner before and after Legalize"),
- cl::location(CombinerEnabled),
- cl::init(false));
-}
#ifndef NDEBUG
static cl::opt<bool>
ViewDAGs("view-isel-dags", cl::Hidden,
@@ -1289,8 +1277,8 @@
// types that are not supported by the target.
BuildSelectionDAG(DAG, LLVMBB, PHINodesToUpdate, FuncInfo);
- // Run the DAG combiner in pre-legalize mode, if we are told to do so
- if (CombinerEnabled) DAG.Combine(false);
+ // Run the DAG combiner in pre-legalize mode.
+ DAG.Combine(false);
DEBUG(std::cerr << "Lowered selection DAG:\n");
DEBUG(DAG.dump());
@@ -1302,8 +1290,8 @@
DEBUG(std::cerr << "Legalized selection DAG:\n");
DEBUG(DAG.dump());
- // Run the DAG combiner in post-legalize mode, if we are told to do so
- if (CombinerEnabled) DAG.Combine(true);
+ // Run the DAG combiner in post-legalize mode.
+ DAG.Combine(true);
if (ViewDAGs) DAG.viewGraph();