Commit Graph

7 Commits

Author SHA1 Message Date
Jason Mittertreiner
4e0b092fbe Fixing Driver tests on Windows (#20209) 2018-12-10 18:27:37 -08:00
Xi Ge
5ebdac76b0 Revert "[test] disable a flaky test test/Driver/opt-remark.swift. rdar://42247881" 2018-10-31 13:19:55 -07:00
Xi Ge
22639daa11 [test] disable a flaky test test/Driver/opt-remark.swift. rdar://42247881 2018-10-31 11:20:16 -07:00
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
18a588ee46 Mention callee in missed inliner remark 2017-11-14 17:24:34 -08:00
Adam Nemet
65b24eb9d5 Demangle function names in remarks 2017-11-07 22:04:26 -08:00
Adam Nemet
9b9805420d Add optimization remarks
This allows reporting successful and unsuccessful optimizations similar to
clang/llvm.

This first patch adds support for the
options -Rpass=<pass-name-regex> -Rpass-missed=<pass-name-regex>.  These allow
reporting successful/unsuccessful optimization on the compiler output for passes
specified by the regex.  I've also added one missed and one passed remark type
to the inliner to test the infrastructure.

Clang also has the option of collecting these records in an external YAML data
file.  This will be added in a later patch.

A few notes:
* The goal is to use this facility for both user-lever "performance" warnings
and expert-level performance analysis.  There will probably be a flag in the
future differentiating the verbosity.

* The intent is match clang/llvm as much as it makes sense.  On the other hand I
did make some changes.  Unlike in llvm, the emitter is not a pass which
simplifies things.  Also the remark class hierarchy is greatly simplified since
we don't derive from DiagnosticInfo.  We also don't derive from Diagnostic to
support the streaming API for arbitrary named-value pairs.

* Currently function names are printed mangled which should be fixed.
2017-10-20 12:41:37 -07:00