diff options
author | Roland Levillain <rpl@google.com> | 2017-01-13 11:47:39 +0000 |
---|---|---|
committer | Roland Levillain <rpl@google.com> | 2017-02-23 13:50:11 +0000 |
commit | 1372c9f40df1e47bf775f1466bbb96f472b6b9ed (patch) | |
tree | d00923d1045ab66c6aa07ed5a42a69899580d210 /compiler/optimizing/code_generator_arm.h | |
parent | 6cc0250f1d1507957fc2fe1543179eab5a8b53f9 (diff) |
Use the "GC is marking" information in compiler read barriers (ARM, ARM64).
In compiler-generated code, when deciding whether to mark
a heap reference or not in a read barrier, check whether
the GC is currently marking, instead of checking the gray
bit in the reference's holder's lock word.
This change is only for ARM and ARM64, as it does not
benefit x86 nor x86-64.
Test: Run ART tests in Baker read barrier configuration.
Test: Boot a device in Baker read barrier configuration.
Bug: 29516974
Change-Id: Ia5d90286bb9f753f3bbcb3a6254eb166523a2ff5
Diffstat (limited to 'compiler/optimizing/code_generator_arm.h')
-rw-r--r-- | compiler/optimizing/code_generator_arm.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/compiler/optimizing/code_generator_arm.h b/compiler/optimizing/code_generator_arm.h index df2dbc74ab..1f68777f88 100644 --- a/compiler/optimizing/code_generator_arm.h +++ b/compiler/optimizing/code_generator_arm.h @@ -520,9 +520,6 @@ class CodeGeneratorARM : public CodeGenerator { Location index, Location temp, bool needs_null_check); - // Factored implementation used by GenerateFieldLoadWithBakerReadBarrier - // and GenerateArrayLoadWithBakerReadBarrier. - // Factored implementation, used by GenerateFieldLoadWithBakerReadBarrier, // GenerateArrayLoadWithBakerReadBarrier and some intrinsics. // @@ -545,6 +542,15 @@ class CodeGeneratorARM : public CodeGenerator { bool always_update_field = false, Register* temp2 = nullptr); + // Generate a heap reference load (with no read barrier). + void GenerateRawReferenceLoad(HInstruction* instruction, + Location ref, + Register obj, + uint32_t offset, + Location index, + ScaleFactor scale_factor, + bool needs_null_check); + // Generate a read barrier for a heap reference within `instruction` // using a slow path. // |