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

Side by Side Diff: src/interpreter/bytecode-register-optimizer.h

Issue 2033013002: [interpreter] Faster and fewer flushes in register optimizer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@oth-0061-tweaks
Patch Set: Rebase Created 4 years, 6 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 | « no previous file | src/interpreter/bytecode-register-optimizer.cc » ('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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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_INTERPRETER_BYTECODE_REGISTER_OPTIMIZER_H_ 5 #ifndef V8_INTERPRETER_BYTECODE_REGISTER_OPTIMIZER_H_
6 #define V8_INTERPRETER_BYTECODE_REGISTER_OPTIMIZER_H_ 6 #define V8_INTERPRETER_BYTECODE_REGISTER_OPTIMIZER_H_
7 7
8 #include "src/interpreter/bytecode-pipeline.h" 8 #include "src/interpreter/bytecode-pipeline.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 const uint32_t* operands, 86 const uint32_t* operands,
87 int operand_count); 87 int operand_count);
88 static Register GetRegisterOutputOperand(int index, Bytecode bytecode, 88 static Register GetRegisterOutputOperand(int index, Bytecode bytecode,
89 const uint32_t* operands, 89 const uint32_t* operands,
90 int operand_count); 90 int operand_count);
91 91
92 void CreateMaterializedEquivalent(RegisterInfo* info); 92 void CreateMaterializedEquivalent(RegisterInfo* info);
93 RegisterInfo* GetMaterializedEquivalent(RegisterInfo* info); 93 RegisterInfo* GetMaterializedEquivalent(RegisterInfo* info);
94 RegisterInfo* GetMaterializedEquivalentNotAccumulator(RegisterInfo* info); 94 RegisterInfo* GetMaterializedEquivalentNotAccumulator(RegisterInfo* info);
95 void Materialize(RegisterInfo* info); 95 void Materialize(RegisterInfo* info);
96 void AddToEquivalenceSet(RegisterInfo* set_member,
97 RegisterInfo* non_set_member);
96 98
97 // Methods for finding and creating metadata for each register. 99 // Methods for finding and creating metadata for each register.
98 RegisterInfo* GetOrCreateRegisterInfo(Register reg); 100 RegisterInfo* GetOrCreateRegisterInfo(Register reg);
99 RegisterInfo* GetRegisterInfo(Register reg); 101 RegisterInfo* GetRegisterInfo(Register reg);
100 RegisterInfo* NewRegisterInfo(Register reg); 102 RegisterInfo* NewRegisterInfo(Register reg);
101 void GrowRegisterMap(Register reg); 103 void GrowRegisterMap(Register reg);
102 104
103 bool RegisterIsTemporary(Register reg) const { 105 bool RegisterIsTemporary(Register reg) const {
104 return reg >= temporary_base_; 106 return reg >= temporary_base_;
105 } 107 }
(...skipping 27 matching lines...) Expand all
133 const Register temporary_base_; 135 const Register temporary_base_;
134 136
135 // Direct mapping to register info. 137 // Direct mapping to register info.
136 ZoneVector<RegisterInfo*> register_info_table_; 138 ZoneVector<RegisterInfo*> register_info_table_;
137 int register_info_table_offset_; 139 int register_info_table_offset_;
138 140
139 // Counter for equivalence sets identifiers. 141 // Counter for equivalence sets identifiers.
140 int equivalence_id_; 142 int equivalence_id_;
141 143
142 BytecodePipelineStage* next_stage_; 144 BytecodePipelineStage* next_stage_;
143 bool flushed_; 145 bool flush_required_;
144 Zone* zone_; 146 Zone* zone_;
145 147
146 DISALLOW_COPY_AND_ASSIGN(BytecodeRegisterOptimizer); 148 DISALLOW_COPY_AND_ASSIGN(BytecodeRegisterOptimizer);
147 }; 149 };
148 150
149 } // namespace interpreter 151 } // namespace interpreter
150 } // namespace internal 152 } // namespace internal
151 } // namespace v8 153 } // namespace v8
152 154
153 #endif // V8_INTERPRETER_BYTECODE_REGISTER_OPTIMIZER_H_ 155 #endif // V8_INTERPRETER_BYTECODE_REGISTER_OPTIMIZER_H_
OLDNEW
« no previous file with comments | « no previous file | src/interpreter/bytecode-register-optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698