This is an archive of the discontinued LLVM Phabricator instance.

Fix an obvious bug in SampleProfileReaderGCC.
ClosedPublic

Authored by danielcdh on Feb 21 2017, 3:31 PM.

Details

Summary

The CallTargetProfile should be added to FProfile to be consistent with other profile readers.

Event Timeline

danielcdh created this revision.Feb 21 2017, 3:31 PM
davidxl edited edge metadata.Feb 21 2017, 3:34 PM

Is it possible to add a test?

danielcdh updated this revision to Diff 89301.Feb 21 2017, 4:38 PM

add unittest

davidxl added inline comments.Feb 21 2017, 4:43 PM
test/Transforms/SampleProfile/indirect-call.ll
5 ↗(On Diff #89301)

is there a need for the GCC prefix? The pattern is the same as the existing one.

danielcdh added inline comments.Feb 21 2017, 4:52 PM
test/Transforms/SampleProfile/indirect-call.ll
5 ↗(On Diff #89301)

The gcc version of the profile only contains the profile for "test". As there is no tool to convert llvm profile to gcc format, I need to manually fake a gcc profile, which is not easy when there is inline stack.

davidxl accepted this revision.Feb 21 2017, 5:12 PM

lgtm

This revision is now accepted and ready to land.Feb 21 2017, 5:12 PM
danielcdh updated this revision to Diff 89372.Feb 22 2017, 9:19 AM

The gcc reader does not work on certain architectures. Move the tests to a separate file and added XFAIL for those architectures.

danielcdh closed this revision.Feb 22 2017, 9:38 AM