[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
Sat May 5 21:44:32 PDT 2018


mattd updated this revision to Diff 145393.
mattd added a comment.

Respin of the previous patch:

- InstRef  is now a pair <SourceMgr index,  Instruction *>, with added sanity checks and convenience accessors.
- SourceRef is a new type and defined as a pair <SourceMgr index, MCInst>

I'm not sure this is ideal, yet, but it is one step closer to sharing a common interface across various MCA components.  The previous patch already updated the Event interface.  I kept those changes, as it eliminates the need to have an Owner pointer for lookup in those cases, since we now have the InstRef containing the Instruction that was needed.


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/InstrBuilder.h
  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/SourceMgr.h
  tools/llvm-mca/TimelineView.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46367.145393.patch
Type: text/x-patch
Size: 37097 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180506/8dfe143f/attachment.bin>


More information about the llvm-commits mailing list