[PATCH] D61314: [SCCP] Remove forcedconstant, go to overdefined instead

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 18 11:48:35 PST 2020


fhahn added a comment.

In D61314#1881054 <https://reviews.llvm.org/D61314#1881054>, @efriedma wrote:

> > I think we could however handle this directly in visitPhiNode: if some of the incoming values are unknown and some others are non-singleton constant ranges we have to go to overdefined.
>
> If you treat unknown as if it were overdefined, you lose some of the nice properties of the sparse conditional propagation: in particular, that you get the same result regardless of the visitation order.  You'll get weird results in cases that don't actually involve any undef values.


Right, I hoped the way we mark blocks/edges as executable should take care of most cases not involving actual undef values. But maybe it is better to just treat undef constants as overdefined at construction. I initially was not sure if that would be enough, but I think it should be. Either way, I think both approaches should rule out the problem outline I think. I'll check the impact of both approaches and I;ll put up a follow up patch. Does that sounds good?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D61314





More information about the llvm-commits mailing list