diff options
author | 2023-01-03 16:20:50 +0000 | |
---|---|---|
committer | 2023-01-04 16:00:48 +0000 | |
commit | d4229601e0fb46b0a013b52370aeda3887aea8e9 (patch) | |
tree | b11bf51ee8d9554bbad440ea4157c81e4eb860e7 /compiler/optimizing/optimization.h | |
parent | 5497f749b4d35c7b0767d21cb487e2fee293cd07 (diff) |
Add a write barrier elimination pass
We can eliminate redundant write barriers as we don't need several
for the same receiver. For example:
```
MyObject o;
o.inner_obj = io;
o.inner_obj2 = io2;
o.inner_obj3 = io3;
```
We can keep the write barrier for `inner_obj` and remove the other
two.
Note that we cannot perform this optimization across
invokes, suspend check, or instructions that can throw.
Local improvements (pixel 5, speed compile):
* System server: -280KB (-0.56%)
* SystemUIGoogle: -330KB (-1.16%)
* AGSA: -3876KB (-1.19%)
Bug: 260843353
Fixes: 260843353
Change-Id: Ibf98efbe891ee00e46125853c3e97ae30aa3ff30
Diffstat (limited to 'compiler/optimizing/optimization.h')
-rw-r--r-- | compiler/optimizing/optimization.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/optimizing/optimization.h b/compiler/optimizing/optimization.h index 76960bf314..c3ba17563e 100644 --- a/compiler/optimizing/optimization.h +++ b/compiler/optimizing/optimization.h @@ -84,6 +84,7 @@ enum class OptimizationPass { kScheduling, kSelectGenerator, kSideEffectsAnalysis, + kWriteBarrierElimination, #ifdef ART_ENABLE_CODEGEN_arm kInstructionSimplifierArm, kCriticalNativeAbiFixupArm, |