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

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 18 13:40:57 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;
----------------
dwblaikie wrote:

> IIUC the DWARF emitter also wants the fragments ordered by offset? I'm not sure what would happen if we were to emit DWARF fragment expressions out of order 🤔

Ah, yeah - DWARF does require the fragments be in order (essentially they don't say where they are in the structure - so you have to emit the first byte first, second byte second, etc)

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


More information about the llvm-commits mailing list