diff options
author | Serban Constantinescu <serban.constantinescu@arm.com> | 2015-03-28 18:09:56 +0000 |
---|---|---|
committer | Serban Constantinescu <serban.constantinescu@arm.com> | 2015-04-02 17:27:02 +0100 |
commit | 760d8efd535764e54500bf65a944ed3f2a54c123 (patch) | |
tree | 70038c0f55dc41f833b24f6528daedddf0f72e34 /runtime/arch | |
parent | fc67542a93be3381f9c6cf226a6c5a6f30ed6e82 (diff) | |
download | art-760d8efd535764e54500bf65a944ed3f2a54c123.tar.gz art-760d8efd535764e54500bf65a944ed3f2a54c123.tar.bz2 art-760d8efd535764e54500bf65a944ed3f2a54c123.zip |
Opt Compiler: ARM64 goodness
This patch:
* Switches on PreferAcquireRelease() (used to decide if load/store
volatile should use acquire release-semantics or explicit memory
barriers). Note that for ARMv8 CPUs we should always prefer this
(as proved by synthetic benchmarks on A53, A57 and Denver).
* Enables the use of constants for HBoundsCheck
Change-Id: I42524451772c05a1c74af73e97a59a95f49ba6d4
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
Diffstat (limited to 'runtime/arch')
-rw-r--r-- | runtime/arch/arm64/instruction_set_features_arm64.h | 11 | ||||
-rw-r--r-- | runtime/arch/arm64/instruction_set_features_arm64_test.cc | 2 |
2 files changed, 6 insertions, 7 deletions
diff --git a/runtime/arch/arm64/instruction_set_features_arm64.h b/runtime/arch/arm64/instruction_set_features_arm64.h index 3b3e2c95fe..e59ff58954 100644 --- a/runtime/arch/arm64/instruction_set_features_arm64.h +++ b/runtime/arch/arm64/instruction_set_features_arm64.h @@ -66,13 +66,12 @@ class Arm64InstructionSetFeatures FINAL : public InstructionSetFeatures { return fix_cortex_a53_843419_; } - // TODO: Tune this on a per CPU basis. For now, we pessimistically assume - // that all ARM64 CPUs prefer explicit memory barriers over acquire-release. - // - // NOTE: This should not be the case! However we want to exercise the - // explicit memory barriers code paths in the Optimizing Compiler. + // NOTE: This flag can be tunned on a CPU basis. In general all ARMv8 CPUs + // should prefer the Acquire-Release semantics over the explicit DMBs when + // handling load/store-volatile. For a specific use case see the ARM64 + // Optimizing backend. bool PreferAcquireRelease() const { - return false; + return true; } virtual ~Arm64InstructionSetFeatures() {} diff --git a/runtime/arch/arm64/instruction_set_features_arm64_test.cc b/runtime/arch/arm64/instruction_set_features_arm64_test.cc index 753107baa8..599f24ed30 100644 --- a/runtime/arch/arm64/instruction_set_features_arm64_test.cc +++ b/runtime/arch/arm64/instruction_set_features_arm64_test.cc @@ -31,7 +31,7 @@ TEST(Arm64InstructionSetFeaturesTest, Arm64Features) { EXPECT_STREQ("smp,a53", arm64_features->GetFeatureString().c_str()); EXPECT_EQ(arm64_features->AsBitmap(), 3U); // See the comments in instruction_set_features_arm64.h. - EXPECT_FALSE(arm64_features->AsArm64InstructionSetFeatures()->PreferAcquireRelease()); + EXPECT_TRUE(arm64_features->AsArm64InstructionSetFeatures()->PreferAcquireRelease()); } } // namespace art |