Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ctx_profile] Decouple ctx instrumentation from PGOOpt #92445

Merged
merged 3 commits into from
May 16, 2024

Conversation

mtrofin
Copy link
Member

@mtrofin mtrofin commented May 16, 2024

We currently don't support passing files and don't need frontend involvment either.

We currently don't support passing files and don't need frontend involvment either.
Copy link
Contributor

@teresajohnson teresajohnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm but with a couple of minor comments/suggestions

@@ -1157,8 +1153,12 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level,
const bool IsPGOInstrUse =
IsPGOPreLink && PGOOpt->Action == PGOOptions::IRUse;
const bool IsMemprofUse = IsPGOPreLink && !PGOOpt->MemoryProfile.empty();
// We don't want to mix pgo ctx gen and pgo gen; we also don't currently
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should there be an assert that fires if both are enabled?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

@@ -1168,9 +1168,13 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level,
/*IsCS=*/false, PGOOpt->AtomicCounterUpdate,
PGOOpt->ProfileFile, PGOOpt->ProfileRemappingFile,
PGOOpt->FS);
} else if (IsCtxProfGen) {
MPM.addPass(PGOInstrumentationGen(false));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

document constant parameter

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

@mtrofin mtrofin merged commit d311a62 into llvm:main May 16, 2024
3 of 4 checks passed
@mtrofin mtrofin deleted the pipeline branch May 16, 2024 20:41
qiaojbao pushed a commit to GPUOpen-Drivers/llvm-project that referenced this pull request Jun 5, 2024
…1da5ad733

Local branch amd-gfx 3c31da5 Merged main:911207338add39b8439a09fd7f9d97bbe4a335bd into amd-gfx:3ae085055ecb
Remote branch main d311a62 [ctx_profile] Decouple ctx  instrumentation from PGOOpt (llvm#92445)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants