Simplify MIR Output used for Codegen Testing
authorVivek Pandya <vivekvpandya@gmail.com>
Sat, 13 May 2017 08:55:43 +0000 (08:55 +0000)
committerVivek Pandya <vivekvpandya@gmail.com>
Sat, 13 May 2017 08:55:43 +0000 (08:55 +0000)
commitd20de87fd5ab48c340df227cb6eb8d5900ee4d8d
tree8e0d4520d42bf963d352cfaa39cdeb9f391cee44
parent2c9a70661c1e5eebca70b9ff6b2b38748962d79a
Simplify MIR Output used for Codegen Testing

- MIRYamlMapping: Default value provided for fields which have optional
mappings. Implemented == operators for required classes. When a field's value is
same as default value specified YAML IO class will not print it.

- MIRPrinter: Above mentioned behaviour is not on by default. If -simplify-mir
option not specified, then make yaml::Output to print fields with default values
too.

Differential Revision: https://reviews.llvm.org/D32304

llvm-svn: 302984
llvm/include/llvm/CodeGen/MIRYamlMapping.h
llvm/lib/CodeGen/MIRPrinter.cpp