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

Side by Side Diff: src/compiler/live-range-separator.cc

Issue 1322703003: [turbofan] Include individual deferred block ranges in splintering. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/live-range-separator.h" 5 #include "src/compiler/live-range-separator.h"
6 #include "src/compiler/register-allocator.h" 6 #include "src/compiler/register-allocator.h"
7 7
8 namespace v8 { 8 namespace v8 {
9 namespace internal { 9 namespace internal {
10 namespace compiler { 10 namespace compiler {
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 // last_deferred + 1 is not deferred, so no point in visiting it. 106 // last_deferred + 1 is not deferred, so no point in visiting it.
107 i = last_deferred.ToInt() + 1; 107 i = last_deferred.ToInt() + 1;
108 108
109 LifetimePosition first_cut = LifetimePosition::GapFromInstructionIndex( 109 LifetimePosition first_cut = LifetimePosition::GapFromInstructionIndex(
110 block->first_instruction_index()); 110 block->first_instruction_index());
111 111
112 LifetimePosition last_cut = LifetimePosition::GapFromInstructionIndex( 112 LifetimePosition last_cut = LifetimePosition::GapFromInstructionIndex(
113 static_cast<int>(code->instructions().size())); 113 static_cast<int>(code->instructions().size()));
114 114
115 const BitVector *in_set = in_sets[block->rpo_number().ToInt()]; 115 const BitVector *in_set = in_sets[block->rpo_number().ToInt()];
116 BitVector ranges_to_splinter(*in_set, zone);
116 InstructionBlock *last = code->InstructionBlockAt(last_deferred); 117 InstructionBlock *last = code->InstructionBlockAt(last_deferred);
117 const BitVector *out_set = LiveRangeBuilder::ComputeLiveOut(last, data); 118 for (int deferred_id = block->rpo_number().ToInt();
119 deferred_id <= last->rpo_number().ToInt(); ++deferred_id) {
120 const BitVector *ins = in_sets[deferred_id];
121 ranges_to_splinter.Union(*ins);
122 const BitVector *outs = LiveRangeBuilder::ComputeLiveOut(
123 code->InstructionBlockAt(RpoNumber::FromInt(deferred_id)), data);
124 ranges_to_splinter.Union(*outs);
125 }
126
118 int last_index = last->last_instruction_index(); 127 int last_index = last->last_instruction_index();
119 if (code->InstructionAt(last_index)->opcode() == 128 if (code->InstructionAt(last_index)->opcode() ==
120 ArchOpcode::kArchDeoptimize) { 129 ArchOpcode::kArchDeoptimize) {
121 ++last_index; 130 ++last_index;
122 } 131 }
123 last_cut = LifetimePosition::GapFromInstructionIndex(last_index); 132 last_cut = LifetimePosition::GapFromInstructionIndex(last_index);
124 133
125 BitVector ranges_to_splinter(*in_set, zone);
126 ranges_to_splinter.Union(*out_set);
127 BitVector::Iterator iterator(&ranges_to_splinter); 134 BitVector::Iterator iterator(&ranges_to_splinter);
128 135
129 while (!iterator.Done()) { 136 while (!iterator.Done()) {
130 int range_id = iterator.Current(); 137 int range_id = iterator.Current();
131 iterator.Advance(); 138 iterator.Advance();
132 139
133 TopLevelLiveRange *range = data->live_ranges()[range_id]; 140 TopLevelLiveRange *range = data->live_ranges()[range_id];
134 CreateSplinter(range, data, first_cut, last_cut); 141 CreateSplinter(range, data, first_cut, last_cut);
135 } 142 }
136 } 143 }
(...skipping 17 matching lines...) Expand all
154 TopLevelLiveRange *splinter_parent = range->splintered_from(); 161 TopLevelLiveRange *splinter_parent = range->splintered_from();
155 162
156 splinter_parent->Merge(range, data()); 163 splinter_parent->Merge(range, data());
157 } 164 }
158 } 165 }
159 166
160 167
161 } // namespace compiler 168 } // namespace compiler
162 } // namespace internal 169 } // namespace internal
163 } // namespace v8 170 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698