summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-mca
diff options
context:
space:
mode:
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2018-03-20 19:06:34 +0000
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>2018-03-20 19:06:34 +0000
commit847accd001a7956f0b6b6a4b6e98e111331ba826 (patch)
tree4052d39bb7e18fe8b93e82e7f345b7d7bc103669 /llvm/tools/llvm-mca
parentc2dbd677bd790ff750acff632dfc81c2d3895f8c (diff)
downloadbcm5719-llvm-847accd001a7956f0b6b6a4b6e98e111331ba826.tar.gz
bcm5719-llvm-847accd001a7956f0b6b6a4b6e98e111331ba826.zip
[llvm-mca] Remove const from a bunch of ArrayRef. NFC
llvm-svn: 328018
Diffstat (limited to 'llvm/tools/llvm-mca')
-rw-r--r--llvm/tools/llvm-mca/Dispatch.cpp2
-rw-r--r--llvm/tools/llvm-mca/Dispatch.h2
-rw-r--r--llvm/tools/llvm-mca/HWEventListener.h8
-rw-r--r--llvm/tools/llvm-mca/InstrBuilder.cpp2
-rw-r--r--llvm/tools/llvm-mca/Scheduler.cpp8
-rw-r--r--llvm/tools/llvm-mca/Scheduler.h6
6 files changed, 14 insertions, 14 deletions
diff --git a/llvm/tools/llvm-mca/Dispatch.cpp b/llvm/tools/llvm-mca/Dispatch.cpp
index ae9b2edc7e2..52968ea1174 100644
--- a/llvm/tools/llvm-mca/Dispatch.cpp
+++ b/llvm/tools/llvm-mca/Dispatch.cpp
@@ -150,7 +150,7 @@ void RegisterFile::collectWrites(SmallVectorImpl<WriteState *> &Writes,
}
}
-unsigned RegisterFile::isAvailable(const ArrayRef<unsigned> Regs) const {
+unsigned RegisterFile::isAvailable(ArrayRef<unsigned> Regs) const {
SmallVector<unsigned, 4> 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 e7c63c6ba7d..bd7bd168901 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<unsigned> Regs) const;
+ unsigned isAvailable(llvm::ArrayRef<unsigned> Regs) const;
void collectWrites(llvm::SmallVectorImpl<WriteState *> &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 9b8ba124ce4..220c3ffed75 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<uint64_t, uint64_t>;
HWInstructionIssuedEvent(
- unsigned Index, const llvm::ArrayRef<std::pair<ResourceRef, unsigned>> UR)
+ unsigned Index, llvm::ArrayRef<std::pair<ResourceRef, unsigned>> UR)
: HWInstructionEvent(HWInstructionEvent::Issued, Index),
UsedResources(UR) {}
- const llvm::ArrayRef<std::pair<ResourceRef, unsigned>> UsedResources;
+ llvm::ArrayRef<std::pair<ResourceRef, unsigned>> 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 82b5f16d246..07a21cf0633 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<uint64_t> ProcResourceMasks) {
+ ArrayRef<uint64_t> 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 8a42cd0877a..2a938b872eb 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<uint64_t> Buffers) const {
+ResourceManager::canBeDispatched(ArrayRef<uint64_t> Buffers) const {
ResourceStateEvent Result = ResourceStateEvent::RS_BUFFER_AVAILABLE;
for (uint64_t Buffer : Buffers) {
Result = isBufferAvailable(Buffer);
@@ -134,7 +134,7 @@ ResourceManager::canBeDispatched(const ArrayRef<uint64_t> Buffers) const {
return Result;
}
-void ResourceManager::reserveBuffers(const ArrayRef<uint64_t> Buffers) {
+void ResourceManager::reserveBuffers(ArrayRef<uint64_t> Buffers) {
for (const uint64_t R : Buffers) {
reserveBuffer(R);
ResourceState &Resource = *Resources[R];
@@ -145,7 +145,7 @@ void ResourceManager::reserveBuffers(const ArrayRef<uint64_t> Buffers) {
}
}
-void ResourceManager::releaseBuffers(const ArrayRef<uint64_t> Buffers) {
+void ResourceManager::releaseBuffers(ArrayRef<uint64_t> Buffers) {
for (const uint64_t R : Buffers)
releaseBuffer(R);
}
@@ -423,7 +423,7 @@ void Scheduler::updateIssuedQueue() {
}
void Scheduler::notifyInstructionIssued(
- unsigned Index, const ArrayRef<std::pair<ResourceRef, unsigned>> &Used) {
+ unsigned Index, ArrayRef<std::pair<ResourceRef, unsigned>> Used) {
DEBUG({
dbgs() << "[E] Instruction Issued: " << Index << '\n';
for (const std::pair<ResourceRef, unsigned> &Resource : Used) {
diff --git a/llvm/tools/llvm-mca/Scheduler.h b/llvm/tools/llvm-mca/Scheduler.h
index 93c5295e8d5..6f677744a38 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<uint64_t> Buffers);
+ void reserveBuffers(llvm::ArrayRef<uint64_t> Buffers);
// Release buffer entries previously allocated by method reserveBuffers.
- void releaseBuffers(const llvm::ArrayRef<uint64_t> Buffers);
+ void releaseBuffers(llvm::ArrayRef<uint64_t> Buffers);
void reserveResource(uint64_t ResourceID) {
ResourceState &Resource = *Resources[ResourceID];
@@ -420,7 +420,7 @@ class Scheduler {
void notifyInstructionIssued(
unsigned Index,
- const llvm::ArrayRef<std::pair<ResourceRef, unsigned>> &Used);
+ llvm::ArrayRef<std::pair<ResourceRef, unsigned>> Used);
void notifyInstructionExecuted(unsigned Index);
void notifyInstructionReady(unsigned Index);
void notifyResourceAvailable(const ResourceRef &RR);
OpenPOWER on IntegriCloud