Commit 280e7c8e authored by Santiago Aboy Solanes's avatar Santiago Aboy Solanes Committed by Commit Bot

[ptr-compr] Move decompression_elimination definition to not be out of scope

When using if, the decompression_elimination goes out of scope and we need
it alive. We were using #if guards before but it was changed in
https://chromium-review.googlesource.com/c/v8/v8/+/1815134 to use
FLAG_turbo_decompression_elimination as well.

It was breaking a clusterfuzz builder before this CL:
https://ci.chromium.org/p/v8/builders/ci/V8%20Clusterfuzz%20Linux64%20ASAN%20arm64%20-%20debug%20builder/11562

We can pull the variable out of the if, and then have an USE for the case that it
doesn't get added (i.e non pointer compression).

Bug: v8:7703
Change-Id: Ia0a9f50ebf2cbb41b60e3fd1110d7c7e7eca365d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1849528Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64211}
parent d0aed764
......@@ -1759,11 +1759,14 @@ struct LateOptimizationPhase {
data->broker(), data->common(),
data->machine(), temp_zone);
SelectLowering select_lowering(data->jsgraph(), temp_zone);
// TODO(v8:7703, solanes): go back to using #if guards once
// FLAG_turbo_decompression_elimination gets removed.
DecompressionElimination decompression_elimination(
&graph_reducer, data->graph(), data->machine(), data->common());
if (COMPRESS_POINTERS_BOOL && FLAG_turbo_decompression_elimination) {
DecompressionElimination decompression_elimination(
&graph_reducer, data->graph(), data->machine(), data->common());
AddReducer(data, &graph_reducer, &decompression_elimination);
}
USE(decompression_elimination);
AddReducer(data, &graph_reducer, &branch_condition_elimination);
AddReducer(data, &graph_reducer, &dead_code_elimination);
AddReducer(data, &graph_reducer, &machine_reducer);
......@@ -1848,11 +1851,14 @@ struct CsaOptimizationPhase {
CommonOperatorReducer common_reducer(&graph_reducer, data->graph(),
data->broker(), data->common(),
data->machine(), temp_zone);
// TODO(v8:7703, solanes): go back to using #if guards once
// FLAG_turbo_decompression_elimination gets removed.
DecompressionElimination decompression_elimination(
&graph_reducer, data->graph(), data->machine(), data->common());
if (COMPRESS_POINTERS_BOOL && FLAG_turbo_decompression_elimination) {
DecompressionElimination decompression_elimination(
&graph_reducer, data->graph(), data->machine(), data->common());
AddReducer(data, &graph_reducer, &decompression_elimination);
}
USE(decompression_elimination);
AddReducer(data, &graph_reducer, &branch_condition_elimination);
AddReducer(data, &graph_reducer, &dead_code_elimination);
AddReducer(data, &graph_reducer, &machine_reducer);
......
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