[PATCH] D45360: [MC][TableGen] Add optional libpfm counter names for ProcResUnits.

Clement Courbet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 6 06:32:00 PDT 2018


courbet marked 2 inline comments as done.
courbet added a comment.

In https://reviews.llvm.org/D45360#1059570, @andreadb wrote:

> Hi Clement,
>
> I prefer that we move all the "optional" information into MCExtraProcessorInfo. I don't like the idea of adding an extra pointer to every single resource defined by a processor (especially if the processor doesn't care about describing perf counters).


Agreed. I've moved all counters to MCExtraProcessorInfo.

> I prefer a more flexible design where perf events can be defined for all resources, and not just for ProcResourceUnits.
>  In future, we may want to add profiling information to resources that are not just pipeline ports. For example, we could add profiling support for hardware scheduler resources. Essentially groups should be considered too.

In terms of generated code, the current design has counters index by ProcResIdx, so nothing needs to change if we decide that we want to add counters to groups too. 
I agree that the schema you propose would be more generic but I'm reluctant to add more complexity to the TableGen schema until it's clear that we need to support counting other things.


Repository:
  rL LLVM

https://reviews.llvm.org/D45360





More information about the llvm-commits mailing list