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

Unified Diff: src/compiler/scheduler.cc

Issue 726953002: Fix loop information computation for floating loops. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 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 | test/cctest/compiler/test-scheduler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/scheduler.cc
diff --git a/src/compiler/scheduler.cc b/src/compiler/scheduler.cc
index 88caf988e90494ab3a6011f6511fb52163602dcd..8c169368e54d5e8883e6184d542d7b02e5a34c18 100644
--- a/src/compiler/scheduler.cc
+++ b/src/compiler/scheduler.cc
@@ -763,7 +763,7 @@ class SpecialRPONumberer : public ZoneObject {
static_cast<int>(frame->index - block->SuccessorCount());
LoopInfo* info = &loops_[GetLoopNumber(block)];
DCHECK(loop != info);
- if (info->outgoing != NULL &&
+ if (block != entry && info->outgoing != NULL &&
outgoing_index < info->outgoing->length()) {
succ = info->outgoing->at(outgoing_index);
frame->index++;
@@ -871,6 +871,15 @@ class SpecialRPONumberer : public ZoneObject {
// Computes loop membership from the backedges of the control flow graph.
void ComputeLoopInfo(ZoneVector<SpecialRPOStackFrame>& queue,
size_t num_loops, ZoneList<Backedge>* backedges) {
+ // Extend existing loop membership vectors.
+ for (LoopInfo& loop : loops_) {
+ BitVector* new_members = new (zone_)
+ BitVector(static_cast<int>(schedule_->BasicBlockCount()), zone_);
+ new_members->CopyFrom(*loop.members);
+ loop.members = new_members;
+ }
+
+ // Extend loop information vector.
loops_.resize(num_loops, LoopInfo());
// Compute loop membership starting from backedges.
« no previous file with comments | « no previous file | test/cctest/compiler/test-scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698