diff options
author | 2024-10-29 11:00:42 +0000 | |
---|---|---|
committer | 2024-10-30 10:07:41 +0000 | |
commit | cbf82dafb9bfe0543a64a4a471765069516e9456 (patch) | |
tree | 46d9b25f06c986e2f77a3d95401b2490d8a3110a /compiler/optimizing/optimizing_compiler.cc | |
parent | 33499d1f02d048392e6320dbbe4c86ab1ad48216 (diff) |
Run RTP after GVN to remove more NullCheck instructions
After GVN, we deduplicate instructions and we might have more
information regarding the nullability of the SSA variable. We can
run RTP to insert the BoundType instructions, which will later be
used by InstructionSimplifier to remove the NullCheck. RTP will be
run conditionally, only if GVN did at least one replacement.
It improves ~0.1% of odex size for speed compiled apps.
Bug: 369206455
Test: art/test/testrunner/testrunner.py --host --64 -b --optimizing
Change-Id: I0a4a104690b3fe9ac4118642ab9e9916dc30a9c5
Diffstat (limited to 'compiler/optimizing/optimizing_compiler.cc')
-rw-r--r-- | compiler/optimizing/optimizing_compiler.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc index 89edbed54d..b15657355f 100644 --- a/compiler/optimizing/optimizing_compiler.cc +++ b/compiler/optimizing/optimizing_compiler.cc @@ -665,6 +665,9 @@ void OptimizingCompiler::RunOptimizations(HGraph* graph, OptDef(OptimizationPass::kSideEffectsAnalysis, "side_effects$before_gvn"), OptDef(OptimizationPass::kGlobalValueNumbering), + OptDef(OptimizationPass::kReferenceTypePropagation, + "reference_type_propagation$after_gvn", + OptimizationPass::kGlobalValueNumbering), // Simplification (TODO: only if GVN occurred). OptDef(OptimizationPass::kSelectGenerator), OptDef(OptimizationPass::kConstantFolding, |