[PATCH] D76611: [SCCP] Use ranges for predicate info conditions.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 26 13:02:51 PDT 2020


fhahn added a comment.

In D76611#1942381 <https://reviews.llvm.org/D76611#1942381>, @efriedma wrote:

> If I'm understanding correctly, you're saying that SCCP doesn't care about the difference between constantrange and a hypothetical constantrangefromundef, therefore it's fine if the value is actually undef?  I guess that's reasonable.


Yep that should be the case.

>   But it would be more clear if we represented it explicitly in the lattice.

Agreed. I think we should be able to convert singlecrfromundef to something like constantrangeincludingundef. The regular constantrange would mean it is guaranteed to not include undef (would only be able to come from things like phis with all incoming values constants != undef). We can use information from such ranges to replace values with other values (like the and removal). All other ranges should be constantrangeincludingundef, e.g. the and example with a constant and an arbitrary value or the information inferred from bounds. Let me prepare a patch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76611





More information about the llvm-commits mailing list