[turbofan] Scheduler: Do not split nodes into loops
This is required for wasm loop peeling to not split immutable loads into every loop iteration. Bug: v8:7748 Change-Id: I05432812235475150a1ce8be1a6a6b5eaed08de7 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4013552 Commit-Queue: Matthias Liedtke <mliedtke@chromium.org> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/main@{#84190}
This commit is contained in:
parent
687272805e
commit
c80394dd3c
@ -1615,6 +1615,7 @@ class ScheduleLateNodeVisitor {
|
||||
if (!node->op()->HasProperty(Operator::kPure)) return block;
|
||||
// TODO(titzer): fix the special case of splitting of projections.
|
||||
if (node->opcode() == IrOpcode::kProjection) return block;
|
||||
// Wasm-gc uses LoadImmutable for things that we want deduplicated.
|
||||
|
||||
// The {block} is common dominator of all uses of {node}, so we cannot
|
||||
// split anything unless the {block} has at least two successors.
|
||||
@ -1647,10 +1648,12 @@ class ScheduleLateNodeVisitor {
|
||||
marking_queue_.pop_front();
|
||||
if (IsMarked(top_block)) continue;
|
||||
bool marked = true;
|
||||
for (BasicBlock* successor : top_block->successors()) {
|
||||
if (!IsMarked(successor)) {
|
||||
marked = false;
|
||||
break;
|
||||
if (top_block->loop_depth() == block->loop_depth()) {
|
||||
for (BasicBlock* successor : top_block->successors()) {
|
||||
if (!IsMarked(successor)) {
|
||||
marked = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (marked) MarkBlock(top_block);
|
||||
|
Loading…
Reference in New Issue
Block a user