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

Wolfgang Pieb via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 24 10:42:02 PDT 2020


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

Here is another proposal: We're using statics for the Instruction string and the stream to write it and return a reference to it.
The users all immediately write the string to a different stream. This should have even fewer allocations than the original code.

This is not MT-capable but I don't think this is a requirement for printing views.


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/InstructionInfoView.cpp
  llvm/tools/llvm-mca/Views/ResourcePressureView.cpp
  llvm/tools/llvm-mca/Views/TimelineView.cpp
  llvm/tools/llvm-mca/Views/View.cpp
  llvm/tools/llvm-mca/Views/View.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86390.287445.patch
Type: text/x-patch
Size: 6851 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200824/e0cfb66f/attachment.bin>


More information about the llvm-commits mailing list