This is an archive of the discontinued LLVM Phabricator instance.

[BOLT] Restrict ICP for functions with unknown control flow
ClosedPublic

Authored by Amir on Aug 29 2022, 1:11 PM.

Details

Summary

ICP has two modes: jump table promotion and indirect call promotion.
The selection is based on whether an instruction has a jump table or not.
An instruction with unknown control flow doesn't have a jump table and will
fall under indirect call promotion policy which might be incorrect/unsafe
(if an instruction is not a tail call, i.e. has local jump targets).

Prevent ICP for functions containing instructions with unknown control flow.

Follow-up to https://reviews.llvm.org/D128870.

Diff Detail

Event Timeline

Amir created this revision.Aug 29 2022, 1:11 PM
Herald added a reviewer: maksfb. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
Amir requested review of this revision.Aug 29 2022, 1:11 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 29 2022, 1:11 PM
maksfb accepted this revision.Sep 8 2022, 11:17 AM
This revision is now accepted and ready to land.Sep 8 2022, 11:17 AM
This revision was automatically updated to reflect the committed changes.