[PATCH] D25525: Cold callee heuristic should not override hot callsite heuristic in inliner.
Dehao Chen via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 12 11:03:24 PDT 2016
danielcdh created this revision.
danielcdh added a reviewer: eraman.
danielcdh added a subscriber: llvm-commits.
This patch checks if hot callsite heuristic is applied. If yes, then cold caller heuristic should be backed out.
https://reviews.llvm.org/D25525
Files:
lib/Analysis/InlineCost.cpp
Index: lib/Analysis/InlineCost.cpp
===================================================================
--- lib/Analysis/InlineCost.cpp
+++ lib/Analysis/InlineCost.cpp
@@ -657,7 +657,7 @@
bool ColdCallee = PSI->isFunctionEntryCold(&Callee);
// For cold callees, use the ColdThreshold knob if it is available and reduces
// the threshold.
- if (ColdCallee)
+ if (ColdCallee && !HotCallsite)
Threshold = MinIfValid(Threshold, Params.ColdThreshold);
// Finally, take the target-specific inlining threshold multiplier into
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25525.74404.patch
Type: text/x-patch
Size: 539 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161012/666d2140/attachment.bin>
More information about the llvm-commits
mailing list