[all-commits] [llvm/llvm-project] 9a20c7: [NFC][KnownBits] Add getMinValue() / getMaxValue()...

Roman Lebedev via All-commits all-commits at lists.llvm.org
Tue Dec 3 09:05:19 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 9a20c79ddc2523fb68be4d4246d7835c761c382f
      https://github.com/llvm/llvm-project/commit/9a20c79ddc2523fb68be4d4246d7835c761c382f
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2019-12-03 (Tue, 03 Dec 2019)

  Changed paths:
    M llvm/include/llvm/Support/KnownBits.h
    M llvm/lib/Analysis/ScalarEvolution.cpp
    M llvm/lib/Analysis/ValueTracking.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
    M llvm/lib/IR/ConstantRange.cpp
    M llvm/lib/Support/KnownBits.cpp
    M llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
    M llvm/unittests/Support/KnownBitsTest.cpp

  Log Message:
  -----------
  [NFC][KnownBits] Add getMinValue() / getMaxValue() methods

As it can be seen from accompanying cleanup, it is not unheard of
to write `~Known.Zero` meaning "what maximal value can this KnownBits
produce". But i think `~Known.Zero` isn't *that* self-explanatory,
as compared to a method with a name.

Note that not all `~Known.Zero` places were cleaned up,
only those where this arguably improves things.




More information about the All-commits mailing list