1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00

Removing MachineResource class.

llvm-svn: 13291
This commit is contained in:
Tanya Lattner 2004-04-30 20:40:38 +00:00
parent d7ac5532a6
commit 077c819d5a
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.