[PATCH] D23284: Add -Rpass-with-hotness

Adam Nemet via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 8 15:35:39 PDT 2016

anemet created this revision.
anemet added reviewers: hfinkel, rjmccall, aaron.ballman.
anemet added a subscriber: cfe-commits.

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:

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.

I didn't make -R{,no-}pass-with-hotness member of Group<R_Group>.
I *think* that this is right because unlike other -Rpass flags this one
does not enable any remark group, so it shouldn't be processed by



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23284.67234.patch
Type: text/x-patch
Size: 6667 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160808/d6fb7c05/attachment.bin>

More information about the cfe-commits mailing list