diff options
author | Ellis Hoag <ellis.sparky.hoag@gmail.com> | 2022-07-14 11:40:53 -0700 |
---|---|---|
committer | Ellis Hoag <ellis.sparky.hoag@gmail.com> | 2022-07-14 11:41:30 -0700 |
commit | af58684f272046f293a9f469f03d23bd2b138349 (patch) | |
tree | 0c23a719f64481035e6ae962643df2b49bbb6a26 /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | 140bfdca60ae8b1b2ad115846379e3c9ca914bfb (diff) | |
download | llvm-af58684f272046f293a9f469f03d23bd2b138349.zip llvm-af58684f272046f293a9f469f03d23bd2b138349.tar.gz llvm-af58684f272046f293a9f469f03d23bd2b138349.tar.bz2 |
[InstrProf] Add options to profile function groups
Add two options, `-fprofile-function-groups=N` and `-fprofile-selected-function-group=i` used to partition functions into `N` groups and only instrument the functions in group `i`. Similar options were added to xray in https://reviews.llvm.org/D87953 and the goal is the same; to reduce instrumented size overhead by spreading the overhead across multiple builds. Raw profiles from different groups can be added like normal using the `llvm-profdata merge` command.
Reviewed By: ianlevesque
Differential Revision: https://reviews.llvm.org/D129594
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index 17c1c91..5012bd8 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/lib/CodeGen/CodeGenFunction.cpp @@ -852,7 +852,7 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy, } if (CGM.getCodeGenOpts().getProfileInstr() != CodeGenOptions::ProfileNone) - if (CGM.isProfileInstrExcluded(Fn, Loc)) + if (CGM.isFunctionBlockedFromProfileInstr(Fn, Loc)) Fn->addFnAttr(llvm::Attribute::NoProfile); unsigned Count, Offset; |