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

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

Issue 2452403003: Changed statement ZoneList to a ZoneChunkList
Patch Set: Created 4 years, 1 month 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/live-range-separator.h ('k') | src/compiler/register-allocator.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/osr.h" 5 #include "src/compiler/osr.h"
6 #include "src/ast/scopes.h" 6 #include "src/ast/scopes.h"
7 #include "src/compilation-info.h" 7 #include "src/compilation-info.h"
8 #include "src/compiler/all-nodes.h" 8 #include "src/compiler/all-nodes.h"
9 #include "src/compiler/common-operator-reducer.h" 9 #include "src/compiler/common-operator-reducer.h"
10 #include "src/compiler/common-operator.h" 10 #include "src/compiler/common-operator.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 LoopTree::Loop* osr_loop, Node* osr_normal_entry, 56 LoopTree::Loop* osr_loop, Node* osr_normal_entry,
57 Node* osr_loop_entry) { 57 Node* osr_loop_entry) {
58 const size_t original_count = graph->NodeCount(); 58 const size_t original_count = graph->NodeCount();
59 AllNodes all(tmp_zone, graph); 59 AllNodes all(tmp_zone, graph);
60 NodeVector tmp_inputs(tmp_zone); 60 NodeVector tmp_inputs(tmp_zone);
61 Node* sentinel = graph->NewNode(dead->op()); 61 Node* sentinel = graph->NewNode(dead->op());
62 62
63 // Make a copy of the graph for each outer loop. 63 // Make a copy of the graph for each outer loop.
64 ZoneVector<NodeVector*> copies(tmp_zone); 64 ZoneVector<NodeVector*> copies(tmp_zone);
65 for (LoopTree::Loop* loop = osr_loop->parent(); loop; loop = loop->parent()) { 65 for (LoopTree::Loop* loop = osr_loop->parent(); loop; loop = loop->parent()) {
66 void* stuff = tmp_zone->New(sizeof(NodeVector));
67 NodeVector* mapping = 66 NodeVector* mapping =
68 new (stuff) NodeVector(original_count, sentinel, tmp_zone); 67 new (tmp_zone) NodeVector(original_count, sentinel, tmp_zone);
69 copies.push_back(mapping); 68 copies.push_back(mapping);
70 TRACE("OsrDuplication #%zu, depth %zu, header #%d:%s\n", copies.size(), 69 TRACE("OsrDuplication #%zu, depth %zu, header #%d:%s\n", copies.size(),
71 loop->depth(), loop_tree->HeaderNode(loop)->id(), 70 loop->depth(), loop_tree->HeaderNode(loop)->id(),
72 loop_tree->HeaderNode(loop)->op()->mnemonic()); 71 loop_tree->HeaderNode(loop)->op()->mnemonic());
73 72
74 // Prepare the mapping for OSR values and the OSR loop entry. 73 // Prepare the mapping for OSR values and the OSR loop entry.
75 mapping->at(osr_normal_entry->id()) = dead; 74 mapping->at(osr_normal_entry->id()) = dead;
76 mapping->at(osr_loop_entry->id()) = dead; 75 mapping->at(osr_loop_entry->id()) = dead;
77 76
78 // The outer loops are dead in this copy. 77 // The outer loops are dead in this copy.
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 375
377 void OsrHelper::SetupFrame(Frame* frame) { 376 void OsrHelper::SetupFrame(Frame* frame) {
378 // The optimized frame will subsume the unoptimized frame. Do so by reserving 377 // The optimized frame will subsume the unoptimized frame. Do so by reserving
379 // the first spill slots. 378 // the first spill slots.
380 frame->ReserveSpillSlots(UnoptimizedFrameSlots()); 379 frame->ReserveSpillSlots(UnoptimizedFrameSlots());
381 } 380 }
382 381
383 } // namespace compiler 382 } // namespace compiler
384 } // namespace internal 383 } // namespace internal
385 } // namespace v8 384 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/live-range-separator.h ('k') | src/compiler/register-allocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698