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

Side by Side Diff: src/compiler/js-inlining-heuristic.cc

Issue 1407533004: [turbofan] Fix various issues with --turbo-inlining enabled. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comment. Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « src/compiler/js-inlining.cc ('k') | src/compiler/js-operator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/js-inlining-heuristic.h" 5 #include "src/compiler/js-inlining-heuristic.h"
6 6
7 #include "src/compiler/dead-code-elimination.h" // TODO(mstarzinger): Remove! 7 #include "src/compiler/dead-code-elimination.h" // TODO(mstarzinger): Remove!
8 #include "src/compiler/node-matchers.h" 8 #include "src/compiler/node-matchers.h"
9 #include "src/objects-inl.h" 9 #include "src/objects-inl.h"
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 return NoChange(); 49 return NoChange();
50 } 50 }
51 51
52 // Quick check on the size of the AST to avoid parsing large candidate. 52 // Quick check on the size of the AST to avoid parsing large candidate.
53 if (function->shared()->ast_node_count() > FLAG_max_inlined_nodes) { 53 if (function->shared()->ast_node_count() > FLAG_max_inlined_nodes) {
54 return NoChange(); 54 return NoChange();
55 } 55 }
56 56
57 // Gather feedback on how often this call site has been hit before. 57 // Gather feedback on how often this call site has been hit before.
58 CallFunctionParameters p = CallFunctionParametersOf(node->op()); 58 CallFunctionParameters p = CallFunctionParametersOf(node->op());
59 CallICNexus nexus(p.feedback().vector(), p.feedback().slot()); 59 int calls = -1; // Same default as CallICNexus::ExtractCallCount.
60 int calls = nexus.ExtractCallCount(); 60 if (p.feedback().IsValid()) {
61 CallICNexus nexus(p.feedback().vector(), p.feedback().slot());
62 calls = nexus.ExtractCallCount();
63 }
61 64
62 // --------------------------------------------------------------------------- 65 // ---------------------------------------------------------------------------
63 // Everything above this line is part of the inlining heuristic. 66 // Everything above this line is part of the inlining heuristic.
64 // --------------------------------------------------------------------------- 67 // ---------------------------------------------------------------------------
65 68
66 // In the general case we remember the candidate for later. 69 // In the general case we remember the candidate for later.
67 candidates_.push_back({function, node, calls}); 70 candidates_.push_back({function, node, calls});
68 return NoChange(); 71 return NoChange();
69 } 72 }
70 73
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 candidate.node->id(), candidate.calls, 108 candidate.node->id(), candidate.calls,
106 candidate.function->shared()->SourceSize(), 109 candidate.function->shared()->SourceSize(),
107 candidate.function->shared()->ast_node_count(), 110 candidate.function->shared()->ast_node_count(),
108 candidate.function->shared()->DebugName()->ToCString().get()); 111 candidate.function->shared()->DebugName()->ToCString().get());
109 } 112 }
110 } 113 }
111 114
112 } // namespace compiler 115 } // namespace compiler
113 } // namespace internal 116 } // namespace internal
114 } // namespace v8 117 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-inlining.cc ('k') | src/compiler/js-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698