aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/llvm/Target/TargetSchedInfo.h20
-rw-r--r--lib/Target/TargetSchedInfo.cpp2
2 files changed, 6 insertions, 16 deletions
diff --git a/include/llvm/Target/TargetSchedInfo.h b/include/llvm/Target/TargetSchedInfo.h
index f979bf0..8f64087 100644
--- a/include/llvm/Target/TargetSchedInfo.h
+++ b/include/llvm/Target/TargetSchedInfo.h
@@ -62,24 +62,15 @@ namespace llvm {
typedef unsigned resourceId_t;
-struct MachineResource {
+struct CPUResource {
const std::string rname;
resourceId_t rid;
+ int maxNumUsers; // MAXINT if no restriction
- MachineResource(const std::string &resourceName)
- : rname(resourceName), rid(nextId++) {}
-
+ CPUResource(const std::string& resourceName, int maxUsers)
+ : rname(resourceName), rid(nextId++), maxNumUsers(maxUsers) {}
private:
static resourceId_t nextId;
- MachineResource(); // disable
-};
-
-
-struct CPUResource : public MachineResource {
- int maxNumUsers; // MAXINT if no restriction
-
- CPUResource(const std::string& rname, int maxUsers)
- : MachineResource(rname), maxNumUsers(maxUsers) {}
};
@@ -312,8 +303,7 @@ protected:
- friend class ModuloSchedGraph;
- friend class ModuloScheduling;
+ friend class ModuloSchedulingPass;
};
diff --git a/lib/Target/TargetSchedInfo.cpp b/lib/Target/TargetSchedInfo.cpp
index 33538ce..a4a27e7 100644
--- a/lib/Target/TargetSchedInfo.cpp
+++ b/lib/Target/TargetSchedInfo.cpp
@@ -17,7 +17,7 @@
namespace llvm {
-resourceId_t MachineResource::nextId = 0;
+resourceId_t CPUResource::nextId = 0;
// Check if fromRVec and toRVec have *any* common entries.
// Assume the vectors are sorted in increasing order.