mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
No need to keep track of top and bottom nodes in a group since the vector is
already in order. Thanks Jim for pointing it out. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25608 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0577a22c67
commit
46c01cfe9f
@ -52,8 +52,6 @@ namespace llvm {
|
||||
class NodeGroup {
|
||||
private:
|
||||
NIVector Members; // Group member nodes
|
||||
NodeInfo *Top;
|
||||
NodeInfo *Bottom;
|
||||
NodeInfo *Dominator; // Node with highest latency
|
||||
unsigned Latency; // Total latency of the group
|
||||
int Pending; // Number of visits pending before
|
||||
@ -61,12 +59,12 @@ namespace llvm {
|
||||
|
||||
public:
|
||||
// Ctor.
|
||||
NodeGroup() : Top(NULL), Bottom(NULL), Dominator(NULL), Pending(0) {}
|
||||
NodeGroup() : Dominator(NULL), Pending(0) {}
|
||||
|
||||
// Accessors
|
||||
inline void setDominator(NodeInfo *D) { Dominator = D; }
|
||||
inline NodeInfo *getTop() { return Top; }
|
||||
inline NodeInfo *getBottom() { return Bottom; }
|
||||
inline NodeInfo *getTop() { return Members[0]; }
|
||||
inline NodeInfo *getBottom() { return Members[Members.size()-1]; }
|
||||
inline NodeInfo *getDominator() { return Dominator; }
|
||||
inline void setLatency(unsigned L) { Latency = L; }
|
||||
inline unsigned getLatency() { return Latency; }
|
||||
|
@ -464,7 +464,6 @@ 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;
|
||||
@ -477,7 +476,6 @@ 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;
|
||||
@ -490,14 +488,11 @@ 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…
Reference in New Issue
Block a user