mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
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:
parent
eeddcdc8c7
commit
0e1c48b209
@ -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;
|
||||
|
||||
};
|
||||
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user