[llvm] [llvm-exegesis] Add raw PMU encoding in TargetPfmCounters tablegen (PR #201228)

Min-Yih Hsu via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 4 15:48:47 PDT 2026


mshockwave wrote:

> The struct changes and PerfHelper wiring are scoped for the subsequent patch. The altered PfmCountersInfo struct would add 2 int fields for each counter, without touching CycleCounter/UopsCounter. For example:
> 
> ```c++
> static const PfmCountersInfo RISCVDefaultPfmCounters = {
>   nullptr,  // Cycle counter
>   0x003c,  // Cycle counter event select.
>   0x00,  // Cycle counter Umask.
>   nullptr,  // No uops counter.
>   0x00c2,  // Uops counter event select.
>   0x01,  // Uops counter Umask.
>   nullptr, 0, // No issue counters
>   nullptr, 0 // No validation counters.
> };
> ```
> 
> Emitter output is forward compatible with that change. Can fold it into this patch if you'd prefer it self-contained. Let me know.

there are currently 6 fields in `PfmCountersInfo`, but the new TableGen-erated code you just showed has 10 fields, why is this forward compatible?
(Note: every single LLVM commit has to be buildable and has to pass all the tests)

https://github.com/llvm/llvm-project/pull/201228


More information about the llvm-commits mailing list