This is an archive of the discontinued LLVM Phabricator instance.

[llvm-mca] Store extra information about the driver flags used for the simulation
ClosedPublic

Authored by markoshorro on Jul 15 2021, 9:37 AM.

Details

Summary

Added information stored in PipelineOptions and the MCSubtargetInfo.

Should this information be also printed in the "classic" report? This would require updating almost all tests.

Diff Detail

Event Timeline

markoshorro created this revision.Jul 15 2021, 9:37 AM
markoshorro requested review of this revision.Jul 15 2021, 9:37 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 15 2021, 9:37 AM
andreadb added inline comments.Jul 15 2021, 9:53 AM
llvm/test/tools/llvm-mca/JSON/X86/views.s
163–174

I think that we should just ignore flags like -dispatch, -squeue, -lqueue, etc. if their value hasn't been changed by the user. I suggest to only report flags whose value doesn't correspond to their default.

The only exceptions would be mcpu/march/mtriple which (at least in my opinion) should always be present for completeness.

markoshorro added inline comments.Jul 15 2021, 10:14 AM
llvm/test/tools/llvm-mca/JSON/X86/views.s
163–174

Ok, I agree! Do you think this information should be printed as well in the classic report?

andreadb added inline comments.Jul 15 2021, 10:20 AM
llvm/test/tools/llvm-mca/JSON/X86/views.s
163–174

I think it should only be printed for the json output.

Added new test for output with custom parameters. Only printing parameters if values are not default.

A couple of minor nits. Otherwise it LGTM.

llvm/tools/llvm-mca/PipelinePrinter.cpp
55–56

Please move this early exit before the check at line 52. We don't care about printing the register-file-size if this is an in-order processor (as we don't simulate register renaming).

Also, add an empty line after it to make the code slightly more readable.

Minor edits for readability and avoiding unnecessary information when inorder simulation

This revision was not accepted when it landed; it landed in state Needs Review.Jul 16 2021, 12:19 AM
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.