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

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

Issue 2451853002: Uniform and precise source positions for inlining (Closed)
Patch Set: fixed gcmole issue Created 4 years, 1 month 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
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 #ifndef V8_COMPILER_JS_INLINING_HEURISTIC_H_ 5 #ifndef V8_COMPILER_JS_INLINING_HEURISTIC_H_
6 #define V8_COMPILER_JS_INLINING_HEURISTIC_H_ 6 #define V8_COMPILER_JS_INLINING_HEURISTIC_H_
7 7
8 #include "src/compiler/js-inlining.h" 8 #include "src/compiler/js-inlining.h"
9 9
10 namespace v8 { 10 namespace v8 {
11 namespace internal { 11 namespace internal {
12 namespace compiler { 12 namespace compiler {
13 13
14 class JSInliningHeuristic final : public AdvancedReducer { 14 class JSInliningHeuristic final : public AdvancedReducer {
15 public: 15 public:
16 enum Mode { kGeneralInlining, kRestrictedInlining, kStressInlining }; 16 enum Mode { kGeneralInlining, kRestrictedInlining, kStressInlining };
17 JSInliningHeuristic(Editor* editor, Mode mode, Zone* local_zone, 17 JSInliningHeuristic(Editor* editor, Mode mode, Zone* local_zone,
18 CompilationInfo* info, JSGraph* jsgraph) 18 CompilationInfo* info, JSGraph* jsgraph,
19 SourcePositionTable* source_positions)
19 : AdvancedReducer(editor), 20 : AdvancedReducer(editor),
20 mode_(mode), 21 mode_(mode),
21 inliner_(editor, local_zone, info, jsgraph), 22 inliner_(editor, local_zone, info, jsgraph, source_positions),
22 candidates_(local_zone), 23 candidates_(local_zone),
23 seen_(local_zone), 24 seen_(local_zone),
24 jsgraph_(jsgraph) {} 25 jsgraph_(jsgraph) {}
25 26
26 Reduction Reduce(Node* node) final; 27 Reduction Reduce(Node* node) final;
27 28
28 // Processes the list of candidates gathered while the reducer was running, 29 // Processes the list of candidates gathered while the reducer was running,
29 // and inlines call sites that the heuristic determines to be important. 30 // and inlines call sites that the heuristic determines to be important.
30 void Finalize() final; 31 void Finalize() final;
31 32
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 ZoneSet<NodeId> seen_; 65 ZoneSet<NodeId> seen_;
65 JSGraph* const jsgraph_; 66 JSGraph* const jsgraph_;
66 int cumulative_count_ = 0; 67 int cumulative_count_ = 0;
67 }; 68 };
68 69
69 } // namespace compiler 70 } // namespace compiler
70 } // namespace internal 71 } // namespace internal
71 } // namespace v8 72 } // namespace v8
72 73
73 #endif // V8_COMPILER_JS_INLINING_HEURISTIC_H_ 74 #endif // V8_COMPILER_JS_INLINING_HEURISTIC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698