[PATCH] D28084: Value number stores and memory states so we can detect when memorystates are equivalent (IE store of same value to memory).Tests coming.

Daniel Berlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 24 14:45:51 PST 2016


dberlin marked 2 inline comments as done.
dberlin added inline comments.


================
Comment at: lib/Transforms/Scalar/NewGVN.cpp:1311
+  MemoryAccess *AllSameValue = nullptr;
+  // See if all arguments are the same, ignoring unreachable arguments
+  for (unsigned i = 0, e = MP->getNumOperands(); i < e; ++i) {
----------------
davide wrote:
> dberlin wrote:
> > It would be nice to share this part with performSymbolicPHIEvaluation, but we use a different lookup.
> > Thoughts welcome.
> > 
> I agree it's not great to have the logic in two different places, I'll think about it. Maybe we can add a `FIXME` in the meanwhile?
I've cleaned up this version, i'll clean up the other version in a followup and see if we can merge them using a template function.



https://reviews.llvm.org/D28084





More information about the llvm-commits mailing list