This is an archive of the discontinued LLVM Phabricator instance.

[SampleProf][Inliner] Add an option to turn off inliner in sample-profile pass.
ClosedPublic

Authored by mingmingl on Feb 22 2022, 12:07 PM.

Details

Summary

Use case is offline evaluation (for inliner effectiveness) or debugging.

Diff Detail

Event Timeline

mingmingl created this revision.Feb 22 2022, 12:07 PM
mingmingl published this revision for review.Feb 22 2022, 12:08 PM
mingmingl added reviewers: wenlei, xur.
mingmingl added a subscriber: davidxl.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 22 2022, 12:08 PM
davidxl added inline comments.Feb 22 2022, 12:18 PM
llvm/lib/Transforms/IPO/SampleProfile.cpp
187

it is better to invert it: 'disable-sample-loader-inlining' and set to false.

mingmingl updated this revision to Diff 410623.Feb 22 2022, 1:05 PM

Invert the added option to 'disable-sample-loader-inlining'

mingmingl marked an inline comment as done.Feb 22 2022, 1:05 PM
mingmingl added inline comments.
llvm/lib/Transforms/IPO/SampleProfile.cpp
187

thanks for the suggestions!

Done.

mingmingl marked an inline comment as done.Feb 22 2022, 1:05 PM

Also let me know if it's preferred to have a test case for it!

Probably add a test case in file test/Transforms/SampleProfile/profile-context-tracker.ll

mingmingl updated this revision to Diff 410924.Feb 23 2022, 1:25 PM

Modify test case profile-context-tracker.ll for disable-sample-loader-inlining.

Probably add a test case in file test/Transforms/SampleProfile/profile-context-tracker.ll

Done, thanks for the suggestions!

davidxl accepted this revision.Feb 23 2022, 2:03 PM

lgtm

This revision is now accepted and ready to land.Feb 23 2022, 2:03 PM
This revision was landed with ongoing or failed builds.Feb 23 2022, 2:21 PM
This revision was automatically updated to reflect the committed changes.
ormris removed a subscriber: ormris.Feb 24 2022, 10:07 AM