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

Side by Side Diff: src/compiler/instruction-selector.cc

Issue 623313003: [turbofan] map vregs early (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/compiler/instruction.cc ('k') | src/compiler/instruction-selector-impl.h » ('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/instruction-selector.h" 5 #include "src/compiler/instruction-selector.h"
6 6
7 #include "src/compiler/instruction-selector-impl.h" 7 #include "src/compiler/instruction-selector-impl.h"
8 #include "src/compiler/node-matchers.h" 8 #include "src/compiler/node-matchers.h"
9 #include "src/compiler/node-properties-inl.h" 9 #include "src/compiler/node-properties-inl.h"
10 #include "src/compiler/pipeline.h" 10 #include "src/compiler/pipeline.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 DCHECK_NOT_NULL(node); 183 DCHECK_NOT_NULL(node);
184 NodeId id = node->id(); 184 NodeId id = node->id();
185 DCHECK(id >= 0); 185 DCHECK(id >= 0);
186 DCHECK(id < static_cast<NodeId>(used_.size())); 186 DCHECK(id < static_cast<NodeId>(used_.size()));
187 used_[id] = true; 187 used_[id] = true;
188 } 188 }
189 189
190 190
191 bool InstructionSelector::IsDouble(const Node* node) const { 191 bool InstructionSelector::IsDouble(const Node* node) const {
192 DCHECK_NOT_NULL(node); 192 DCHECK_NOT_NULL(node);
193 return sequence()->IsDouble(node->id()); 193 return sequence()->IsDouble(sequence()->GetVirtualRegister(node));
194 } 194 }
195 195
196 196
197 void InstructionSelector::MarkAsDouble(Node* node) { 197 void InstructionSelector::MarkAsDouble(Node* node) {
198 DCHECK_NOT_NULL(node); 198 DCHECK_NOT_NULL(node);
199 DCHECK(!IsReference(node)); 199 DCHECK(!IsReference(node));
200 sequence()->MarkAsDouble(node->id()); 200 sequence()->MarkAsDouble(sequence()->GetVirtualRegister(node));
201 } 201 }
202 202
203 203
204 bool InstructionSelector::IsReference(const Node* node) const { 204 bool InstructionSelector::IsReference(const Node* node) const {
205 DCHECK_NOT_NULL(node); 205 DCHECK_NOT_NULL(node);
206 return sequence()->IsReference(node->id()); 206 return sequence()->IsReference(sequence()->GetVirtualRegister(node));
207 } 207 }
208 208
209 209
210 void InstructionSelector::MarkAsReference(Node* node) { 210 void InstructionSelector::MarkAsReference(Node* node) {
211 DCHECK_NOT_NULL(node); 211 DCHECK_NOT_NULL(node);
212 DCHECK(!IsDouble(node)); 212 DCHECK(!IsDouble(node));
213 sequence()->MarkAsReference(node->id()); 213 sequence()->MarkAsReference(sequence()->GetVirtualRegister(node));
214 } 214 }
215 215
216 216
217 void InstructionSelector::MarkAsRepresentation(MachineType rep, Node* node) { 217 void InstructionSelector::MarkAsRepresentation(MachineType rep, Node* node) {
218 DCHECK_NOT_NULL(node); 218 DCHECK_NOT_NULL(node);
219 switch (RepresentationOf(rep)) { 219 switch (RepresentationOf(rep)) {
220 case kRepFloat32: 220 case kRepFloat32:
221 case kRepFloat64: 221 case kRepFloat64:
222 MarkAsDouble(node); 222 MarkAsDouble(node);
223 break; 223 break;
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 1117
1118 1118
1119 void InstructionSelector::VisitCall(Node* call, BasicBlock* continuation, 1119 void InstructionSelector::VisitCall(Node* call, BasicBlock* continuation,
1120 BasicBlock* deoptimization) {} 1120 BasicBlock* deoptimization) {}
1121 1121
1122 #endif // !V8_TURBOFAN_BACKEND 1122 #endif // !V8_TURBOFAN_BACKEND
1123 1123
1124 } // namespace compiler 1124 } // namespace compiler
1125 } // namespace internal 1125 } // namespace internal
1126 } // namespace v8 1126 } // namespace v8
OLDNEW
« 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