[PATCH] D105618: [llvm-mca] Fix JSON output for multiple regions

Andrea Di Biagio via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 8 06:12:22 PDT 2021


andreadb added inline comments.


================
Comment at: llvm/test/tools/llvm-mca/JSON/X86/views-multiple-region.s:53-72
+# CHECK-NEXT:     "Instructions and CPU resources": {
+# CHECK-NEXT:       "Instructions": [
+# CHECK-NEXT:         "addl\t%ebx, %ebx",
+# CHECK-NEXT:         "addl\t%ecx, %ecx"
+# CHECK-NEXT:       ],
+# CHECK-NEXT:       "Resources": {
+# CHECK-NEXT:         "CPUName": "haswell",
----------------
It is unfortunate how "Resources" is now duplicated for every code region.

I understand that we get this point because "Resources" is contributed by a view (so, it is printed once per code region).

Ideally, there should be only one top-level instance.

Do you know if there is an easy way to avoid duplicating "Resources"?
In retrospect, the idea of printing that info from a view only makes sense if there is a single code region.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105618



More information about the llvm-commits mailing list