[llvm] [BOLT] Check BF state in stale matching (PR #85339)

Maksim Panchenko via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 14 22:35:33 PDT 2024


================
@@ -705,6 +706,9 @@ void assignProfile(BinaryFunction &BF,
 
 bool YAMLProfileReader::inferStaleProfile(
     BinaryFunction &BF, const yaml::bolt::BinaryFunctionProfile &YamlBF) {
+  if (BF.getState() != BinaryFunction::State::CFG)
----------------
maksfb wrote:

nit: you can use `if (!BF.hasCFG())...`, otherwise LGTM.

https://github.com/llvm/llvm-project/pull/85339


More information about the llvm-commits mailing list