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

Unified Diff: src/compiler/register-allocator-verifier.cc

Issue 1119483003: Revert of [turbofan] add MachineType to AllocatedOperand (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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/register-allocator.cc ('k') | test/cctest/compiler/test-gap-resolver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/register-allocator-verifier.cc
diff --git a/src/compiler/register-allocator-verifier.cc b/src/compiler/register-allocator-verifier.cc
index f23d24433f8dcfea5e1c45f1556046f20794af16..2a749dd5f8a61ed23aa6771689d231722ac4c4f6 100644
--- a/src/compiler/register-allocator-verifier.cc
+++ b/src/compiler/register-allocator-verifier.cc
@@ -163,7 +163,7 @@
CHECK(false);
break;
case UnallocatedOperand::NONE:
- if (sequence()->IsFloat(vreg)) {
+ if (sequence()->IsDouble(vreg)) {
constraint->type_ = kNoneDouble;
} else {
constraint->type_ = kNone;
@@ -178,14 +178,14 @@
constraint->value_ = unallocated->fixed_register_index();
break;
case UnallocatedOperand::MUST_HAVE_REGISTER:
- if (sequence()->IsFloat(vreg)) {
+ if (sequence()->IsDouble(vreg)) {
constraint->type_ = kDoubleRegister;
} else {
constraint->type_ = kRegister;
}
break;
case UnallocatedOperand::MUST_HAVE_SLOT:
- if (sequence()->IsFloat(vreg)) {
+ if (sequence()->IsDouble(vreg)) {
constraint->type_ = kDoubleSlot;
} else {
constraint->type_ = kSlot;
@@ -286,7 +286,7 @@
struct OperandLess {
bool operator()(const InstructionOperand* a,
const InstructionOperand* b) const {
- return a->CompareModuloType(*b);
+ return *a < *b;
}
};
@@ -320,7 +320,7 @@
this->erase(it++);
if (it == this->end()) return;
}
- if (it->first->EqualsModuloType(*o.first)) {
+ if (*it->first == *o.first) {
++it;
if (it == this->end()) return;
} else {
@@ -372,14 +372,13 @@
}
void DropRegisters(const RegisterConfiguration* config) {
- // TODO(dcarney): sort map by kind and drop range.
- for (auto it = map().begin(); it != map().end();) {
- auto op = it->first;
- if (op->IsRegister() || op->IsDoubleRegister()) {
- map().erase(it++);
- } else {
- ++it;
- }
+ for (int i = 0; i < config->num_general_registers(); ++i) {
+ RegisterOperand op(i);
+ Drop(&op);
+ }
+ for (int i = 0; i < config->num_double_registers(); ++i) {
+ DoubleRegisterOperand op(i);
+ Drop(&op);
}
}
« no previous file with comments | « src/compiler/register-allocator.cc ('k') | test/cctest/compiler/test-gap-resolver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698