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

Unified Diff: src/compiler/move-optimizer.cc

Issue 1050803002: [turbofan] cleanup InstructionOperand a little (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase 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/mips64/code-generator-mips64.cc ('k') | src/compiler/ppc/code-generator-ppc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/move-optimizer.cc
diff --git a/src/compiler/move-optimizer.cc b/src/compiler/move-optimizer.cc
index 7c2911e7f5aea03f9a87bc1257088ab43826fe14..56fdf038f40a6da08d09b728325dd6fb96686451 100644
--- a/src/compiler/move-optimizer.cc
+++ b/src/compiler/move-optimizer.cc
@@ -256,8 +256,7 @@ void MoveOptimizer::FinalizeMoves(Instruction* instr) {
loads.push_back(move);
// Replace source with copy for later use.
auto dest = move->destination();
- move->set_destination(
- InstructionOperand::New(code_zone(), dest->kind(), dest->index()));
+ move->set_destination(InstructionOperand::New(code_zone(), *dest));
continue;
}
if ((found->destination()->IsStackSlot() ||
@@ -266,12 +265,10 @@ void MoveOptimizer::FinalizeMoves(Instruction* instr) {
move->destination()->IsDoubleStackSlot())) {
// Found a better source for this load. Smash it in place to affect other
// loads that have already been split.
- InstructionOperand::Kind found_kind = found->destination()->kind();
- int found_index = found->destination()->index();
auto next_dest =
- InstructionOperand::New(code_zone(), found_kind, found_index);
+ InstructionOperand::New(code_zone(), *found->destination());
auto dest = move->destination();
- found->destination()->ConvertTo(dest->kind(), dest->index());
+ InstructionOperand::ReplaceWith(found->destination(), dest);
move->set_destination(next_dest);
}
// move from load destination.
« no previous file with comments | « src/compiler/mips64/code-generator-mips64.cc ('k') | src/compiler/ppc/code-generator-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698