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

Side by Side Diff: src/compiler/node.cc

Issue 2620293004: [turbofan] Relax limitation for using BaseWithIndexAndDisplacement for load/stores (Closed)
Patch Set: Avoid changing simple addressing to complex addressing when the address has multiple uses Created 3 years, 10 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/node.h ('k') | src/compiler/node-matchers.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/node.h" 5 #include "src/compiler/node.h"
6 6
7 namespace v8 { 7 namespace v8 {
8 namespace internal { 8 namespace internal {
9 namespace compiler { 9 namespace compiler {
10 10
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 mask |= 1; 289 mask |= 1;
290 } else if (from == owner2) { 290 } else if (from == owner2) {
291 mask |= 2; 291 mask |= 2;
292 } else { 292 } else {
293 return false; 293 return false;
294 } 294 }
295 } 295 }
296 return mask == 3; 296 return mask == 3;
297 } 297 }
298 298
299 bool Node::OwnedByAddressingOperand() const {
300 for (Use* use = first_use_; use; use = use->next) {
301 Node* from = use->from();
302 if (from->opcode() != IrOpcode::kLoad &&
303 from->opcode() != IrOpcode::kStore &&
danno 2017/02/21 16:11:01 Careful here, don't you have to make sure that the
shiyu.zhang 2017/02/23 01:20:48 OwnedByAddressingOperand is only used by left oper
danno 2017/02/23 08:49:34 Well, this builds in a pretty explicit and fragile
304 from->opcode() != IrOpcode::kInt32Add &&
305 from->opcode() != IrOpcode::kInt64Add) {
306 return false;
307 }
308 }
309 return true;
310 }
299 311
300 void Node::Print() const { 312 void Node::Print() const {
301 OFStream os(stdout); 313 OFStream os(stdout);
302 os << *this << std::endl; 314 os << *this << std::endl;
303 for (Node* input : this->inputs()) { 315 for (Node* input : this->inputs()) {
304 os << " " << *input << std::endl; 316 os << " " << *input << std::endl;
305 } 317 }
306 } 318 }
307 319
308 std::ostream& operator<<(std::ostream& os, const Node& n) { 320 std::ostream& operator<<(std::ostream& os, const Node& n) {
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 ++(*this); 438 ++(*this);
427 return result; 439 return result;
428 } 440 }
429 441
430 442
431 bool Node::Uses::empty() const { return begin() == end(); } 443 bool Node::Uses::empty() const { return begin() == end(); }
432 444
433 } // namespace compiler 445 } // namespace compiler
434 } // namespace internal 446 } // namespace internal
435 } // namespace v8 447 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/node.h ('k') | src/compiler/node-matchers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698