Use RegisterRegAllocBase<T>::FunctionPassCtor to construct RegisterRegAllocBase<T>::Registry maybe more proper.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Out of curiosity - what motivated this change? Do you have dependent patches you're developing or did a linter recommend it?
Comment Actions
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).