[PATCH] D37355: Add CalledValuePropagation pass

Matthew Simpson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 1 08:18:50 PDT 2017


mssimpso added a comment.

In https://reviews.llvm.org/D37355#858332, @efriedma wrote:

> I'd like to see a better motivating example; the specific example here could be handled by something more targeted in arg-promotion or something.


Sure, Eli. Thanks for taking a look. I can add another example or two as test cases, although I'd like to try to not make them too complicated for now.  The specific example I included here was pulled from https://reviews.llvm.org/D36432, and may not be the best.  I'm currently only propagating through calls/returns, loads/stores through global variables, and phis/selects, which may be all we would want to handle for this kind of task.

> What's the difference between overdefined and untracked?

The `untracked` value is something the generic solver added, and there isn't a big conceptual difference between it and `overdefined`(at least in this patch). From the comments in the generic solver, it uses `untracked` to represent "something that is obviously uninteresting to the analysis" in order to "avoid pointless work." Practically, I think this just means that it doesn't maintain mappings for these values in its internal state maps.  But yeah, initializing a value as `overdefined` instead of `untracked` should end up with the same result. And if this were implemented in IPSCCP, that is what we would do.


https://reviews.llvm.org/D37355





More information about the llvm-commits mailing list