[PATCH] D150443: [KnownBits] Define and use meet and join operations

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 12 13:55:34 PDT 2023


goldstein.w.n added inline comments.


================
Comment at: llvm/include/llvm/Support/KnownBits.h:310
+  }
+  static KnownBits meet(const KnownBits &LHS, KnownBits &&RHS) {
+    RHS.meet(LHS);
----------------
foad wrote:
> goldstein.w.n wrote:
> > Since we already have `KnownBits::commonBits` maybe instead of adding the new essentially equivilent `meet` API, we could just add a non-static version of `commonBits` (so you could do `Known.commonBits(Known2)`). Seems like an all around simpler change and probably more familiar for people who have used the interface.
> Personally I think having good and complementary names for the two operations is more important than maintaining the old name, even if it is familiar to some people.
Fair enough.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150443



More information about the llvm-commits mailing list