[PATCH] D120695: [RISCV] Move class RISCVPassConfig declaration to RISCVTargetMachine.h for downstream. NFC

Jim Lin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 1 18:03:30 PST 2022


Jim added a comment.

In D120695#3351520 <https://reviews.llvm.org/D120695#3351520>, @jrtc27 wrote:

> Note that `git grep ' : public TargetPassConfig' llvm/lib/Target` turns up 21 results, exactly one for each backend, and every single one lives in the backend's TargetMachine.cpp. So moving it to a header, or adding a second one, would go against the convention of every single backend in tree.

Yes, every backend only have one class inherited from TargetPassConfig. But the downstream class is inherited from RISCVPassConfig. Doesn't have second one `public TargetPassConfig`.
And I refer from AMDGPU target, it seems AMDGPUPassConfig is declared in AMDGPU/AMDGPUTargetMachine.h not AMDGPU/AMDGPUTargetMachine.cpp.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120695/new/

https://reviews.llvm.org/D120695



More information about the llvm-commits mailing list