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

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

Issue 683933004: [turbofan] move Node to vreg mapping to InstructionSelector (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/pipeline.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 bc2ada775113bdc6f228551536bb45ddf48e8c7f..53e288df3e19a705694394d02625b269327a04c1 100644
--- a/src/compiler/instruction-selector-impl.h
+++ b/src/compiler/instruction-selector-impl.h
@@ -46,7 +46,8 @@ class OperandGenerator {
InstructionOperand* DefineAsConstant(Node* node) {
selector()->MarkAsDefined(node);
- int virtual_register = sequence()->AddConstant(node, ToConstant(node));
+ int virtual_register = selector_->GetVirtualRegister(node);
+ sequence()->AddConstant(virtual_register, ToConstant(node));
return ConstantOperand::Create(virtual_register, zone());
}
@@ -172,8 +173,7 @@ class OperandGenerator {
UnallocatedOperand* Define(Node* node, UnallocatedOperand* operand) {
DCHECK_NOT_NULL(node);
DCHECK_NOT_NULL(operand);
- operand->set_virtual_register(
- selector_->sequence()->GetVirtualRegister(node));
+ operand->set_virtual_register(selector_->GetVirtualRegister(node));
selector()->MarkAsDefined(node);
return operand;
}
@@ -181,8 +181,7 @@ class OperandGenerator {
UnallocatedOperand* Use(Node* node, UnallocatedOperand* operand) {
DCHECK_NOT_NULL(node);
DCHECK_NOT_NULL(operand);
- operand->set_virtual_register(
- selector_->sequence()->GetVirtualRegister(node));
+ operand->set_virtual_register(selector_->GetVirtualRegister(node));
selector()->MarkAsUsed(node);
return operand;
}
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698