================ @@ -575,10 +583,16 @@ void preprocessUnreachableBlocks(FlowFunction &Func) { /// Decide if stale profile matching can be applied for a given function. /// Currently we skip inference for (very) large instances and for instances /// having "unexpected" control flow (e.g., having no sink basic blocks). -bool canApplyInference(const FlowFunction &Func) { +bool canApplyInference(const FlowFunction &Func, + const yaml::bolt::BinaryFunctionProfile &YamlBF, + const uint64_t &MatchedBlocks) { if (Func.Blocks.size() > opts::StaleMatchingMaxFuncSize) return false; + if ((double)(MatchedBlocks) / YamlBF.Blocks.size() <= ---------------- aaupov wrote:
It's preferred to use integer math when dealing with options, e.g.: https://github.com/llvm/llvm-project/blob/67285feffd6708e6db36c11faf95eeab449e797a/bolt/lib/Passes/IndirectCallPromotion.cpp#L584-L586 https://github.com/llvm/llvm-project/pull/95156 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits