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

Unified Diff: src/compiler/instruction-selector-impl.h

Issue 623313003: [turbofan] map vregs early (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/register-allocator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/instruction-selector-impl.h
diff --git a/src/compiler/instruction-selector-impl.h b/src/compiler/instruction-selector-impl.h
index ac7c48698f94c8e5b147e0d7e4362a6472f62df3..600ac399da7544368b54380e7021d36f8f06eeb4 100644
--- a/src/compiler/instruction-selector-impl.h
+++ b/src/compiler/instruction-selector-impl.h
@@ -45,8 +45,8 @@ class OperandGenerator {
InstructionOperand* DefineAsConstant(Node* node) {
selector()->MarkAsDefined(node);
- sequence()->AddConstant(node->id(), ToConstant(node));
- return ConstantOperand::Create(node->id(), zone());
+ int virtual_register = sequence()->AddConstant(node, ToConstant(node));
+ return ConstantOperand::Create(virtual_register, zone());
}
InstructionOperand* DefineAsLocation(Node* node, LinkageLocation location,
@@ -166,7 +166,8 @@ class OperandGenerator {
UnallocatedOperand* Define(Node* node, UnallocatedOperand* operand) {
DCHECK_NOT_NULL(node);
DCHECK_NOT_NULL(operand);
- operand->set_virtual_register(node->id());
+ operand->set_virtual_register(
+ selector_->sequence()->GetVirtualRegister(node));
selector()->MarkAsDefined(node);
return operand;
}
@@ -174,7 +175,8 @@ class OperandGenerator {
UnallocatedOperand* Use(Node* node, UnallocatedOperand* operand) {
DCHECK_NOT_NULL(node);
DCHECK_NOT_NULL(operand);
- operand->set_virtual_register(node->id());
+ operand->set_virtual_register(
+ selector_->sequence()->GetVirtualRegister(node));
selector()->MarkAsUsed(node);
return operand;
}
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/register-allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698