Commit 475d47d7 authored by Manos Koukoutos's avatar Manos Koukoutos Committed by Commit Bot

[wasm][bug] Use correct maximum size for loop unrolling

Bug: v8:11298
Change-Id: I064cfda6744f01099f70aab37cfd620afaff1262
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2726505Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73102}
parent 19e796cc
......@@ -28,6 +28,10 @@ V8_INLINE uint32_t unrolling_count_heuristic(uint32_t size, uint32_t depth) {
kMaximumUnrollingCount);
}
V8_INLINE uint32_t maximum_unrollable_size(uint32_t depth) {
return (depth + 1) * kMaximumUnnestedSize;
}
void UnrollLoop(Node* loop_node, ZoneUnorderedSet<Node*>* loop, uint32_t depth,
Graph* graph, CommonOperatorBuilder* common, Zone* tmp_zone,
SourcePositionTable* source_positions,
......
......@@ -1788,8 +1788,7 @@ struct WasmLoopUnrollingPhase {
loop_info.header, temp_zone,
// Only discover the loop until its size is the maximum unrolled
// size for its depth.
unrolling_count_heuristic(kMaximumUnnestedSize,
loop_info.nesting_depth));
maximum_unrollable_size(loop_info.nesting_depth));
UnrollLoop(loop_info.header, loop, loop_info.nesting_depth,
data->graph(), data->common(), temp_zone,
data->source_positions(), data->node_origins());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment