[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.

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 25 10:07:16 PST 2016


davide 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) {
----------------
dberlin wrote:
> 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.
> 
Yeah, feel free to handle it in a follow-up.


https://reviews.llvm.org/D28084





More information about the llvm-commits mailing list