[PATCH] D75094: [MachineInstr] Add a dumpr method

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 24 20:04:12 PST 2020


qcolombet marked 2 inline comments as done.
qcolombet added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/MachineInstr.h:1545
+  void dumpr(const MachineRegisterInfo &MRI,
+             Optional<unsigned> MaxDepth = None) const;
   /// @}
----------------
arsenm wrote:
> I think defaulting to UINT_MAX would be simpler than the optional here, especially since debuggers are really bad at calling functions with nontrivial arguments
Good point, will change that.


================
Comment at: llvm/lib/CodeGen/MachineInstr.cpp:1474-1476
+  std::string Prefix;
+  for (unsigned i = 0; i != Depth; ++i)
+    Prefix += "  ";
----------------
arsenm wrote:
> Can you avoid doing this manually with formatted_raw_ostream?
Forgot about that one. Looking.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75094





More information about the llvm-commits mailing list