Assign the ordering of SDNodes in a much less intrusive fashion. After the

"visit*" method is called, take the newly created nodes, walk them in a DFS
fashion, and if they don't have an ordering set, then give it one.

llvm-svn: 94757
This commit is contained in:
Bill Wendling 2010-01-28 21:51:40 +00:00
parent 4c3e7e99ca
commit 954cb187e0
4 changed files with 172 additions and 692 deletions

View File

@ -841,7 +841,7 @@ public:
}
/// AssignOrdering - Assign an order to the SDNode.
void AssignOrdering(SDNode *SD, unsigned Order);
void AssignOrdering(const SDNode *SD, unsigned Order);
/// GetOrdering - Get the order for the SDNode.
unsigned GetOrdering(const SDNode *SD) const;

View File

@ -5237,7 +5237,7 @@ unsigned SelectionDAG::AssignTopologicalOrder() {
}
/// AssignOrdering - Assign an order to the SDNode.
void SelectionDAG::AssignOrdering(SDNode *SD, unsigned Order) {
void SelectionDAG::AssignOrdering(const SDNode *SD, unsigned Order) {
assert(SD && "Trying to assign an order to a null node!");
Ordering->add(SD, Order);
}

File diff suppressed because it is too large Load Diff

View File

@ -342,6 +342,11 @@ public:
void CopyValueToVirtualRegister(Value *V, unsigned Reg);
/// AssignOrderingToNode - Assign an ordering to the node. The order is gotten
/// from how the code appeared in the source. The ordering is used by the
/// scheduler to effectively turn off scheduling.
void AssignOrderingToNode(const SDNode *Node);
void visit(Instruction &I);
void visit(unsigned Opcode, User &I);