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

Unified Diff: src/compiler/instruction-selector.cc

Issue 904693002: [turbofan] Remove global InstructionOperand caches. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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.cc ('k') | src/compiler/instruction-selector-impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/instruction-selector.cc
diff --git a/src/compiler/instruction-selector.cc b/src/compiler/instruction-selector.cc
index 65f1b00869dd7bd5402ad6648282fd0b4728ad69..11f455cfbb4c74b1d18114d651b8c2edb55d0983 100644
--- a/src/compiler/instruction-selector.cc
+++ b/src/compiler/instruction-selector.cc
@@ -30,7 +30,7 @@ InstructionSelector::InstructionSelector(Zone* zone, size_t node_count,
defined_(node_count, false, zone),
used_(node_count, false, zone),
virtual_registers_(node_count,
- UnallocatedOperand::kInvalidVirtualRegister, zone) {
+ InstructionOperand::kInvalidVirtualRegister, zone) {
instructions_.reserve(node_count);
}
@@ -182,7 +182,7 @@ int InstructionSelector::GetVirtualRegister(const Node* node) {
size_t const id = node->id();
DCHECK_LT(id, virtual_registers_.size());
int virtual_register = virtual_registers_[id];
- if (virtual_register == UnallocatedOperand::kInvalidVirtualRegister) {
+ if (virtual_register == InstructionOperand::kInvalidVirtualRegister) {
virtual_register = sequence()->NextVirtualRegister();
virtual_registers_[id] = virtual_register;
}
@@ -194,7 +194,7 @@ const std::map<NodeId, int> InstructionSelector::GetVirtualRegistersForTesting()
const {
std::map<NodeId, int> virtual_registers;
for (size_t n = 0; n < virtual_registers_.size(); ++n) {
- if (virtual_registers_[n] != UnallocatedOperand::kInvalidVirtualRegister) {
+ if (virtual_registers_[n] != InstructionOperand::kInvalidVirtualRegister) {
NodeId const id = static_cast<NodeId>(n);
virtual_registers.insert(std::make_pair(id, virtual_registers_[n]));
}
@@ -239,7 +239,7 @@ void InstructionSelector::MarkAsUsed(Node* node) {
bool InstructionSelector::IsDouble(const Node* node) const {
DCHECK_NOT_NULL(node);
int const virtual_register = virtual_registers_[node->id()];
- if (virtual_register == UnallocatedOperand::kInvalidVirtualRegister) {
+ if (virtual_register == InstructionOperand::kInvalidVirtualRegister) {
return false;
}
return sequence()->IsDouble(virtual_register);
@@ -256,7 +256,7 @@ void InstructionSelector::MarkAsDouble(Node* node) {
bool InstructionSelector::IsReference(const Node* node) const {
DCHECK_NOT_NULL(node);
int const virtual_register = virtual_registers_[node->id()];
- if (virtual_register == UnallocatedOperand::kInvalidVirtualRegister) {
+ if (virtual_register == InstructionOperand::kInvalidVirtualRegister) {
return false;
}
return sequence()->IsReference(virtual_register);
« no previous file with comments | « src/compiler/instruction.cc ('k') | src/compiler/instruction-selector-impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698