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

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

Issue 1098863003: Import Reversed adapter from Chromium and use it in v8. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed feedback. Rebased. 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 unified diff | Download patch
« no previous file with comments | « src/compiler/register-allocator.cc ('k') | src/compiler/x64/instruction-selector-x64.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 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/scheduler.h" 5 #include "src/compiler/scheduler.h"
6 6
7 #include <iomanip> 7 #include <iomanip>
8 8
9 #include "src/base/adapters.h"
9 #include "src/bit-vector.h" 10 #include "src/bit-vector.h"
10 #include "src/compiler/common-operator.h" 11 #include "src/compiler/common-operator.h"
11 #include "src/compiler/control-equivalence.h" 12 #include "src/compiler/control-equivalence.h"
12 #include "src/compiler/graph.h" 13 #include "src/compiler/graph.h"
13 #include "src/compiler/node.h" 14 #include "src/compiler/node.h"
14 #include "src/compiler/node-marker.h" 15 #include "src/compiler/node-marker.h"
15 #include "src/compiler/node-properties.h" 16 #include "src/compiler/node-properties.h"
16 #include "src/zone-containers.h" 17 #include "src/zone-containers.h"
17 18
18 namespace v8 { 19 namespace v8 {
(...skipping 1596 matching lines...) Expand 10 before | Expand all | Expand 10 after
1615 1616
1616 // Serialize the assembly order and reverse-post-order numbering. 1617 // Serialize the assembly order and reverse-post-order numbering.
1617 special_rpo_->SerializeRPOIntoSchedule(); 1618 special_rpo_->SerializeRPOIntoSchedule();
1618 special_rpo_->PrintAndVerifySpecialRPO(); 1619 special_rpo_->PrintAndVerifySpecialRPO();
1619 1620
1620 // Add collected nodes for basic blocks to their blocks in the right order. 1621 // Add collected nodes for basic blocks to their blocks in the right order.
1621 int block_num = 0; 1622 int block_num = 0;
1622 for (NodeVector& nodes : scheduled_nodes_) { 1623 for (NodeVector& nodes : scheduled_nodes_) {
1623 BasicBlock::Id id = BasicBlock::Id::FromInt(block_num++); 1624 BasicBlock::Id id = BasicBlock::Id::FromInt(block_num++);
1624 BasicBlock* block = schedule_->GetBlockById(id); 1625 BasicBlock* block = schedule_->GetBlockById(id);
1625 for (auto i = nodes.rbegin(); i != nodes.rend(); ++i) { 1626 for (Node* node : base::Reversed(nodes)) {
1626 schedule_->AddNode(block, *i); 1627 schedule_->AddNode(block, node);
1627 } 1628 }
1628 } 1629 }
1629 } 1630 }
1630 1631
1631 1632
1632 // ----------------------------------------------------------------------------- 1633 // -----------------------------------------------------------------------------
1633 1634
1634 1635
1635 void Scheduler::FuseFloatingControl(BasicBlock* block, Node* node) { 1636 void Scheduler::FuseFloatingControl(BasicBlock* block, Node* node) {
1636 TRACE("--- FUSE FLOATING CONTROL ----------------------------------\n"); 1637 TRACE("--- FUSE FLOATING CONTROL ----------------------------------\n");
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
1690 for (Node* const node : *nodes) { 1691 for (Node* const node : *nodes) {
1691 schedule_->SetBlockForNode(to, node); 1692 schedule_->SetBlockForNode(to, node);
1692 scheduled_nodes_[to->id().ToSize()].push_back(node); 1693 scheduled_nodes_[to->id().ToSize()].push_back(node);
1693 } 1694 }
1694 nodes->clear(); 1695 nodes->clear();
1695 } 1696 }
1696 1697
1697 } // namespace compiler 1698 } // namespace compiler
1698 } // namespace internal 1699 } // namespace internal
1699 } // namespace v8 1700 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/register-allocator.cc ('k') | src/compiler/x64/instruction-selector-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698