[llvm] [DominanceFrontier] make iterating dereferenced DominanceFrontierBase::find deterministic (PR #69711)

Wenju He via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 26 19:28:16 PDT 2023


================
@@ -39,7 +39,9 @@ class raw_ostream;
 template <class BlockT, bool IsPostDom>
 class DominanceFrontierBase {
 public:
-  using DomSetType = std::set<BlockT *>;                // Dom set for a bb
+  // Dom set for a bb. Use SetVector to make iterating dom frontiers of a bb
+  // deterministic.
+  using DomSetType = SetVector<BlockT *>;
   using DomSetMapType = std::map<BlockT *, DomSetType>; // Dom set map
----------------
wenju-he wrote:

thank you all for the review.

> I don't see why not. But I'd open a separate PR for this.

opened a new pr: https://github.com/llvm/llvm-project/pull/70403

https://github.com/llvm/llvm-project/pull/69711


More information about the llvm-commits mailing list