nickdesaulniers added inline comments.

================
Comment at: llvm/lib/CodeGen/StackFrameLayoutAnalysisPass.cpp:44
+
+const char *PassName = "stack-frame-layout";
+
----------------
Consider replacing uses of `PassName` with `DEBUG_TYPE` since they have the 
same value.


================
Comment at: llvm/lib/CodeGen/StackFrameLayoutAnalysisPass.cpp:98-99
+
+    MachineOptimizationRemarkEmitter &ORE =
+        getAnalysis<MachineOptimizationRemarkEmitterPass>().getORE();
+    MachineOptimizationRemarkAnalysis Rem(
----------------
consider sinking this closer to use. If you only call one method on it, and it 
could fit in one line, consider not even creating a variable. i.e.
`getAnalysis<MachineOptimizationRemarkEmitterPass>().getORE().emit(ReM)`


================
Comment at: llvm/lib/CodeGen/StackFrameLayoutAnalysisPass.cpp:106
+    SlotDbgMap SlotMap = genSlotDbgMapping(MF);
+    emitStackFrameLayoutRemarks(MF, SlotMap, Rem);
+
----------------
can you sink the call to `genSlotDbgMapping()` into this arg list? `SlotMap` 
seems unreferenced otherwise.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135488/new/

https://reviews.llvm.org/D135488

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to