This is an archive of the discontinued LLVM Phabricator instance.

[Driver][PGO] Driver support for de-Optimizing cold functions (PATCH 2/2)
AbandonedPublic

Authored by myhsu on Sep 8 2020, 5:14 PM.

Details

Summary

Following up https://reviews.llvm.org/D87337 . This patch add the driver support with the flag -fprofile-omit-cold-opt=<percentage> and a shorthand -fprofile-omit-cold-opt that is equal to "-fprofile-omit-cold-opt=0"

authors: myhsu, probinson, and edd

Diff Detail

Event Timeline

myhsu created this revision.Sep 8 2020, 5:14 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 8 2020, 5:14 PM
uenoku added a subscriber: uenoku.Sep 9 2020, 10:37 AM
myhsu updated this revision to Diff 290769.Sep 9 2020, 10:47 AM

Fix a bug in driver that accidentally made this feature turn on by default

myhsu updated this revision to Diff 290849.Sep 9 2020, 5:16 PM
myhsu edited the summary of this revision. (Show Details)

Unified driver options from "-fprofile-deopt-cold-*" into "-fprofile-omit-cold-opt" and "-fprofile-omit-cold-opt=<percentage>". Where the former one is just a shorthand of "-fprofile-omit-cold-opt=0"

rengolin added inline comments.Sep 10 2020, 3:18 AM
clang/docs/ClangCommandLineReference.rst
2021

Following discussions in the mailing list, I'm wondering if we want to join the optsize and optnone implementations into one flag.

myhsu added a reviewer: vsk.Sep 16 2020, 11:15 PM
myhsu abandoned this revision.Apr 3 2023, 1:06 PM

just realized I haven't updated this patch for years. I'll come up with an up-to-date version when I have time.

Herald added a project: Restricted Project. · View Herald TranscriptApr 3 2023, 1:06 PM