[PATCH] D45341: [DebugInfo] Convert intrinsic llvm.dbg.label to MachineInstr.

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 6 15:31:42 PDT 2018


aprantl added a comment.

Thanks, this looks mostly fine! Have you considered just allowing the DBG_VALUE MachineInstr to carry a DILabel insetad of just DILocalVariables? Would that simplify the code or make it harder to understand?



================
Comment at: include/llvm/CodeGen/SelectionDAG.h:152
   SmallVector<SDDbgValue*, 32> ByvalParmDbgValues;
+  SmallVector<SDDbgLabel*, 32> DbgLabels;
   using DbgValMapType = DenseMap<const SDNode *, SmallVector<SDDbgValue *, 2>>;
----------------
I suppose this depends on the language, but I'd expect most C++ functions to at most a handful of labels and usually zero. Perhaps use a SmallVector size of 1, 2, or 4, or even a std::vector?


Repository:
  rL LLVM

https://reviews.llvm.org/D45341





More information about the llvm-commits mailing list