Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Unified Diff: src/compiler/js-inlining-heuristic.cc

Issue 2731723002: [Turbofan] Don't inline if we never saw a function. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/feedback-vector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-inlining-heuristic.cc
diff --git a/src/compiler/js-inlining-heuristic.cc b/src/compiler/js-inlining-heuristic.cc
index 6f99fbb183a20df9b0ddbaa7a9a678e7cfd8d3dc..59af71f1ae58755e971872e043508a85281114ad 100644
--- a/src/compiler/js-inlining-heuristic.cc
+++ b/src/compiler/js-inlining-heuristic.cc
@@ -164,6 +164,10 @@ void JSInliningHeuristic::Finalize() {
auto i = candidates_.begin();
Candidate candidate = *i;
candidates_.erase(i);
+ // Only include candidates that we've successfully called before.
+ // The candidate list is sorted, so we can exit at the first occurance of
+ // frequency 0 in the list.
+ if (candidate.frequency <= 0.0) return;
// Make sure we don't try to inline dead candidate nodes.
if (!candidate.node->IsDead()) {
Reduction const reduction = InlineCandidate(candidate);
« no previous file with comments | « no previous file | src/feedback-vector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698