diff --git a/llvm/tools/llvm-mca/Dispatch.cpp b/llvm/tools/llvm-mca/Dispatch.cpp index ae9b2edc7e2a..52968ea1174f 100644 --- a/llvm/tools/llvm-mca/Dispatch.cpp +++ b/llvm/tools/llvm-mca/Dispatch.cpp @@ -150,7 +150,7 @@ void RegisterFile::collectWrites(SmallVectorImpl &Writes, } } -unsigned RegisterFile::isAvailable(const ArrayRef Regs) const { +unsigned RegisterFile::isAvailable(ArrayRef Regs) const { SmallVector NumTemporaries(getNumRegisterFiles()); // Find how many new mappings must be created for each register file. diff --git a/llvm/tools/llvm-mca/Dispatch.h b/llvm/tools/llvm-mca/Dispatch.h index e7c63c6ba7db..bd7bd1689016 100644 --- a/llvm/tools/llvm-mca/Dispatch.h +++ b/llvm/tools/llvm-mca/Dispatch.h @@ -134,7 +134,7 @@ public: // For example: if all register files are available, then the response mask // is a bitmask of all zeroes. If Instead register file #1 is not available, // then the response mask is 0b10. - unsigned isAvailable(const llvm::ArrayRef Regs) const; + unsigned isAvailable(llvm::ArrayRef Regs) const; void collectWrites(llvm::SmallVectorImpl &Writes, unsigned RegID) const; void updateOnRead(ReadState &RS, unsigned RegID); diff --git a/llvm/tools/llvm-mca/HWEventListener.h b/llvm/tools/llvm-mca/HWEventListener.h index 9b8ba124ce48..220c3ffed75d 100644 --- a/llvm/tools/llvm-mca/HWEventListener.h +++ b/llvm/tools/llvm-mca/HWEventListener.h @@ -48,8 +48,8 @@ public: LastGenericEventType, }; - HWInstructionEvent(unsigned Type, unsigned Index) - : Type(Type), Index(Index) {} + HWInstructionEvent(unsigned type, unsigned index) + : Type(type), Index(index) {} // The event type. The exact meaning depends on the subtarget. const unsigned Type; @@ -61,11 +61,11 @@ class HWInstructionIssuedEvent : public HWInstructionEvent { public: using ResourceRef = std::pair; HWInstructionIssuedEvent( - unsigned Index, const llvm::ArrayRef> UR) + unsigned Index, llvm::ArrayRef> UR) : HWInstructionEvent(HWInstructionEvent::Issued, Index), UsedResources(UR) {} - const llvm::ArrayRef> UsedResources; + llvm::ArrayRef> UsedResources; }; // A HWStallEvent represents a pipeline stall caused by the lack of hardware diff --git a/llvm/tools/llvm-mca/InstrBuilder.cpp b/llvm/tools/llvm-mca/InstrBuilder.cpp index 82b5f16d246e..07a21cf0633b 100644 --- a/llvm/tools/llvm-mca/InstrBuilder.cpp +++ b/llvm/tools/llvm-mca/InstrBuilder.cpp @@ -26,7 +26,7 @@ using namespace llvm; static void initializeUsedResources(InstrDesc &ID, const MCSchedClassDesc &SCDesc, const MCSubtargetInfo &STI, - const ArrayRef ProcResourceMasks) { + ArrayRef ProcResourceMasks) { const MCSchedModel &SM = STI.getSchedModel(); // Populate resources consumed. diff --git a/llvm/tools/llvm-mca/Scheduler.cpp b/llvm/tools/llvm-mca/Scheduler.cpp index 8a42cd0877a8..2a938b872ebb 100644 --- a/llvm/tools/llvm-mca/Scheduler.cpp +++ b/llvm/tools/llvm-mca/Scheduler.cpp @@ -124,7 +124,7 @@ void ResourceManager::release(ResourceRef RR) { } ResourceStateEvent -ResourceManager::canBeDispatched(const ArrayRef Buffers) const { +ResourceManager::canBeDispatched(ArrayRef Buffers) const { ResourceStateEvent Result = ResourceStateEvent::RS_BUFFER_AVAILABLE; for (uint64_t Buffer : Buffers) { Result = isBufferAvailable(Buffer); @@ -134,7 +134,7 @@ ResourceManager::canBeDispatched(const ArrayRef Buffers) const { return Result; } -void ResourceManager::reserveBuffers(const ArrayRef Buffers) { +void ResourceManager::reserveBuffers(ArrayRef Buffers) { for (const uint64_t R : Buffers) { reserveBuffer(R); ResourceState &Resource = *Resources[R]; @@ -145,7 +145,7 @@ void ResourceManager::reserveBuffers(const ArrayRef Buffers) { } } -void ResourceManager::releaseBuffers(const ArrayRef Buffers) { +void ResourceManager::releaseBuffers(ArrayRef Buffers) { for (const uint64_t R : Buffers) releaseBuffer(R); } @@ -423,7 +423,7 @@ void Scheduler::updateIssuedQueue() { } void Scheduler::notifyInstructionIssued( - unsigned Index, const ArrayRef> &Used) { + unsigned Index, ArrayRef> Used) { DEBUG({ dbgs() << "[E] Instruction Issued: " << Index << '\n'; for (const std::pair &Resource : Used) { diff --git a/llvm/tools/llvm-mca/Scheduler.h b/llvm/tools/llvm-mca/Scheduler.h index 93c5295e8d59..6f677744a383 100644 --- a/llvm/tools/llvm-mca/Scheduler.h +++ b/llvm/tools/llvm-mca/Scheduler.h @@ -339,10 +339,10 @@ public: // Consume a slot in every buffered resource from array 'Buffers'. Resource // units that are dispatch hazards (i.e. BufferSize=0) are marked as reserved. - void reserveBuffers(const llvm::ArrayRef Buffers); + void reserveBuffers(llvm::ArrayRef Buffers); // Release buffer entries previously allocated by method reserveBuffers. - void releaseBuffers(const llvm::ArrayRef Buffers); + void releaseBuffers(llvm::ArrayRef Buffers); void reserveResource(uint64_t ResourceID) { ResourceState &Resource = *Resources[ResourceID]; @@ -420,7 +420,7 @@ class Scheduler { void notifyInstructionIssued( unsigned Index, - const llvm::ArrayRef> &Used); + llvm::ArrayRef> Used); void notifyInstructionExecuted(unsigned Index); void notifyInstructionReady(unsigned Index); void notifyResourceAvailable(const ResourceRef &RR);