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

Unified Diff: src/compiler/live-range-separator.cc

Issue 1323473003: [turbofan] Splintering: special case deoptimizing blocks (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/live-range-separator.cc
diff --git a/src/compiler/live-range-separator.cc b/src/compiler/live-range-separator.cc
index 52f0b8cf442b7c87e184b66e7be5d2b814ac1b9a..a80259535a955a2c1cc0323cb84a8ae26808dca1 100644
--- a/src/compiler/live-range-separator.cc
+++ b/src/compiler/live-range-separator.cc
@@ -53,19 +53,6 @@ void AssociateDeferredBlockSequences(InstructionSequence *code) {
}
-// If the live range has a liveness hole right between start and end,
-// we don't need to splinter it.
-bool IsIntervalAlreadyExcluded(const LiveRange *range, LifetimePosition start,
- LifetimePosition end) {
- for (UseInterval *interval = range->first_interval(); interval != nullptr;
- interval = interval->next()) {
- if (interval->start() <= start && start < interval->end()) return false;
- if (interval->start() < end && end <= interval->end()) return false;
- }
- return true;
-}
-
-
void CreateSplinter(TopLevelLiveRange *range, RegisterAllocationData *data,
LifetimePosition first_cut, LifetimePosition last_cut) {
DCHECK(!range->IsSplinter());
@@ -82,8 +69,6 @@ void CreateSplinter(TopLevelLiveRange *range, RegisterAllocationData *data,
LifetimePosition start = Max(first_cut, range->Start());
LifetimePosition end = Min(last_cut, range->End());
- // Skip ranges that have a hole where the deferred block(s) are.
- if (IsIntervalAlreadyExcluded(range, start, end)) return;
if (start < end) {
// Ensure the original range has a spill range associated, before it gets
@@ -130,8 +115,12 @@ void SplinterRangesInDeferredBlocks(RegisterAllocationData *data) {
const BitVector *in_set = in_sets[block->rpo_number().ToInt()];
InstructionBlock *last = code->InstructionBlockAt(last_deferred);
const BitVector *out_set = LiveRangeBuilder::ComputeLiveOut(last, data);
- last_cut = LifetimePosition::GapFromInstructionIndex(
- last->last_instruction_index());
+ int last_index = last->last_instruction_index();
+ if (code->InstructionAt(last_index)->opcode() ==
+ ArchOpcode::kArchDeoptimize) {
+ ++last_index;
+ }
+ last_cut = LifetimePosition::GapFromInstructionIndex(last_index);
BitVector ranges_to_splinter(*in_set, zone);
ranges_to_splinter.Union(*out_set);
« 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