summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorVivek Pandya <vivekvpandya@gmail.com>2017-06-06 08:16:19 +0000
committerVivek Pandya <vivekvpandya@gmail.com>2017-06-06 08:16:19 +0000
commit56d87ef5d7c3b3f53cafd2a360b949b39bc88733 (patch)
tree9b36e6cc388489ee0c0a4794ba2096366d1f8a73 /llvm/lib
parent6c41bb1bdfe248300a817fceafadfc10dd9eec86 (diff)
downloadbcm5719-llvm-56d87ef5d7c3b3f53cafd2a360b949b39bc88733.tar.gz
bcm5719-llvm-56d87ef5d7c3b3f53cafd2a360b949b39bc88733.zip
[Improve CodeGen Testing] This patch renables MIRPrinter print fields which have value equal to its default. If -simplify-mir option is passed then MIRPrinter will not print such fields. This change also required some lit test cases in CodeGen directory to be changed. Reviewed By: MatzeB Differential Revision: https://reviews.llvm.org/D32304 llvm-svn: 304779
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/MIRPrinter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MIRPrinter.cpp b/llvm/lib/CodeGen/MIRPrinter.cpp
index 293fc7358b8..849866a1040 100644
--- a/llvm/lib/CodeGen/MIRPrinter.cpp
+++ b/llvm/lib/CodeGen/MIRPrinter.cpp
@@ -210,6 +210,8 @@ void MIRPrinter::print(const MachineFunction &MF) {
}
StrOS.flush();
yaml::Output Out(OS);
+ if (!SimplifyMIR)
+ Out.setWriteDefaultValues(true);
Out << YamlMF;
}
OpenPOWER on IntegriCloud