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

Jakub Kuderski via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 24 23:24:33 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
----------------
kuhar wrote:

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

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


More information about the llvm-commits mailing list