aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/TargetSchedInfo.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Target/TargetSchedInfo.cpp b/lib/Target/TargetSchedInfo.cpp
index a4a27e7..1f5a57d 100644
--- a/lib/Target/TargetSchedInfo.cpp
+++ b/lib/Target/TargetSchedInfo.cpp
@@ -19,6 +19,9 @@ namespace llvm {
resourceId_t CPUResource::nextId = 0;
+CPUResource::CPUResource(const std::string& resourceName, int maxUsers)
+ : rname(resourceName), rid(nextId++), maxNumUsers(maxUsers) {}
+
// Check if fromRVec and toRVec have *any* common entries.
// Assume the vectors are sorted in increasing order.
// Algorithm copied from function set_intersection() for sorted ranges