[PATCH] D53892: [CodeGen] Support custom format of stack maps

Cherry Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 7 13:59:51 PST 2018


cherry marked an inline comment as done.
cherry added a comment.

Thanks for the review!



================
Comment at: include/llvm/CodeGen/StackMaps.h:267-281
+  /// Generate a stackmap record for a stackmap instruction.
+  ///
+  /// MI must be a raw STACKMAP, not a PATCHPOINT.
+  void recordStackMap(const MachineInstr &MI);
+
+  /// Generate a stackmap record for a patchpoint instruction.
+  void recordPatchPoint(const MachineInstr &MI);
----------------
apilipenko wrote:
> The code move part of this change can be landed separately without further review so as to reduce the size of this diff. 
Split to https://reviews.llvm.org/D54224.


================
Comment at: lib/CodeGen/AsmPrinter/AsmPrinter.cpp:3005-3007
+      if (MP->emitStackMaps(SM, *this))
+        // We've emitted a custom format, done.
+        return;
----------------
apilipenko wrote:
> I'm not sure that early termination is the right thing to do. There might be more than one GC strategy in use in the current module, and all of them might want to emit stack maps.
In theory there could be more than one GC strategies, although I couldn't see how it can be used.

What about changing it to running all the GCMetadataPrinters, then return if any of the emitStackMaps returns true?



Repository:
  rL LLVM

https://reviews.llvm.org/D53892





More information about the llvm-commits mailing list