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

Side by Side Diff: src/compiler/gap-resolver.cc

Issue 1959763002: [turbofan] Rename floating point register / slot methods. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Unfix arm64. Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « src/compiler/code-generator.cc ('k') | src/compiler/graph-visualizer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/gap-resolver.h" 5 #include "src/compiler/gap-resolver.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <set> 9 #include <set>
10 10
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 std::bind2nd(std::ptr_fun(&Blocks), destination)); 87 std::bind2nd(std::ptr_fun(&Blocks), destination));
88 if (blocker == moves->end()) { 88 if (blocker == moves->end()) {
89 // The easy case: This move is not blocked. 89 // The easy case: This move is not blocked.
90 assembler_->AssembleMove(&source, &destination); 90 assembler_->AssembleMove(&source, &destination);
91 move->Eliminate(); 91 move->Eliminate();
92 return; 92 return;
93 } 93 }
94 94
95 DCHECK((*blocker)->IsPending()); 95 DCHECK((*blocker)->IsPending());
96 // Ensure source is a register or both are stack slots, to limit swap cases. 96 // Ensure source is a register or both are stack slots, to limit swap cases.
97 if (source.IsStackSlot() || source.IsDoubleStackSlot()) { 97 if (source.IsStackSlot() || source.IsFPStackSlot()) {
98 std::swap(source, destination); 98 std::swap(source, destination);
99 } 99 }
100 assembler_->AssembleSwap(&source, &destination); 100 assembler_->AssembleSwap(&source, &destination);
101 move->Eliminate(); 101 move->Eliminate();
102 102
103 // Any unperformed (including pending) move with a source of either this 103 // Any unperformed (including pending) move with a source of either this
104 // move's source or destination needs to have their source changed to 104 // move's source or destination needs to have their source changed to
105 // reflect the state of affairs after the swap. 105 // reflect the state of affairs after the swap.
106 for (MoveOperands* other : *moves) { 106 for (MoveOperands* other : *moves) {
107 if (other->Blocks(source)) { 107 if (other->Blocks(source)) {
108 other->set_source(destination); 108 other->set_source(destination);
109 } else if (other->Blocks(destination)) { 109 } else if (other->Blocks(destination)) {
110 other->set_source(source); 110 other->set_source(source);
111 } 111 }
112 } 112 }
113 } 113 }
114 } // namespace compiler 114 } // namespace compiler
115 } // namespace internal 115 } // namespace internal
116 } // namespace v8 116 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/code-generator.cc ('k') | src/compiler/graph-visualizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698