[PATCH] D75094: [MachineInstr] Add a dumpr method
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 24 17:48:50 PST 2020
arsenm added inline comments.
================
Comment at: llvm/include/llvm/CodeGen/MachineInstr.h:1545
+ void dumpr(const MachineRegisterInfo &MRI,
+ Optional<unsigned> MaxDepth = None) const;
/// @}
----------------
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
================
Comment at: llvm/lib/CodeGen/MachineInstr.cpp:1474-1476
+ std::string Prefix;
+ for (unsigned i = 0; i != Depth; ++i)
+ Prefix += " ";
----------------
Can you avoid doing this manually with formatted_raw_ostream?
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