summaryrefslogtreecommitdiffstats
path: root/include/clang/Frontend/CodeGenOptions.def
diff options
context:
space:
mode:
authorAdam Nemet <anemet@apple.com>2016-09-12 23:48:16 +0000
committerAdam Nemet <anemet@apple.com>2016-09-12 23:48:16 +0000
commitfd2a481cd92f3a613baa0f218ac680115590ff6a (patch)
tree04a9ebb9ff5e4a136eee8ab9a1ae6d575892151a /include/clang/Frontend/CodeGenOptions.def
parentec69ba2e71f0cd8f4456833cafb0cb1c7fcca32e (diff)
Add -fdiagnostics-show-hotness
Summary: I've recently added the ability for optimization remarks to include the hotness of the corresponding code region. This uses PGO and allows filtering of the optimization remarks by relevance. The idea was first discussed here: http://thread.gmane.org/gmane.comp.compilers.llvm.devel/98334 The general goal is to produce a YAML file with the remarks. Then, an external tool could dynamically filter these by hotness and perhaps by other things. That said it makes sense to also expose this at the more basic level where we just include the hotness info with each optimization remark. For example, in D22694, the clang flag was pretty useful to measure the overhead of the additional analyses required to include hotness. (Without the flag we don't even run the analyses.) For the record, Hal has already expressed support for the idea of this patch on IRC. Differential Revision: https://reviews.llvm.org/D23284 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281276 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/CodeGenOptions.def')
-rw-r--r--include/clang/Frontend/CodeGenOptions.def3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/clang/Frontend/CodeGenOptions.def b/include/clang/Frontend/CodeGenOptions.def
index 677baa931e..5ebbc2cbd6 100644
--- a/include/clang/Frontend/CodeGenOptions.def
+++ b/include/clang/Frontend/CodeGenOptions.def
@@ -247,6 +247,9 @@ ENUM_CODEGENOPT(DefaultTLSModel, TLSModel, 2, GeneralDynamicTLSModel)
/// filename)
VALUE_CODEGENOPT(EmitCheckPathComponentsToStrip, 32, 0)
+/// Whether to report the hotness of the code region for optimization remarks.
+CODEGENOPT(DiagnosticsWithHotness, 1, 0)
+
#undef CODEGENOPT
#undef ENUM_CODEGENOPT
#undef VALUE_CODEGENOPT