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

Unified Diff: test/cctest/compiler/test-gap-resolver.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-verifier.cc ('k') | test/cctest/compiler/test-instruction.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-gap-resolver.cc
diff --git a/test/cctest/compiler/test-gap-resolver.cc b/test/cctest/compiler/test-gap-resolver.cc
index a081ddb8fe9d79410692e8fb43413b693e1ec2a0..09a7154089a1c9582d50758c418df810e75378f7 100644
--- a/test/cctest/compiler/test-gap-resolver.cc
+++ b/test/cctest/compiler/test-gap-resolver.cc
@@ -89,8 +89,7 @@
if (key.is_constant) {
return ConstantOperand(key.index);
}
- return AllocatedOperand(
- key.kind, InstructionSequence::DefaultRepresentation(), key.index);
+ return AllocatedOperand(key.kind, key.index);
}
friend std::ostream& operator<<(std::ostream& os,
@@ -149,7 +148,7 @@
ParallelMove* Create(int size) {
ParallelMove* parallel_move = new (main_zone()) ParallelMove(main_zone());
- std::set<InstructionOperand, CompareOperandModuloType> seen;
+ std::set<InstructionOperand> seen;
for (int i = 0; i < size; ++i) {
MoveOperands mo(CreateRandomOperand(true), CreateRandomOperand(false));
if (!mo.IsRedundant() && seen.find(mo.destination()) == seen.end()) {
@@ -161,38 +160,18 @@
}
private:
- MachineType RandomType() {
- int index = rng_->NextInt(3);
- switch (index) {
- case 0:
- return kRepWord32;
- case 1:
- return kRepWord64;
- case 2:
- return kRepTagged;
- }
- UNREACHABLE();
- return kMachNone;
- }
-
- MachineType RandomDoubleType() {
- int index = rng_->NextInt(2);
- if (index == 0) return kRepFloat64;
- return kRepFloat32;
- }
-
InstructionOperand CreateRandomOperand(bool is_source) {
int index = rng_->NextInt(6);
// destination can't be Constant.
switch (rng_->NextInt(is_source ? 5 : 4)) {
case 0:
- return StackSlotOperand(RandomType(), index);
+ return StackSlotOperand(index);
case 1:
- return DoubleStackSlotOperand(RandomDoubleType(), index);
+ return DoubleStackSlotOperand(index);
case 2:
- return RegisterOperand(RandomType(), index);
+ return RegisterOperand(index);
case 3:
- return DoubleRegisterOperand(RandomDoubleType(), index);
+ return DoubleRegisterOperand(index);
case 4:
return ConstantOperand(index);
}
« no previous file with comments | « src/compiler/register-allocator-verifier.cc ('k') | test/cctest/compiler/test-instruction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698