================
@@ -219,7 +219,7 @@ bool CSPreInliner::shouldInline(ProfiledInlineCandidate 
&Candidate) {
       SampleThreshold *= CSPreinlMultiplierForPrevInl;
   }
 
-  return (Candidate.SizeCost < SampleThreshold);
+  return (Candidate.SizeCost <= SampleThreshold);
----------------
kunalspathak wrote:

This changes the boundary for every candidate, not just zero-size ones, and the 
[compiler side uses `Cost < 
Threshold`](https://github.com/llvm/llvm-project/blob/3c67042a157a3b92902ed7d28bc9dec81ddc8dea/llvm/include/llvm/Analysis/InlineCost.h#L140-L141).
 Could we special-case it instead, e.g. `Candidate.SizeCost == 0 || 
Candidate.SizeCost < SampleThreshold`?

https://github.com/llvm/llvm-project/pull/235988
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to