aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2010-01-23 10:26:57 +0000
committerBill Wendling <isanbard@gmail.com>2010-01-23 10:26:57 +0000
commit187361b056823df4ff292561fe47468dad956872 (patch)
tree892d1e4b759b29ec8caea499a41df85b38eafb81 /lib/CodeGen/SelectionDAG/SelectionDAG.cpp
parente88a8e6fbf4ea8163eebdbc2f72fa08d72a02532 (diff)
Remove the '-disable-scheduling' flag and replace it with the 'source' option of
the '-pre-RA-sched' flag. It actually makes more sense to do it this way. Also, keep track of the SDNode ordering by default. Eventually, we would like to make this ordering a way to break a "tie" in the scheduler. However, doing that now breaks the "CodeGen/X86/abi-isel.ll" test for 32-bit Linux. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94308 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAG.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 67b6d5c47b..f1b6f1e831 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -593,7 +593,7 @@ void SelectionDAG::DeallocateNode(SDNode *N) {
NodeAllocator.Deallocate(AllNodes.remove(N));
// Remove the ordering of this node.
- if (Ordering) Ordering->remove(N);
+ Ordering->remove(N);
}
/// RemoveNodeFromCSEMaps - Take the specified node out of the CSE map that
@@ -790,8 +790,7 @@ SelectionDAG::SelectionDAG(TargetLowering &tli, FunctionLoweringInfo &fli)
getVTList(MVT::Other)),
Root(getEntryNode()), Ordering(0) {
AllNodes.push_back(&EntryNode);
- if (DisableScheduling)
- Ordering = new SDNodeOrdering();
+ Ordering = new SDNodeOrdering();
}
void SelectionDAG::init(MachineFunction &mf, MachineModuleInfo *mmi,
@@ -830,8 +829,7 @@ void SelectionDAG::clear() {
EntryNode.UseList = 0;
AllNodes.push_back(&EntryNode);
Root = getEntryNode();
- if (DisableScheduling)
- Ordering = new SDNodeOrdering();
+ Ordering = new SDNodeOrdering();
}
SDValue SelectionDAG::getSExtOrTrunc(SDValue Op, DebugLoc DL, EVT VT) {
@@ -5241,14 +5239,13 @@ unsigned SelectionDAG::AssignTopologicalOrder() {
/// AssignOrdering - Assign an order to the SDNode.
void SelectionDAG::AssignOrdering(SDNode *SD, unsigned Order) {
assert(SD && "Trying to assign an order to a null node!");
- if (Ordering)
- Ordering->add(SD, Order);
+ Ordering->add(SD, Order);
}
/// GetOrdering - Get the order for the SDNode.
unsigned SelectionDAG::GetOrdering(const SDNode *SD) const {
assert(SD && "Trying to get the order of a null node!");
- return Ordering ? Ordering->getOrder(SD) : 0;
+ return Ordering->getOrder(SD);
}