summaryrefslogtreecommitdiff
path: root/lib/Target/SparcV9/InstrSched/SchedPriorities.h
diff options
context:
space:
mode:
authorVikram S. Adve <vadve@cs.uiuc.edu>2002-07-08 22:59:23 +0000
committerVikram S. Adve <vadve@cs.uiuc.edu>2002-07-08 22:59:23 +0000
commit0baf1c0911017be6626cf4fe4cc78d345fdc9a27 (patch)
tree9d67304cb681519a305dc581beea8a60fcd4fc7d /lib/Target/SparcV9/InstrSched/SchedPriorities.h
parent9afa88c3a73187b9454085651807896002e020ca (diff)
downloadllvm-0baf1c0911017be6626cf4fe4cc78d345fdc9a27.tar.gz
llvm-0baf1c0911017be6626cf4fe4cc78d345fdc9a27.tar.bz2
llvm-0baf1c0911017be6626cf4fe4cc78d345fdc9a27.tar.xz
A single MachineInstr operand may now be both a def and a use,
so additional dep. edges have to be added. This was needed to correctly handle conditional move instructions! MachineCodeForBasicBlock is now an annotation on BasicBlock. Renamed "earliestForNode" to "earliestReadyTimeForNode". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2826 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SparcV9/InstrSched/SchedPriorities.h')
-rw-r--r--lib/Target/SparcV9/InstrSched/SchedPriorities.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/lib/Target/SparcV9/InstrSched/SchedPriorities.h b/lib/Target/SparcV9/InstrSched/SchedPriorities.h
index a34557ca15..f5c29b27e3 100644
--- a/lib/Target/SparcV9/InstrSched/SchedPriorities.h
+++ b/lib/Target/SparcV9/InstrSched/SchedPriorities.h
@@ -159,7 +159,8 @@ private:
FunctionLiveVarInfo &methodLiveVarInfo;
std::hash_map<const MachineInstr*, bool> lastUseMap;
std::vector<cycles_t> nodeDelayVec;
- std::vector<cycles_t> earliestForNode;
+ std::vector<cycles_t> nodeEarliestUseVec;
+ std::vector<cycles_t> earliestReadyTimeForNode;
cycles_t earliestReadyTime;
NodeHeap candsAsHeap; // candidate nodes, ready to go
std::hash_set<const SchedGraphNode*> candsAsSet;//same entries as candsAsHeap,
@@ -183,14 +184,21 @@ private:
const SchedGraphNode* graphNode);
// NOTE: The next two return references to the actual vector entries.
- // Use with care.
+ // Use the following two if you don't need to modify the value.
cycles_t& getNodeDelayRef (const SchedGraphNode* node) {
assert(node->getNodeId() < nodeDelayVec.size());
return nodeDelayVec[node->getNodeId()];
}
- cycles_t& getEarliestForNodeRef (const SchedGraphNode* node) {
- assert(node->getNodeId() < earliestForNode.size());
- return earliestForNode[node->getNodeId()];
+ cycles_t& getEarliestReadyTimeForNodeRef (const SchedGraphNode* node) {
+ assert(node->getNodeId() < earliestReadyTimeForNode.size());
+ return earliestReadyTimeForNode[node->getNodeId()];
+ }
+
+ cycles_t getNodeDelay (const SchedGraphNode* node) const {
+ return ((SchedPriorities*) this)->getNodeDelayRef(node);
+ }
+ cycles_t getEarliestReadyTimeForNode(const SchedGraphNode* node) const {
+ return ((SchedPriorities*) this)->getEarliestReadyTimeForNodeRef(node);
}
};