Instead of printing each region individually when using JSON format, this patch creates a JSON object which is updated with the values of each region and prints at the end.
This patch also adds a new test considering 2 nested regions.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
This patch also adds a new test considering 2 nested regions.
Hi,
I only see changes to Views.s. Did you forget to upload the new test?
llvm/test/tools/llvm-mca/JSON/X86/views-multiple-region.s | ||
---|---|---|
53–72 ↗ | (On Diff #357188) | 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"? |
"Resources" is now at top-level in the output. I have specialized a bit the InstructionView for printing only once the "Resources" key at top level even when having multiple regions.
I have some doubts about the coding style when having
if (condition) { stmt; stmt; } else stmtelse;
I have put braces surrounding else stmtelse, but I am not sure if that is correct...
remove tab.