aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorFrancis Visoiu Mistrih <francisvm@yahoo.com>2018-01-18 17:59:06 +0000
committerFrancis Visoiu Mistrih <francisvm@yahoo.com>2018-01-18 17:59:06 +0000
commit378b5f3de600ef68d856003454d0e9f3a818762f (patch)
treed51af27d91123c16c85791c4d59e1eab5c093aa1 /llvm/lib/CodeGen/MachineFunction.cpp
parenta2d6fe4ab4823e56d01a7cde2cd5eed10f8da960 (diff)
downloadllvm-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/MachineFunction.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineFunction.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp
index bc8eb142..da286d7 100644
--- a/llvm/lib/CodeGen/MachineFunction.cpp
+++ b/llvm/lib/CodeGen/MachineFunction.cpp
@@ -522,7 +522,9 @@ void MachineFunction::print(raw_ostream &OS, const SlotIndexes *Indexes) const {
MST.incorporateFunction(getFunction());
for (const auto &BB : *this) {
OS << '\n';
- BB.print(OS, MST, Indexes);
+ // If we print the whole function, don't print any verbose information,
+ // since that information is already present.
+ BB.print(OS, MST, Indexes, /*IsVerbose=*/false);
}
OS << "\n# End machine code for function " << getName() << ".\n\n";