This is an archive of the discontinued LLVM Phabricator instance.

[InstrProf] Add option to disable loop opt after PGO
ClosedPublic

Authored by ellis on Aug 12 2022, 4:18 PM.

Details

Summary

Add the -enable-post-pgo-loop-rotation option to enable or disable the loop rotation transformation [1]. With some instrumentations, e.g., function entry coverage [2], loop rotation is not necessary and can lead to some surprise differences in codegen, even for functions where instrumentation is blocked with noprofile or skipprofile. The default value is true so the default behavior does not change.

[1] https://www.llvm.org/docs/LoopTerminology.html#loop-terminology-loop-rotate
[2] https://reviews.llvm.org/D116180

Diff Detail

Event Timeline

ellis created this revision.Aug 12 2022, 4:18 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 12 2022, 4:18 PM
ellis published this revision for review.Aug 12 2022, 4:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 12 2022, 4:29 PM
ellis edited the summary of this revision. (Show Details)Aug 12 2022, 4:29 PM
ellis added a comment.Aug 17 2022, 9:48 AM

Friendly ping :)

phosek accepted this revision.Aug 17 2022, 10:42 AM

LGTM

This revision is now accepted and ready to land.Aug 17 2022, 10:42 AM
This revision was automatically updated to reflect the committed changes.