[llvm] [NFC][AsmPrinter] Refactor FrameIndexExprs as a std::set (PR #66433)

Felipe de Azevedo Piovezan via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 16 06:03:16 PDT 2023


================
@@ -158,7 +153,7 @@ class Multi {
 };
 /// Single location defined by (potentially multiple) MMI entries.
 struct MMI {
-  mutable SmallVector<FrameIndexExpr, 1> FrameIndexExprs;
+  std::set<FrameIndexExpr> FrameIndexExprs;
----------------
felipepiovezan wrote:

I think we don't need the extra functionality provided by the `SetVector` here: our sorting keys (fragment offsets) are stable without the need for insertion-order-tracking.

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


More information about the llvm-commits mailing list