aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-04-28 02:09:19 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-04-28 02:09:19 +0000
commit552c4a849422ad91fa9988255ae35aebbf3acf7b (patch)
treea1da0428566fb7a146a2fc5945191a98d212d265
parent61a0209a8ac7b55a40f291f30679f16b3eb1d83c (diff)
Added a temporary option -no-isel-fold-inflight to control whether a "inflight"
node can be folded. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28003 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/CodeGen/SelectionDAGISel.h1
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp13
2 files changed, 13 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGISel.h b/include/llvm/CodeGen/SelectionDAGISel.h
index 6ebcda35db..52d85f66d3 100644
--- a/include/llvm/CodeGen/SelectionDAGISel.h
+++ b/include/llvm/CodeGen/SelectionDAGISel.h
@@ -40,6 +40,7 @@ public:
SSARegMap *RegMap;
SelectionDAG *CurDAG;
MachineBasicBlock *BB;
+ bool FoldNodeInFlight;
SelectionDAGISel(TargetLowering &tli) : TLI(tli), JT(0,0,0,0) {}
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 5a97aa6b39..42ba89e41b 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -58,6 +58,14 @@ ViewSchedDAGs("view-sched-dags", cl::Hidden,
static const bool ViewISelDAGs = 0, ViewSchedDAGs = 0;
#endif
+namespace {
+static cl::opt<bool>
+NoFoldNodeInFlight(
+ "no-isel-fold-inflight",
+ cl::Hidden,
+ cl::desc("Do not attempt to fold a node even if it is being selected"));
+}
+
// Scheduling heuristics
enum SchedHeuristics {
defaultScheduling, // Let the target specify its preference.
@@ -3170,7 +3178,10 @@ void SelectionDAGISel::CodeGenAndEmitDAG(SelectionDAG &DAG) {
DAG.Combine(true);
if (ViewISelDAGs) DAG.viewGraph();
-
+
+ // TEMPORARY.
+ FoldNodeInFlight = !NoFoldNodeInFlight;
+
// Third, instruction select all of the operations to machine code, adding the
// code to the MachineBasicBlock.
InstructionSelectBasicBlock(DAG);