Reviewers: Jarin, Benedikt Meurer,
Description:
[turbofan] Include individual deferred block ranges in splintering.
While we may have consecutive deferred blocks, they may be entered
from other blocks that are not predecessors of the first block. Same
for the last block and exiting. So the total set of live ranges within
the given set of blocks is the union of the individual in and out live
sets.
This is a performance bug, not a functional bug.
BUG=
Please review this at https://codereview.chromium.org/1322703003/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+10, -3 lines):
M src/compiler/live-range-separator.cc
Index: src/compiler/live-range-separator.cc
diff --git a/src/compiler/live-range-separator.cc
b/src/compiler/live-range-separator.cc
index
a80259535a955a2c1cc0323cb84a8ae26808dca1..152cde0553847ab869ffc0a4fa9b7dc581e06d7e
100644
--- a/src/compiler/live-range-separator.cc
+++ b/src/compiler/live-range-separator.cc
@@ -113,8 +113,17 @@ void
SplinterRangesInDeferredBlocks(RegisterAllocationData *data) {
static_cast<int>(code->instructions().size()));
const BitVector *in_set = in_sets[block->rpo_number().ToInt()];
+ BitVector ranges_to_splinter(*in_set, zone);
InstructionBlock *last = code->InstructionBlockAt(last_deferred);
- const BitVector *out_set = LiveRangeBuilder::ComputeLiveOut(last,
data);
+ for (int deferred_id = block->rpo_number().ToInt();
+ deferred_id <= last->rpo_number().ToInt(); ++deferred_id) {
+ const BitVector *ins = in_sets[deferred_id];
+ ranges_to_splinter.Union(*ins);
+ const BitVector *outs = LiveRangeBuilder::ComputeLiveOut(
+ code->InstructionBlockAt(RpoNumber::FromInt(deferred_id)), data);
+ ranges_to_splinter.Union(*outs);
+ }
+
int last_index = last->last_instruction_index();
if (code->InstructionAt(last_index)->opcode() ==
ArchOpcode::kArchDeoptimize) {
@@ -122,8 +131,6 @@ void
SplinterRangesInDeferredBlocks(RegisterAllocationData *data) {
}
last_cut = LifetimePosition::GapFromInstructionIndex(last_index);
- BitVector ranges_to_splinter(*in_set, zone);
- ranges_to_splinter.Union(*out_set);
BitVector::Iterator iterator(&ranges_to_splinter);
while (!iterator.Done()) {
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.