[PATCH] D88891: [DebugInfo][InstrRef][1/4] Support transformations that widen or narrow defined values

Djordje Todorovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 28 00:24:16 PDT 2021


djtodoro added a comment.

@jmorse Thanks for doing this. Should we document this new MF attribute somehow? If we already created it, should we add an explanation of this new field there?

>From the patch summary, I think that this is reasonable change.



================
Comment at: llvm/include/llvm/CodeGen/MachineFunction.h:463
+  /// later.
+  std::map<DebugInstrOperandPair, DebugSubstitution> DebugValueSubstitutions;
 
----------------
Do we need the `std::map` sortness here?


================
Comment at: llvm/lib/CodeGen/MIRPrinter.cpp:223
   convertCallSiteObjects(YamlMF, MF, MST);
-  for (auto &Sub : MF.DebugValueSubstitutions)
-    YamlMF.DebugValueSubstitutions.push_back({Sub.first.first, Sub.first.second,
-                                              Sub.second.first,
-                                              Sub.second.second});
+  for (auto &Sub : MF.DebugValueSubstitutions) {
+    auto &SubSrc = Sub.first;
----------------
nit: `const auto &Sub` ?


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

https://reviews.llvm.org/D88891



More information about the llvm-commits mailing list