[llvm-dev] killing undef and spreading poison
Daniel Berlin via llvm-dev
llvm-dev at lists.llvm.org
Wed Jun 14 14:12:01 PDT 2017
On Wed, Jun 14, 2017 at 1:26 PM, Peter Lawrence via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> 1. —————
> The reasoning given below for how GVN operates seems odd to me,
> Poison is an attribute of a value, just like nsw is an attribute of an
> So when GVN sees a pair of equal values, one of which has an extra
> The proper choice for representative value is the one without the
There are many many choices of what make *good* representative values in
I would deny any assertion that there is a proper choice, and that if there
is one, it must be what you suggest :)
You actually can prove that there is no optimal such choice. Different
choices will lead you to discover different congruences in any practical
algorithms, even complete ones (as the issues here are orthogonal to
herbrand equivalence., and instead related to inference of facts from
control flow and other things, as well as what the results from symbolic
evaluation and simplification)
There are examples in the paper cited by newgvn of situations where
different choices of values for predicate and phi inference will enable you
to discover different congruences.
More importantly, given the other purpose of the representatives is to be
used during simplification and symbolic evaluation, something we know we
*cannot* possibly be optimal at, i do not believe you can assert that there
is such an easily knowable best representative.
There is also no representation we could pick that would avoid all issues
> Thoughts ?
> Comments ?
> Questions ?
The middle one.
I'm going to be frank and honest:
I don't feel like i have a good understanding of what your goal here is, or
what you see your role as.
I can tell you, again, completely personally, that i find your approach
off-putting at times.
To give a concrete example, here, what i see (again, from *my*
perspective), is you are asserting things to me and asking me to confirm
them or disprove them. I generally have not found this to be a good
collaborative approach to increasing understanding. You then say"If Dan
agrees with the above then can we come up with a better example". In
practice, so far, that has meant "can *Nuno* come up with a better example"
(IE the we seems to be turning into work for others).
I do not say this as a true complaint so much as a explanation of why i
don't feel like i understand your perspective on things, and i think it
would be helpful for me to be able to.
I also certainly do not claim that there are not multiple ways to approach
problem solving, communities, etc, or that what I or anyone else does is
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev