[PATCH] D30638: [SLP] Fixed non-determenistic behavior in Loop Vectorizer.
Michael Kuperstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 7 13:08:33 PST 2017
mkuper accepted this revision.
mkuper added a comment.
This revision is now accepted and ready to land.
LGTM, modulo the minor issues inline.
================
Comment at: lib/Analysis/LoopAccessAnalysis.cpp:825
if ((IsWrite || IsReadOnlyPtr) && SetHasWrite) {
- CheckDeps.insert(Access);
+ CheckDeps.push_back(Access);
IsRTCheckAnalysisNeeded = true;
----------------
aaboud wrote:
> mkuper wrote:
> > We never have duplicates here anyway, right? So it doesn't matter if it's a set or a list.
> I do not know this code Michael, but even if we end up having duplication, we are going to process them once due to the "Visited" set.
>
Yes, but if there's a lot of duplication, then the loop now has many more iterations. I think this is fine, though, since a pointer can't be in more than one AliasSet.
================
Comment at: lib/Analysis/LoopAccessAnalysis.cpp:1611
}
+ CheckDeps.clear();
----------------
aaboud wrote:
> mkuper wrote:
> > Is this necessary?
> > I mean, it used to happen as a side-effect of the way the loop was structured, but is CheckDeps every actually used after this?
> Again, I am not familiar with the code, from my check, this is why I preferred to keep same behavior as before.
>
> I do not mind removing this line.
I don't know this code well enough either to positively say whether it's safe to remove. That's why I'm asking you to check. :-)
https://reviews.llvm.org/D30638
More information about the llvm-commits
mailing list