diff options
Diffstat (limited to 'llvm/tools/llvm-mca/Scheduler.h')
-rw-r--r-- | llvm/tools/llvm-mca/Scheduler.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/llvm/tools/llvm-mca/Scheduler.h b/llvm/tools/llvm-mca/Scheduler.h index 81daaa72c15..4a3d69e076d 100644 --- a/llvm/tools/llvm-mca/Scheduler.h +++ b/llvm/tools/llvm-mca/Scheduler.h @@ -356,9 +356,10 @@ class ResourceManager { public: ResourceManager(const llvm::MCSchedModel &SM) { initialize(SM); } - ResourceStateEvent canBeDispatched(const InstrDesc &Desc) const { + ResourceStateEvent + canBeDispatched(const llvm::ArrayRef<uint64_t> Buffers) const { ResourceStateEvent Result = ResourceStateEvent::RS_BUFFER_AVAILABLE; - for (uint64_t Buffer : Desc.Buffers) { + for (uint64_t Buffer : Buffers) { Result = isBufferAvailable(Buffer); if (Result != ResourceStateEvent::RS_BUFFER_AVAILABLE) break; @@ -367,13 +368,13 @@ public: return Result; } - void reserveBuffers(const InstrDesc &Desc) { - for (const uint64_t R : Desc.Buffers) + void reserveBuffers(const llvm::ArrayRef<uint64_t> Buffers) { + for (const uint64_t R : Buffers) reserveBuffer(R); } - void releaseBuffers(const InstrDesc &Desc) { - for (const uint64_t R : Desc.Buffers) + void releaseBuffers(const llvm::ArrayRef<uint64_t> Buffers) { + for (const uint64_t R : Buffers) releaseBuffer(R); } @@ -388,7 +389,7 @@ public: Resource.clearReserved(); } - void reserveDispatchHazardResources(const InstrDesc &Desc); + void reserveDispatchHazardResources(const llvm::ArrayRef<uint64_t> Buffers); // Returns true if all resources are in-order, and there is at least one // resource which is a dispatch hazard (BufferSize = 0). |