[PATCH] D135488: [codegen] Add a remarks based Stack Layout Analysis pass
Nick Desaulniers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 12 12:12:07 PST 2023
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
More information about the cfe-commits
mailing list