[PATCH] D37349: [polly] Fix non-deterministic output due to iteration of unordered ScopArrayInfo

Mandeep Singh Grang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 31 13:09:51 PDT 2017


mgrang marked an inline comment as done.
mgrang added inline comments.


================
Comment at: lib/Transform/MaximalStaticExpansion.cpp:504
+            [](ScopArrayInfo *A, ScopArrayInfo *B) {
+               return A->getName() < B->getName(); });
 
----------------
grosser wrote:
> Why do you need to sort the arrays. The original data structure is a SetVector and should consequently be deterministic. Should we just change the SmallPtrSet into a SmallVector? Would this be sufficient?
Yes, we actually do not need to sort as S.arrays() is a SetVector. Consequently, the unit tests do not need to be fixed either. Thanks!


https://reviews.llvm.org/D37349





More information about the llvm-commits mailing list