diff options
author | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2018-01-18 17:59:06 +0000 |
---|---|---|
committer | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2018-01-18 17:59:06 +0000 |
commit | 378b5f3de600ef68d856003454d0e9f3a818762f (patch) | |
tree | d51af27d91123c16c85791c4d59e1eab5c093aa1 /llvm/lib/CodeGen/MachineBasicBlock.cpp | |
parent | a2d6fe4ab4823e56d01a7cde2cd5eed10f8da960 (diff) | |
download | llvm-378b5f3de600ef68d856003454d0e9f3a818762f.zip llvm-378b5f3de600ef68d856003454d0e9f3a818762f.tar.gz llvm-378b5f3de600ef68d856003454d0e9f3a818762f.tar.bz2 |
[CodeGen] Print RegClasses on MI in verbose mode
r322086 removed the trailing information describing reg classes for each
register.
This patch adds printing reg classes next to every register when
individual operands/instructions/basic blocks are printed. In the case
of dumping MIR or printing a full function, by default don't print it.
Differential Revision: https://reviews.llvm.org/D42239
llvm-svn: 322867
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineBasicBlock.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp index 209abf3..9c0bec0f 100644 --- a/llvm/lib/CodeGen/MachineBasicBlock.cpp +++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp @@ -259,8 +259,8 @@ std::string MachineBasicBlock::getFullName() const { return Name; } -void MachineBasicBlock::print(raw_ostream &OS, const SlotIndexes *Indexes) - const { +void MachineBasicBlock::print(raw_ostream &OS, const SlotIndexes *Indexes, + bool IsVerbose) const { const MachineFunction *MF = getParent(); if (!MF) { OS << "Can't print out MachineBasicBlock because parent MachineFunction" @@ -270,11 +270,12 @@ void MachineBasicBlock::print(raw_ostream &OS, const SlotIndexes *Indexes) const Function &F = MF->getFunction(); const Module *M = F.getParent(); ModuleSlotTracker MST(M); - print(OS, MST, Indexes); + print(OS, MST, Indexes, IsVerbose); } void MachineBasicBlock::print(raw_ostream &OS, ModuleSlotTracker &MST, - const SlotIndexes *Indexes) const { + const SlotIndexes *Indexes, + bool IsVerbose) const { const MachineFunction *MF = getParent(); if (!MF) { OS << "Can't print out MachineBasicBlock because parent MachineFunction" @@ -330,7 +331,7 @@ void MachineBasicBlock::print(raw_ostream &OS, ModuleSlotTracker &MST, OS << '\t'; if (I.isInsideBundle()) OS << " * "; - I.print(OS, MST); + I.print(OS, MST, IsVerbose); } // Print the successors of this block according to the CFG. |