[PATCH] D145032: [Codegen][NFC] Replace 'RegisterRegAlloc::FunctionPassCtor' with 'RegisterRegAllocBase<T>::FunctionPassCtor' .
WangLian via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 1 18:46:54 PST 2023
Jimerlife added a comment.
In D145032#4160993 <https://reviews.llvm.org/D145032#4160993>, @RKSimon wrote:
> Out of curiosity - what motivated this change? Do you have dependent patches you're developing or did a linter recommend it?
`RegisterRegAlloc`, `SGPRRegisterRegAlloc` and `VGPRRegisterRegAlloc` are all subclass of `RegisterRegAllocBase`. There will be construct three `Registry`, like `RegisterRegAllocBase<RegisterRegAlloc>::Registry`, `RegisterRegAllocBase<SGPRRegisterRegAlloc>::Registry`, `RegisterRegAllocBase<VGPRRegisterRegAlloc>::Registry`. So, I think it is more appropriate to use the `FunctionPassCtor` of the parent class to replace the `FunctionPassCtor` of the child class(RegisterRegAlloc).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145032/new/
https://reviews.llvm.org/D145032
More information about the llvm-commits
mailing list