mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-23 01:31:05 +00:00
Keep track of bottom / top element of a set of flagged nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25600 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3f23952404
commit
e0a5832374
@ -86,7 +86,7 @@ void ScheduleDAG::IdentifyGroups() {
|
||||
if (Op.getValueType() != MVT::Flag) break;
|
||||
// Add to node group
|
||||
NodeGroup::Add(getNI(Op.Val), NI);
|
||||
// Let evryone else know
|
||||
// Let everyone else know
|
||||
HasGroups = true;
|
||||
}
|
||||
}
|
||||
@ -464,6 +464,7 @@ void NodeGroup::Add(NodeInfo *D, NodeInfo *U) {
|
||||
// Merge the two lists
|
||||
DGroup->group_insert(DGroup->group_end(),
|
||||
UGroup->group_begin(), UGroup->group_end());
|
||||
DGroup->Bottom = UGroup->Bottom;
|
||||
} else if (DGroup) {
|
||||
// Make user member of definers group
|
||||
U->Group = DGroup;
|
||||
@ -476,6 +477,7 @@ void NodeGroup::Add(NodeInfo *D, NodeInfo *U) {
|
||||
DGroup->addPending(-CountInternalUses(DNI, U));
|
||||
}
|
||||
DGroup->group_push_back(U);
|
||||
DGroup->Bottom = U;
|
||||
} else if (UGroup) {
|
||||
// Make definer member of users group
|
||||
D->Group = UGroup;
|
||||
@ -488,11 +490,14 @@ void NodeGroup::Add(NodeInfo *D, NodeInfo *U) {
|
||||
UGroup->addPending(-CountInternalUses(D, UNI));
|
||||
}
|
||||
UGroup->group_insert(UGroup->group_begin(), D);
|
||||
UGroup->Top = D;
|
||||
} else {
|
||||
D->Group = U->Group = DGroup = new NodeGroup();
|
||||
DGroup->addPending(D->Node->use_size() + U->Node->use_size() -
|
||||
CountInternalUses(D, U));
|
||||
DGroup->group_push_back(D);
|
||||
DGroup->group_push_back(U);
|
||||
DGroup->Top = D;
|
||||
DGroup->Bottom = U;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user