forked from OSchip/llvm-project
Reverse the FlaggedNodes after scanning up for flagged preds or else the order would be reversed.
llvm-svn: 29545
This commit is contained in:
parent
d5e38e017c
commit
1640ae5a84
|
@ -55,11 +55,16 @@ void ScheduleDAG::BuildSchedUnits() {
|
|||
|
||||
// Scan up, adding flagged preds to FlaggedNodes.
|
||||
SDNode *N = NI;
|
||||
while (N->getNumOperands() &&
|
||||
N->getOperand(N->getNumOperands()-1).getValueType() == MVT::Flag) {
|
||||
N = N->getOperand(N->getNumOperands()-1).Val;
|
||||
NodeSUnit->FlaggedNodes.push_back(N);
|
||||
SUnitMap[N] = NodeSUnit;
|
||||
if (N->getNumOperands() &&
|
||||
N->getOperand(N->getNumOperands()-1).getValueType() == MVT::Flag) {
|
||||
do {
|
||||
N = N->getOperand(N->getNumOperands()-1).Val;
|
||||
NodeSUnit->FlaggedNodes.push_back(N);
|
||||
SUnitMap[N] = NodeSUnit;
|
||||
} while (N->getNumOperands() &&
|
||||
N->getOperand(N->getNumOperands()-1).getValueType()== MVT::Flag);
|
||||
std::reverse(NodeSUnit->FlaggedNodes.begin(),
|
||||
NodeSUnit->FlaggedNodes.end());
|
||||
}
|
||||
|
||||
// Scan down, adding this node and any flagged succs to FlaggedNodes if they
|
||||
|
|
Loading…
Reference in New Issue