This is an archive of the discontinued LLVM Phabricator instance.

[llvm-mca] Print InstructionInfoView using Instrument information.
ClosedPublic

Authored by michaelmaitland on May 12 2023, 9:58 AM.

Details

Summary

Previous reports calculated the overall report using Instrument
information but did not print out per-instruction data using
Instrument information. This change fixes that.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptMay 12 2023, 9:58 AM
michaelmaitland requested review of this revision.May 12 2023, 9:58 AM
myhsu added inline comments.May 12 2023, 10:18 AM
llvm/tools/llvm-mca/Views/InstructionInfoView.cpp
123

I think you need to check if &Inst exists in InstToInstruments here (If it's unlikely to happen then maybe put it as an assertion just in case)

llvm/tools/llvm-mca/Views/InstructionInfoView.h
62

I think it'll be better to use DenseMap here since the key is a pointer.

90

nit: could you use a type alias for InstToInstruments's type? it'll be easier to read

michaelmaitland marked 3 inline comments as done.
  • Check InstToInstruments lookup exists
  • Use DenseMap
  • Use Type alias for InstToInstruments
myhsu accepted this revision.May 18 2023, 2:36 PM

LGTM Thanks!

This revision is now accepted and ready to land.May 18 2023, 2:36 PM
This revision was landed with ongoing or failed builds.May 22 2023, 4:42 PM
This revision was automatically updated to reflect the committed changes.