[PATCH] D86390: [llvm-mca][NFC] Refactor instruction printing

Wolfgang Pieb via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 24 17:24:48 PDT 2020


wolfgangp updated this revision to Diff 287525.
wolfgangp added a comment.

After some consultation with @andreadb this is some more extensive refactoring:
We create a new base class //InstructionView //that is meant for views that deal with individual instructions (e.g. print them). The 3 members MCIP (the instruction printer), STI (subtarget info) and Source (the array of machine instructions) live there and can be accessed via getters (they could be made protected as well). Printing the instructions is effected by using a string member in the new base class (which must be mutable along with its associated stream).

All this has the effect that only views that we don't use any globals for instruction printing while simplifying the code.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86390/new/

https://reviews.llvm.org/D86390

Files:
  llvm/tools/llvm-mca/Views/BottleneckAnalysis.cpp
  llvm/tools/llvm-mca/Views/BottleneckAnalysis.h
  llvm/tools/llvm-mca/Views/InstructionInfoView.cpp
  llvm/tools/llvm-mca/Views/InstructionInfoView.h
  llvm/tools/llvm-mca/Views/ResourcePressureView.cpp
  llvm/tools/llvm-mca/Views/ResourcePressureView.h
  llvm/tools/llvm-mca/Views/TimelineView.cpp
  llvm/tools/llvm-mca/Views/TimelineView.h
  llvm/tools/llvm-mca/Views/View.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86390.287525.patch
Type: text/x-patch
Size: 22147 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200825/88bbb511/attachment-0001.bin>


More information about the llvm-commits mailing list