-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-codegenArea: Code generationArea: Code generationC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
AutoFDO is a variant of PGO with less compile-time tradeoff. A few modifications are needed on rustc side to make it possible:
- "profile-sample-use": a LLVM option to load the profile. This is very similar to "profile-use" and can be trivially implemented.
- "debug-info-for-profiling": a very complicated option that has multiple effects in LLVM as well as the frontend (in the original impl, clang).
- The original patch enabled debug info for "start line of all subprograms, linkage name of all subprograms, and standalone subprograms (functions that has neither inlined nor been inlined)" on the frontend side (generation of DWARF)
- Subsequent patches have made this flag to be used to gate
AddDiscriminator
pass. It doesn't seem that we are calling this pass in Rust? - Many pass control their behavior based on the optional boolean passed to
createCompileUnit
Also (maybe) unlike PGO, AutoFDO needs at least line-level debuginfo to work.
XVilka, HadrienG2, radmerti, kongy, FilipAndersson245 and 2 moreytrezqytrezq
Metadata
Metadata
Assignees
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-codegenArea: Code generationArea: Code generationC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.