[llvm-exegesis] Fix PfmIssueCountersTable creation
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 19 Apr 2018 10:59:49 +0000 (10:59 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 19 Apr 2018 10:59:49 +0000 (10:59 +0000)
commitb04cd1b9f3a877290d893c9a19ea3ea40e38a135
treec5885bf5814817cf19680312b5ae6056177ef1e3
parent147fc016e3ce9575545d55837c2e4775c7ca67c9
[llvm-exegesis] Fix PfmIssueCountersTable creation

This patch ensures that the pfm issue counter tables are the correct size, accounting for the invalid resource entry at the beginning of the resource tables.

It also fixes an issue with pfm failing to match event counters due to a trailing comma added to all the event names.

I've also added a counter comment to each entry as it helps locate problems with the tables.

Note: I don't have access to a SandyBridge test machine, which is the only model to make use of multiple event counters being mapped to a single resource. I don't know if pfm accepts a comma-seperated list or not, but that is what it was doing.

Differential Revision: https://reviews.llvm.org/D45787

llvm-svn: 330317
llvm/utils/TableGen/SubtargetEmitter.cpp