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

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 22 05:11:00 PST 2019


nikic added a comment.

@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.


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