[PATCH] D46367: [llvm-mca] Avoid exposing index values in the MCA interfaces.
Matt Davis via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 2 15:28:27 PDT 2018
mattd created this revision.
mattd added reviewers: andreadb, courbet, RKSimon.
Herald added subscribers: gbedwell, tschuett, javed.absar.
mattd edited the summary of this revision.
This patch eliminates many places where we originally needed to pass index
values to represent an instruction. The index is still used as a key, in various parts of
MCA. I'm not comfortable eliminating the index just yet. By burying the index in
the instruction, we can avoid exposing that value in many places.
Eventually, we should consider removing the Instructions list in the Backend
all together, it's only used to hold and reclaim the memory for the allocated
Instruction instances. Instead we could pass around a smart pointer. But that's
a separate discussion/patch.
https://reviews.llvm.org/D46367
Files:
tools/llvm-mca/Backend.cpp
tools/llvm-mca/Backend.h
tools/llvm-mca/Dispatch.cpp
tools/llvm-mca/Dispatch.h
tools/llvm-mca/HWEventListener.h
tools/llvm-mca/InstrBuilder.cpp
tools/llvm-mca/Instruction.h
tools/llvm-mca/InstructionTables.cpp
tools/llvm-mca/LSUnit.cpp
tools/llvm-mca/LSUnit.h
tools/llvm-mca/ResourcePressureView.cpp
tools/llvm-mca/RetireControlUnit.cpp
tools/llvm-mca/RetireControlUnit.h
tools/llvm-mca/Scheduler.cpp
tools/llvm-mca/Scheduler.h
tools/llvm-mca/TimelineView.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46367.144942.patch
Type: text/x-patch
Size: 31489 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180502/2ba4ec43/attachment-0001.bin>
More information about the llvm-commits
mailing list