llvm.org GIT mirror llvm / 20350be
[cmake] Enable reverse iteration by default through build macro Summary: Reverse iteration can be turned on, by default, by setting -DLLVM_REVERSE_ITERATION:BOOL=ON during cmake. With this enabled, we can uncover lots of cases of non-determinism in codegen by simply running our tests (without any other change). We can then setup a buildbot which will have this turned on by default. Initially, a lot of unit tests will fail in this configuration. Once we start fixing non-determinism issues, we can gradually make this a blocker for patches. Reviewers: davide, dblaikie, mehdi_amini, dberlin Reviewed By: dblaikie Subscribers: probinson, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D33908 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304757 91177308-0d34-0410-b5e6-96231b3b80d8 Mandeep Singh Grang 2 years ago
3 changed file(s) with 11 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
9898 # defined.
9999 else()
100100 message(FATAL_ERROR "Unknown value for LLVM_ABI_BREAKING_CHECKS: \"${LLVM_ABI_BREAKING_CHECKS}\"!")
101 endif()
102
103 if( LLVM_REVERSE_ITERATION )
104 set( LLVM_ENABLE_REVERSE_ITERATION 1 )
101105 endif()
102106
103107 if(WIN32)
3030
3131 #if LLVM_ENABLE_ABI_BREAKING_CHECKS
3232 template struct ReverseIterate { static bool value; };
33 #if LLVM_ENABLE_REVERSE_ITERATION
34 template bool ReverseIterate::value = true;
35 #else
3336 template bool ReverseIterate::value = false;
37 #endif
3438 #endif
3539
3640 /// SmallPtrSetImplBase - This is the common code shared among all the
1313
1414 /* Define to enable checks that alter the LLVM C++ ABI */
1515 #cmakedefine01 LLVM_ENABLE_ABI_BREAKING_CHECKS
16
17 /* Define to enable reverse iteration of unordered llvm containers */
18 #cmakedefine01 LLVM_ENABLE_REVERSE_ITERATION
1619
1720 /* Allow selectively disabling link-time mismatch checking so that header-only
1821 ADT content from LLVM can be used without linking libSupport. */