This is an archive of the discontinued LLVM Phabricator instance.

[PGO] Enable `-fprofile-update` for `-fprofile-generate`
ClosedPublic

Authored by qiongsiwu1 on Aug 7 2023, 6:20 AM.

Details

Summary

Currently, the -fprofile-udpate is ignored when -fprofile-generate is in effect. This patch enables -fprofile-update for -fprofile-generate. This patch continues the work from https://reviews.llvm.org/D87737, which added -fprofile-update in the first place.

Diff Detail

Event Timeline

qiongsiwu1 created this revision.Aug 7 2023, 6:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 7 2023, 6:20 AM
qiongsiwu1 requested review of this revision.Aug 7 2023, 6:20 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptAug 7 2023, 6:20 AM

Update clang users manual.

Ping for review. Thanks!

MaskRay accepted this revision.Aug 14 2023, 11:48 AM

Thanks!

llvm/lib/Passes/PassBuilderPipelines.cpp
1796–1798

The canonical way to specify the parameter name is /*IsCS=*/true

This revision is now accepted and ready to land.Aug 14 2023, 11:48 AM

Please add a link to https://reviews.llvm.org/D87737 in the summary/commit message.

Please add a link to https://reviews.llvm.org/D87737 in the summary/commit message.

Will do!

llvm/lib/Passes/PassBuilderPipelines.cpp
1796–1798

Ah thanks for pointing it out! Let me fix it in a later NFC patch if that is OK. There are quite a few changes required and they would make the actual feature harder to see.

qiongsiwu1 edited the summary of this revision. (Show Details)Aug 14 2023, 12:14 PM
MaskRay added inline comments.Aug 14 2023, 12:16 PM
llvm/lib/Passes/PassBuilderPipelines.cpp
1796–1798

I think it's better to fix the argument style while you are modifying it. Otherwise, there may not be not much value to do a batch change for this file.

qiongsiwu1 added inline comments.Aug 14 2023, 12:21 PM
llvm/lib/Passes/PassBuilderPipelines.cpp
1796–1798

I think it's better to fix the argument style while you are modifying it. Otherwise, there may not be not much value to do a batch change for this file.

Ok sounds good. I will fix the comments relevant to this patch. Thanks!

Fixing method parameter name format.

qiongsiwu1 marked 2 inline comments as done.Aug 14 2023, 1:31 PM