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

Mandeep Singh Grang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 28 16:13:25 PST 2016


mgrang added inline comments.


================
Comment at: include/llvm/ADT/SmallPtrSet.h:30
+#if LLVM_ENABLE_ABI_BREAKING_CHECKS
+extern bool ReverseIterate;
+#endif
----------------
mehdi_amini wrote:
> This introduces a dependency from ADT to Support, I'm not sure it is OK.
> Also the symbol should be in the LLVM namespace.
@mehdi_amini Yes, I will move ReverseIterate to LLVM namespace.

Initially I was skeptical about defining ReverseIterate in Support. But then I did not know of a better place to do this, Could you please suggest what would be a preferable place to define this?


================
Comment at: unittests/ADT/ReverseIterationTest.cpp:37
+    ASSERT_EQ(std::get<0>(Tuple), std::get<1>(Tuple));
+}
----------------
mehdi_amini wrote:
> The test cannot link without LLVM_ENABLE_ABI_BREAKING_CHECKS I believe.
Will guard this test for LLVM_ENABLE_ABI_BREAKING_CHECKS.


https://reviews.llvm.org/D26718





More information about the llvm-commits mailing list