[PATCH] D138359: [TableGen] CheckSchedClassTables - check for unnecessary scheduler overrides

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 19 09:42:07 PST 2022


RKSimon created this revision.
RKSimon added reviewers: andreadb, lebedev.ri, dmgreen, foad, sdardis, nemanjai, HaohaiWen, pengfei.
Herald added subscribers: kosarev, steven.zhang, atanasyan, kristof.beyls, arichardson, tpr.
Herald added a project: All.
RKSimon requested review of this revision.
Herald added a project: LLVM.

Pulled out of D47637 <https://reviews.llvm.org/D47637>, which was based off some internal work I did years ago but got lost in the upstreaming process.

This patch adds a SubtargetEmitter::CheckSchedClassTables method to verify the state of the scheduler classes. A command line switch "-check-sched-class-table" is added, which is enabled by default for EXPENSIVE_CHECKS builds.

So far this just adds checks for unnecessary overrides of base classes (which typically end up causing bloat in the generated tables), but future patches will add additional checks similar to earlier versions of D47637 <https://reviews.llvm.org/D47637> and D48222 <https://reviews.llvm.org/D48222>.

The number of unnecessary overrides that are listed are quite extensive (warnings are currently found in the AMDGPU, ARM, AArch64, MIPS, PowerPC and X86 targets), I'm not convinced they need to be addressed before this patch is committed, although the spam in EXPENSIVE_CHECKS builds is pretty large, but I'm happy to help create bugs/patches to fix them first if reviewers would prefer it.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D138359

Files:
  llvm/include/llvm/MC/MCSchedule.h
  llvm/utils/TableGen/CodeGenSchedule.cpp
  llvm/utils/TableGen/CodeGenSchedule.h
  llvm/utils/TableGen/SubtargetEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138359.476691.patch
Type: text/x-patch
Size: 9421 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221119/712ffdc0/attachment-0001.bin>


More information about the llvm-commits mailing list