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

Mehdi Amini via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 28 10:57:16 PST 2016


Why is it “undefined"? I thought it is dependent on the order of insertion and the hash function, which should be deterministic and consistent.


> On Nov 22, 2016, at 12:10 PM, Mandeep Singh Grang <mgrang at codeaurora.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.
> 
> 
> Repository:
>  rL LLVM
> 
> https://reviews.llvm.org/D26718
> 
> 
> 



More information about the llvm-commits mailing list