[ptr-compr][CSA] Enabling the DecompressionElimination AdvancedReducer

Also adding a pair of valid compress/decompress that was missing.

Cq-Include-Trybots: luci.v8.try:v8_linux64_pointer_compression_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_linux64_arm64_pointer_compression_rel_ng
Bug: v8:8977, v8:7703, chromium:963759
Change-Id: I668c26e636996e1c7621a23743df33b73e18ae89
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624787
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61816}
This commit is contained in:
Santiago Aboy Solanes 2019-05-22 14:37:00 +01:00 committed by Commit Bot
parent 8e71afad97
commit 35b611e017
2 changed files with 7 additions and 1 deletions

View File

@ -35,7 +35,8 @@ bool DecompressionElimination::IsValidDecompress(
return IrOpcode::IsDecompressOpcode(decompressOpcode); return IrOpcode::IsDecompressOpcode(decompressOpcode);
case IrOpcode::kChangeTaggedSignedToCompressedSigned: case IrOpcode::kChangeTaggedSignedToCompressedSigned:
return decompressOpcode == return decompressOpcode ==
IrOpcode::kChangeCompressedSignedToTaggedSigned; IrOpcode::kChangeCompressedSignedToTaggedSigned ||
decompressOpcode == IrOpcode::kChangeCompressedToTagged;
case IrOpcode::kChangeTaggedPointerToCompressedPointer: case IrOpcode::kChangeTaggedPointerToCompressedPointer:
return decompressOpcode == return decompressOpcode ==
IrOpcode::kChangeCompressedPointerToTaggedPointer || IrOpcode::kChangeCompressedPointerToTaggedPointer ||

View File

@ -1593,6 +1593,11 @@ struct CsaOptimizationPhase {
CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), CommonOperatorReducer common_reducer(&graph_reducer, data->graph(),
data->broker(), data->common(), data->broker(), data->common(),
data->machine(), temp_zone); data->machine(), temp_zone);
#ifdef V8_COMPRESS_POINTERS
DecompressionElimination decompression_elimination(
&graph_reducer, data->graph(), data->machine(), data->common());
AddReducer(data, &graph_reducer, &decompression_elimination);
#endif
AddReducer(data, &graph_reducer, &branch_condition_elimination); AddReducer(data, &graph_reducer, &branch_condition_elimination);
AddReducer(data, &graph_reducer, &dead_code_elimination); AddReducer(data, &graph_reducer, &dead_code_elimination);
AddReducer(data, &graph_reducer, &machine_reducer); AddReducer(data, &graph_reducer, &machine_reducer);