- if (!isPassiveNode(N)) {
- SUnit *SU;
- if (NI->isInGroup()) {
- if (NI != NI->Group->getBottom()) // Bottom up, so only look at bottom
- continue; // node of the NodeGroup
-
- SU = new SUnit(N);
-
- // Find the flagged nodes.
- SDOperand FlagOp = N->getOperand(N->getNumOperands() - 1);
- SDNode *Flag = FlagOp.Val;
- unsigned ResNo = FlagOp.ResNo;
- while (Flag->getValueType(ResNo) == MVT::Flag) {
- NodeInfo *FNI = getNI(Flag);
- assert(FNI->Group == NI->Group);
- SU->FlaggedNodes.insert(SU->FlaggedNodes.begin(), Flag);
- SUnitMap[Flag] = SU;
-
- FlagOp = Flag->getOperand(Flag->getNumOperands() - 1);
- Flag = FlagOp.Val;
- ResNo = FlagOp.ResNo;
- }
-
- // Find all predecessors (of the group).
- NodeGroupOpIterator NGOI(NI);
- while (!NGOI.isEnd()) {
- SDOperand Op = NGOI.next();
- SDNode *OpN = Op.Val;
- MVT::ValueType VT = OpN->getValueType(Op.ResNo);
- NodeInfo *OpNI = getNI(OpN);
- if (OpNI->Group != NI->Group && !isPassiveNode(OpN)) {
- assert(VT != MVT::Flag);
- if (VT == MVT::Other)
- SU->ChainPreds.push_back(OpN);
- else
- SU->Preds.push_back(OpN);
- SU->NumPredsLeft++;
- }
- }
+ if (isPassiveNode(N))
+ continue;
+
+ SUnit *SU;
+ if (NI->isInGroup()) {
+ if (NI != NI->Group->getBottom()) // Bottom up, so only look at bottom
+ continue; // node of the NodeGroup
+
+ SU = NewSUnit(N);
+ // Find the flagged nodes.
+ SDOperand FlagOp = N->getOperand(N->getNumOperands() - 1);
+ SDNode *Flag = FlagOp.Val;
+ unsigned ResNo = FlagOp.ResNo;
+ while (Flag->getValueType(ResNo) == MVT::Flag) {
+ NodeInfo *FNI = getNI(Flag);
+ assert(FNI->Group == NI->Group);
+ SU->FlaggedNodes.insert(SU->FlaggedNodes.begin(), Flag);
+ SUnitMap[Flag] = SU;
+
+ FlagOp = Flag->getOperand(Flag->getNumOperands() - 1);
+ Flag = FlagOp.Val;
+ ResNo = FlagOp.ResNo;
+ }
+ } else {
+ SU = NewSUnit(N);
+ }
+ SUnitMap[N] = SU;
+ }