Commit Graph

4 Commits

Author SHA1 Message Date
Adam Nemet
004c7d2748 Include module in demangled name in opt remarks
This allows filtering noisy generic specialization and inlining remarks for
stdlib functions based on the module name.
2017-12-05 22:49:13 -08:00
Adam Nemet
1520cbe6dd Prefix opt-remark ID with sil "namespace"
This is so that we can unambiguously distinguish from LLVM opt remarks.
2017-12-05 20:42:53 -08:00
Adam Nemet
65b24eb9d5 Demangle function names in remarks 2017-11-07 22:04:26 -08:00
Adam Nemet
66085a8aef Save optimization remarks in an external YAML file
This brings the capability from clang to save remarks in an external YAML files.
YAML files can be viewed with tools like the opt-viewer.

Saving the remarks is activated with the new option -save-optimization-record.

Similarly to -emit-tbd, I've only added support for single-compile mode for now.
In this case the default filename is determined by
getOutputFilenameFromPathArgOrAsTopLevel, i.e. unless explicitly specified
with -save-optimization-record-path, the file is placed in the directory of the
main output file as <modulename>.opt.yaml.
2017-10-27 10:14:27 -07:00