This is an archive of the discontinued LLVM Phabricator instance.

Only enable AddDiscriminator pass when -fdebug-info-for-profiling is true
ClosedPublic

Authored by danielcdh on Feb 21 2017, 11:45 AM.

Details

Summary

AddDiscriminator pass is only useful for sample pgo. This patch restricts AddDiscriminator to -fdebug-info-for-profiling so that it does not introduce unecessary debug size increases for non-sample-pgo builds.

Event Timeline

danielcdh created this revision.Feb 21 2017, 11:45 AM
dblaikie accepted this revision.Feb 21 2017, 11:47 AM

Did you want to enable all DebugInfoForProfiling features when there's a sample profile specified? (not sure if all of the features are needed when stitching things back up, or if some of them are only needed for emission/tracking purposes)

This revision is now accepted and ready to land.Feb 21 2017, 11:47 AM

You are right, only discriminator is needed, the encoding and emission part should be orthogonal. Patch updated.

danielcdh closed this revision.Feb 21 2017, 12:47 PM