[llvm] [InstrProf] Do not block functions from PGOUse (PR #71106)
David Li via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 2 14:50:34 PDT 2023
david-xl wrote:
> > I think we should move the size/compiletime related logics outside of skipPGO. There is no point annotate PGO (and waste compile time) when instrumentation is skipped.
>
> If **instrumentation** is skipped then we should block PGOGen. But if a function is in a profile, we should still run PGOUse on that function and this would not waste compile time, even if it happens to have the `noprofile` attribute for whatever reason.
right. What I meant is to introduce two helper functions:
bool skipPGO() {
// critical edge based ...
..
}
bool skipPGOInstr() {
if (skipPGO())
return true;
// attribute based.
...
}
https://github.com/llvm/llvm-project/pull/71106
More information about the llvm-commits
mailing list