[PATCH] [PR20893] Change SelectionDAG's DbgValueMap to have set semantics (NFC)

David Blaikie dblaikie at gmail.com
Mon Sep 22 14:18:27 PDT 2014


as for testing - assuming these duplicates get deduplicated elsewhere (could you explain where?) then I doubt there's much to test - this is then just a perf optimization, not a change in any semantics. Maybe dumping MI could be testable, but I'm not sure what the dumping options (& whether they're available in non-asserts builds, etc) are like.

================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAG.cpp:6180
@@ +6179,3 @@
+      if (*Val == *V) return;
+    Vals.push_back(V);
+  }
----------------
Could 'Vals' be an actual set of SDDbgValue*s?

Are SDDbgValue*s inherently uniqued such that pointer identity would be sufficient? (or do you need that equality comparison added above? Which could hopefully be adjusted to < comparison (or hashing) for a set-like structure)

http://reviews.llvm.org/D5451






More information about the llvm-commits mailing list