We pack this info in a tuple just to spread it back out for a function
call. Spreads in C++ are awkward. If I want to add an additional
element to the tuple, I need to add more calls to std::get<> later. Just
use a struct.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I'm not familiar with this code, but why not place the information into ConstantUser instead? Or maybe make the struct a private member of ConstantHoistingPass.
Are you still comfortable reviewing simple NFC refactorings?
but why not place the information into ConstantUser instead?
I'm sure it's possible, but this commit is simplying replacing the RebasedUse std::tuple with a dedicated class. We may be able to refactor that further, but that's more than I care to do for this code, as D155237 is more important to me and I wanted to factor these changes out of D155237. Would you prefer such a more involved change though?
Or maybe make the struct a private member of ConstantHoistingPass.
Sure, good idea! Done. PTAL
whoops, I messed up the rebase; MatInsertPt member should go in the child commit; let me fix that up.