[PATCH] D155236: [ConstantHoisting] use struct rather than tuple for adjustments

Nick Desaulniers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 14 15:39:07 PDT 2023


nickdesaulniers added a comment.

In D155236#4501902 <https://reviews.llvm.org/D155236#4501902>, @void wrote:

> I'm not familiar with this code,

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 <https://reviews.llvm.org/D155237> is more important to me and I wanted to factor these changes out of D155237 <https://reviews.llvm.org/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


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D155236



More information about the llvm-commits mailing list