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

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

Issue 1472803004: [turbofan] Simplified splintering code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler/pipeline.cc » ('j') | src/compiler/pipeline.cc » ('J')
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 6591d71e72b3f66a309452cb4d88ea2d2f2109bb..d7ef5ddbc2a2c1a720cb16b55d9c1c73f6ac2090 100644
--- a/src/compiler/live-range-separator.cc
+++ b/src/compiler/live-range-separator.cc
@@ -58,26 +58,6 @@ void CreateSplinter(TopLevelLiveRange *range, RegisterAllocationData *data,
}
-int FirstInstruction(const UseInterval *interval) {
- LifetimePosition start = interval->start();
- int ret = start.ToInstructionIndex();
- if (start.IsInstructionPosition() && start.IsEnd()) {
- ++ret;
- }
- return ret;
-}
-
-
-int LastInstruction(const UseInterval *interval) {
- LifetimePosition end = interval->end();
- int ret = end.ToInstructionIndex();
- if (end.IsGapPosition() || end.IsStart()) {
- --ret;
- }
- return ret;
-}
-
-
void SplinterLiveRange(TopLevelLiveRange *range, RegisterAllocationData *data) {
const InstructionSequence *code = data->code();
UseInterval *interval = range->first_interval();
@@ -88,9 +68,9 @@ void SplinterLiveRange(TopLevelLiveRange *range, RegisterAllocationData *data) {
while (interval != nullptr) {
UseInterval *next_interval = interval->next();
const InstructionBlock *first_block =
- code->GetInstructionBlock(FirstInstruction(interval));
+ code->GetInstructionBlock(interval->FirstInstructionIndex());
const InstructionBlock *last_block =
- code->GetInstructionBlock(LastInstruction(interval));
+ code->GetInstructionBlock(interval->LastInstructionIndex());
int first_block_nr = first_block->rpo_number().ToInt();
int last_block_nr = last_block->rpo_number().ToInt();
for (int block_id = first_block_nr; block_id <= last_block_nr; ++block_id) {
@@ -129,7 +109,10 @@ void LiveRangeSeparator::Splinter() {
if (range == nullptr || range->IsEmpty() || range->IsSplinter()) {
continue;
}
- SplinterLiveRange(range, data());
+ int first_instr = range->first_interval()->FirstInstructionIndex();
+ if (!data()->code()->GetInstructionBlock(first_instr)->IsDeferred()) {
+ SplinterLiveRange(range, data());
+ }
}
}
« no previous file with comments | « no previous file | src/compiler/pipeline.cc » ('j') | src/compiler/pipeline.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698