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

Side by Side Diff: src/compiler/instruction-selector-impl.h

Issue 809333002: [turbofan] Implement OSR for outer loops. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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/instruction-selector.cc ('k') | src/compiler/linkage.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_INSTRUCTION_SELECTOR_IMPL_H_ 5 #ifndef V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_
6 #define V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ 6 #define V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_
7 7
8 #include "src/compiler/instruction.h" 8 #include "src/compiler/instruction.h"
9 #include "src/compiler/instruction-selector.h" 9 #include "src/compiler/instruction-selector.h"
10 #include "src/compiler/linkage.h" 10 #include "src/compiler/linkage.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 DCHECK_NOT_NULL(node); 181 DCHECK_NOT_NULL(node);
182 DCHECK_NOT_NULL(operand); 182 DCHECK_NOT_NULL(operand);
183 operand->set_virtual_register(selector_->GetVirtualRegister(node)); 183 operand->set_virtual_register(selector_->GetVirtualRegister(node));
184 selector()->MarkAsUsed(node); 184 selector()->MarkAsUsed(node);
185 return operand; 185 return operand;
186 } 186 }
187 187
188 UnallocatedOperand* ToUnallocatedOperand(LinkageLocation location, 188 UnallocatedOperand* ToUnallocatedOperand(LinkageLocation location,
189 MachineType type) { 189 MachineType type) {
190 if (location.location_ == LinkageLocation::ANY_REGISTER) { 190 if (location.location_ == LinkageLocation::ANY_REGISTER) {
191 // any machine register.
191 return new (zone()) 192 return new (zone())
192 UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER); 193 UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER);
193 } 194 }
194 if (location.location_ < 0) { 195 if (location.location_ < 0) {
196 // a location on the caller frame.
195 return new (zone()) UnallocatedOperand(UnallocatedOperand::FIXED_SLOT, 197 return new (zone()) UnallocatedOperand(UnallocatedOperand::FIXED_SLOT,
196 location.location_); 198 location.location_);
197 } 199 }
200 if (location.location_ > LinkageLocation::ANY_REGISTER) {
201 // a spill location on this (callee) frame.
202 return new (zone()) UnallocatedOperand(
203 UnallocatedOperand::FIXED_SLOT,
204 location.location_ - LinkageLocation::ANY_REGISTER - 1);
205 }
206 // a fixed register.
198 if (RepresentationOf(type) == kRepFloat64) { 207 if (RepresentationOf(type) == kRepFloat64) {
199 return new (zone()) UnallocatedOperand( 208 return new (zone()) UnallocatedOperand(
200 UnallocatedOperand::FIXED_DOUBLE_REGISTER, location.location_); 209 UnallocatedOperand::FIXED_DOUBLE_REGISTER, location.location_);
201 } 210 }
202 return new (zone()) UnallocatedOperand(UnallocatedOperand::FIXED_REGISTER, 211 return new (zone()) UnallocatedOperand(UnallocatedOperand::FIXED_REGISTER,
203 location.location_); 212 location.location_);
204 } 213 }
205 214
206 InstructionSelector* selector_; 215 InstructionSelector* selector_;
207 }; 216 };
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 : (frame_state_descriptor->GetTotalSize() + 367 : (frame_state_descriptor->GetTotalSize() +
359 1); // Include deopt id. 368 1); // Include deopt id.
360 } 369 }
361 }; 370 };
362 371
363 } // namespace compiler 372 } // namespace compiler
364 } // namespace internal 373 } // namespace internal
365 } // namespace v8 374 } // namespace v8
366 375
367 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ 376 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_
OLDNEW
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/linkage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698