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

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 12 08:38:44 PDT 2023


foad marked an inline comment as done.
foad added inline comments.


================
Comment at: llvm/include/llvm/Support/KnownBits.h:310
+  }
+  static KnownBits meet(const KnownBits &LHS, KnownBits &&RHS) {
+    RHS.meet(LHS);
----------------
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.


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