mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-13 01:15:32 +00:00
Some minor scheduler changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25597 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0d718e9afc
commit
0993f1d833
@ -37,6 +37,7 @@ namespace llvm {
|
|||||||
|
|
||||||
// Scheduling heuristics
|
// Scheduling heuristics
|
||||||
enum SchedHeuristics {
|
enum SchedHeuristics {
|
||||||
|
defaultScheduling, // Let the target specify its preference.
|
||||||
noScheduling, // No scheduling, emit breath first sequence.
|
noScheduling, // No scheduling, emit breath first sequence.
|
||||||
simpleScheduling, // Two pass, min. critical path, max. utilization.
|
simpleScheduling, // Two pass, min. critical path, max. utilization.
|
||||||
simpleNoItinScheduling, // Same as above exact using generic latency.
|
simpleNoItinScheduling, // Same as above exact using generic latency.
|
||||||
@ -51,6 +52,8 @@ namespace llvm {
|
|||||||
class NodeGroup {
|
class NodeGroup {
|
||||||
private:
|
private:
|
||||||
NIVector Members; // Group member nodes
|
NIVector Members; // Group member nodes
|
||||||
|
NodeInfo *Top;
|
||||||
|
NodeInfo *Bottom;
|
||||||
NodeInfo *Dominator; // Node with highest latency
|
NodeInfo *Dominator; // Node with highest latency
|
||||||
unsigned Latency; // Total latency of the group
|
unsigned Latency; // Total latency of the group
|
||||||
int Pending; // Number of visits pending before
|
int Pending; // Number of visits pending before
|
||||||
@ -58,10 +61,12 @@ namespace llvm {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
// Ctor.
|
// Ctor.
|
||||||
NodeGroup() : Dominator(NULL), Pending(0) {}
|
NodeGroup() : Top(NULL), Bottom(NULL), Dominator(NULL), Pending(0) {}
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
inline void setDominator(NodeInfo *D) { Dominator = D; }
|
inline void setDominator(NodeInfo *D) { Dominator = D; }
|
||||||
|
inline NodeInfo *getTop() { return Top; }
|
||||||
|
inline NodeInfo *getBottom() { return Bottom; }
|
||||||
inline NodeInfo *getDominator() { return Dominator; }
|
inline NodeInfo *getDominator() { return Dominator; }
|
||||||
inline void setLatency(unsigned L) { Latency = L; }
|
inline void setLatency(unsigned L) { Latency = L; }
|
||||||
inline unsigned getLatency() { return Latency; }
|
inline unsigned getLatency() { return Latency; }
|
||||||
@ -94,7 +99,7 @@ namespace llvm {
|
|||||||
class NodeInfo {
|
class NodeInfo {
|
||||||
private:
|
private:
|
||||||
int Pending; // Number of visits pending before
|
int Pending; // Number of visits pending before
|
||||||
// adding to order
|
// adding to order
|
||||||
public:
|
public:
|
||||||
SDNode *Node; // DAG node
|
SDNode *Node; // DAG node
|
||||||
InstrStage *StageBegin; // First stage in itinerary
|
InstrStage *StageBegin; // First stage in itinerary
|
||||||
@ -279,7 +284,7 @@ namespace llvm {
|
|||||||
|
|
||||||
/// isPassiveNode - Return true if the node is a non-scheduled leaf.
|
/// isPassiveNode - Return true if the node is a non-scheduled leaf.
|
||||||
///
|
///
|
||||||
bool isPassiveNode(SDNode *Node) {
|
static bool isPassiveNode(SDNode *Node) {
|
||||||
if (isa<ConstantSDNode>(Node)) return true;
|
if (isa<ConstantSDNode>(Node)) return true;
|
||||||
if (isa<RegisterSDNode>(Node)) return true;
|
if (isa<RegisterSDNode>(Node)) return true;
|
||||||
if (isa<GlobalAddressSDNode>(Node)) return true;
|
if (isa<GlobalAddressSDNode>(Node)) return true;
|
||||||
@ -316,7 +321,7 @@ namespace llvm {
|
|||||||
|
|
||||||
void dump(const char *tag) const;
|
void dump(const char *tag) const;
|
||||||
|
|
||||||
void dump() const;
|
virtual void dump() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// PrepareNodeInfo - Set up the basic minimum node info for scheduling.
|
/// PrepareNodeInfo - Set up the basic minimum node info for scheduling.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user