This is an archive of the discontinued LLVM Phabricator instance.

[PGO][CHR] Add opt remarks.
ClosedPublic

Authored by hjyamauchi on Sep 13 2018, 1:20 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

hjyamauchi created this revision.Sep 13 2018, 1:20 PM
davidxl added inline comments.Sep 17 2018, 9:11 AM
lib/Transforms/Instrumentation/ControlHeightReduction.cpp
1171 ↗(On Diff #165364)

Can you make the missed reason string clearer?

1206 ↗(On Diff #165364)

Similarly here.

1331 ↗(On Diff #165364)

You can pass the argument to the ORE object with ore::NV type:

OptimizationMarkMissed ORE(DEBUG_TYPE, ....);
ORE << "Drop scope with < " << ore::NV("CHRMergeThreshold", CHRMergeThreshold) << ...

1831 ↗(On Diff #165364)

use ore::NV to pass argument.

2031 ↗(On Diff #165364)

The message already includes the module name, so there is no need to do it here.

Also the function name can be passed as NV:

ORE<< ore::NV("Function", &F) << "Reduced .... by " << ore::NV("NumBranchesDelta", Stats.NumBranchesDelta) << " (static ) ...." ...

hjyamauchi marked 5 inline comments as done.

Comments addressed.

This revision is now accepted and ready to land.Sep 17 2018, 11:44 AM
This revision was automatically updated to reflect the committed changes.