[PATCH] D86177: [llvm-mca][NFC] Separate calculation of display data from its display in the summary and instruction info views

Andrea Di Biagio via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 19 02:04:17 PDT 2020


andreadb added a comment.

Nice!

Thanks Wolfgang! I always wanted to add a structured output to llvm-mca.
Thanks for working on this.

I also agree with the idea of splitting the process in two stages: a preliminar stage to collect the data from a view, a second (and final) stage where the data collected during the first stage is properly structured and printed out.

I agree with Roman in that we should not guarantee stability of data and/or structure.
Also, changes to the output structure should always be advertised (for example, by adding a line in the release notes), so that people are always aware of it.

That being said, it is not impossible for most (if not all) default views to guarantee stability of data (but not structure). After all, default views rarely (if ever) change in practice.
However, to guarantee data stability, we need some form of versioning and ideally an "auto-upgrade" functionality too (to convert/map data from an older structure to elements of the new structure). The way how I see it is that there is no need to implement this now. We can always add more guarantees in the future if we really think it is worth it.

About the patch:
Roman has already pointed out what can be improved in the patch (foreach loops / default initializer / etc.). I have nothing else to add on it.
I like your design and the general direction. I will be happy to accept this patch once comments from Roman are addressed.

Thanks,
Andrea


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

https://reviews.llvm.org/D86177



More information about the llvm-commits mailing list