[llvm] [SelectionDAG] Stop storing EVTs in a function scoped static std::set. (PR #118715)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 5 11:00:05 PST 2024


================
@@ -247,6 +248,9 @@ class SelectionDAG {
   BlockFrequencyInfo *BFI = nullptr;
   MachineModuleInfo *MMI = nullptr;
 
+  /// Extended EVTs used for single value VTLists.
+  std::set<EVT, EVT::compareRawBits> EVTs;
----------------
efriedma-quic wrote:

The usage here depends on the address stability of the map entries (the VTList points at the map's key), and DenseSet doesn't provide that.  So you'd need define a struct like `EVTSetKey Key { EVT* Ptr; };`, define DenseMapInfo for that, then use `DenseSet<EVTSetKey>`.

I guess you could do that, but it seems like overkill.

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


More information about the llvm-commits mailing list