Removing MachineResource class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13291 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Tanya Lattner 2004-04-30 20:40:38 +00:00
parent eeddcdc8c7
commit 0e1c48b209
2 changed files with 7 additions and 17 deletions

View File

@ -62,24 +62,15 @@ namespace llvm {
typedef unsigned resourceId_t;
struct MachineResource {
struct CPUResource {
const std::string rname;
resourceId_t rid;
MachineResource(const std::string &resourceName)
: rname(resourceName), rid(nextId++) {}
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) {}
CPUResource(const std::string& resourceName, int maxUsers)
: rname(resourceName), rid(nextId++), maxNumUsers(maxUsers) {}
private:
static resourceId_t nextId;
};
@ -312,8 +303,7 @@ protected:
friend class ModuloSchedGraph;
friend class ModuloScheduling;
friend class ModuloSchedulingPass;
};

View File

@ -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.