[PATCH] D70043: [ConstantRange] Add `mulWithNoWrap()` method

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 2 09:20:39 PST 2019


lebedev.ri added a comment.

Bump. Posted https://lists.llvm.org/pipermail/llvm-dev/2019-December/137327.html

In D70043#1756686 <https://reviews.llvm.org/D70043#1756686>, @nikic wrote:

> @lebedev.ri Haven't looked too closely at the implementation yet, but my general feeling is that trying this hard to be precise about the empty set case is a bad tradeoff in terms of utility vs compilation time. Note in particular that a) we don't actually make use of empty sets in CVP (I believe they map to overdefined rather than undefined) and b) all the remaining calculations are only precise for non-wrapping sets (and the tests only check that).
>
> I think it would make more sense to move the AllOverflow check in the to !isWrappedSet branches in the tests, which should make it possible to use a more naive, but for practical purposes probably equally good, implementation.


Can anyone else familiar with LVI (and other ConstantRange users) chime in
and comment whether we indeed should not be doing such modelling?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70043





More information about the llvm-commits mailing list