summaryrefslogtreecommitdiffstats
path: root/clang/test/Frontend/optimization-remark-with-hotness.c
Commit message (Collapse)AuthorAgeFilesLines
* [clang][NewPM] Fixing remaining -O0 tests that are broken under new PMLeonard Chan2019-06-191-0/+6
| | | | | | | | | | | | | | - CodeGen/flatten.c will fail under new PM becausec the new PM AlwaysInliner seems to intentionally inline functions but not call sites marked with alwaysinline (D23299) - Tests that check remarks happen to check them for the inliner which is not turned on at O0. These tests just check that remarks work, but we can make separate tests for the new PM with -O1 so we can turn on the inliner and check the remarks with minimal changes. Differential Revision: https://reviews.llvm.org/D62225 llvm-svn: 363846
* Provide reason messages for unviable inliningYevgeny Rouban2019-02-011-1/+1
| | | | | | | | | | | | | InlineCost's isInlineViable() is changed to return InlineResult instead of bool. This provides messages for failure reasons and allows to get more specific messages for cases where callsites are not viable for inlining. Reviewed By: xbolva00, anemet Differential Revision: https://reviews.llvm.org/D57089 llvm-svn: 352849
* Fix tests for changed opt remarks formatDavid Bolvansky2018-08-051-2/+2
| | | | | | | | | | | | | | | | | Summary: Optimization remark format is slightly changed by LLVM patch D49412. Two tests are fixed with expected messages changed. Frankly speaking I have not tested this change yet. I will test when manage to setup the project. Reviewers: xbolva00 Reviewed By: xbolva00 Subscribers: mehdi_amini, eraman, steven_wu, dexonsmith Differential Revision: https://reviews.llvm.org/D50241 llvm-svn: 338971
* Fix the second part of the broken comment from r306079Adam Nemet2017-12-011-2/+6
| | | | | | | | The driver-based test is still not identical to the front-end line, remove the hotness threshold from there and add a new front-end based test with threshold. llvm-svn: 319578
* Fix opt-remark with hotness testcase for sample-based PGOAdam Nemet2017-12-011-2/+2
| | | | | | | | | | | | 1. Require hotness on all remark lines with -verify. 3. Fix the samplePGO file to actually produce hotness on each line. The second remark has hotness 60 rather 30 which I don't quite understand but testing this is strictly better than before. It also unblocks the commit of D40678. llvm-svn: 319577
* Partially fix comment in test broken in r306079 and r306948Adam Nemet2017-12-011-6/+6
| | | | | | | | | | | A RUN line was referring to the previous RUN line but a new test was added in between them. Just reorder the lines. Note this still does not completely fix this the brokenness of the comment as the driver-based test gained a new hotness-threshold argument in r306948 but I'll fix that is a separate commit. llvm-svn: 319576
* [clang] Fix tests for Emitting Single Inline RemarkSam Elliott2017-08-211-2/+1
| | | | | | | | | | | | | | Summary: This change depends on https://reviews.llvm.org/D36054 and should be landed at the same time. Reviewers: anemet Reviewed By: anemet Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D36949 llvm-svn: 311347
* Un-revert "[Driver] Add -fdiagnostics-hotness-threshold"Brian Gesiak2017-07-011-4/+16
| | | | | | | | Summary: Un-revert https://reviews.llvm.org/D34868, but with a slight tweak to the documentation to fix an error -- I had used the wrong syntax for a link. llvm-svn: 306948
* Revert "[Driver] Add -fdiagnostics-hotness-threshold"Brian Gesiak2017-07-011-16/+4
| | | | | | | Summary: The commit caused a documentation breakage. llvm-svn: 306946
* [Driver] Add -fdiagnostics-hotness-thresholdBrian Gesiak2017-07-011-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Depends on https://reviews.llvm.org/D34867. Add a Clang frontend option to enable optimization remark hotness thresholds, which were added to LLVM in https://reviews.llvm.org/D34867. This prevents diagnostics that do not meet a minimum hotness threshold from being output. When generating optimization remarks for large codebases with a ton of cold code paths, this option can be used to limit the optimization remark output at a reasonable size. Discussion of this change can be read here: http://lists.llvm.org/pipermail/llvm-dev/2017-June/114377.html Reviewers: anemet, davidxl, hfinkel Reviewed By: anemet Subscribers: fhahn, cfe-commits Differential Revision: https://reviews.llvm.org/D34868 llvm-svn: 306945
* [Frontend] 'Show hotness' can be used with a sampling profileBrian Gesiak2017-06-231-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Prior to this change, using `-fdiagnostics-show-hotness` with a sampling profile specified via `-fprofile-sample-use=` would result in the Clang frontend emitting a warning: "argument '-fdiagnostics-show-hotness' requires profile-guided optimization information". Of course, a sampling profile *is* profile-guided optimization information, so the warning is misleading. Furthermore, despite the warning, hotness was displayed based on the data in the sampling profile. Prevent the warning from being emitted when a sampling profile is used, and add a test that verifies this. Reviewers: anemet, davidxl Reviewed By: davidxl Subscribers: danielcdh, cfe-commits Differential Revision: https://reviews.llvm.org/D34082 llvm-svn: 306079
* Adjust tests after folding inlining analysis into missed remarksAdam Nemet2017-01-301-3/+5
| | | | llvm-svn: 293493
* Reapply r281276 with passing -emit-llvm in one of the testsAdam Nemet2016-09-131-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original commit message: 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 llvm-svn: 281293
* Revert "Add -fdiagnostics-show-hotness"Adam Nemet2016-09-131-45/+0
| | | | | | | | This reverts commit r281276. Many bots are failing. llvm-svn: 281279
* Add -fdiagnostics-show-hotnessAdam Nemet2016-09-121-0/+45
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 llvm-svn: 281276
OpenPOWER on IntegriCloud