[PATCH] D26718: [llvm] Iterate SmallPtrSet in reverse order to uncover non-determinism in codegen

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 28 10:18:24 PST 2016


On Tue, Nov 22, 2016 at 12:11 PM Mandeep Singh Grang via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> mgrang added a comment.
>
> Note: There are no associated tests with this patch as it is very
> difficult (not possible?) to detect "reverse" iteration since the relative
> order of elements in the SmallPtrSet is always undefined.
> I would be happy to write tests for this if someone can suggest a good way
> of testing it. Otherwise the biggest test for this is to enable it in the
> buildbot and let the unit tests fail due to non-deterministic codegen.
>

Yeah, that's fine - I think of this like a valgrind buildbot. If we find
errors with this mode, there should be a test that exercises/demonstrates
the problem (in the common case there will, as you say, /already/ be a test
- that fails on the reverse order and we fix it and move on, but if say
someone finds a non-determinism in their custom compiler workload, we can
now ask them for a test that fails under one of forward or reverse (and if
it doesn't fail under either we can consider whether it is a very special
nondeterminism, if we can add better coverage, etc))


>
>
> Repository:
>   rL LLVM
>
> https://reviews.llvm.org/D26718
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161128/7cfc41c3/attachment.html>


More information about the llvm-commits mailing list