diff options
author | Roland Levillain <rpl@google.com> | 2018-08-24 16:58:47 +0100 |
---|---|---|
committer | Roland Levillain <rpl@google.com> | 2018-08-28 11:06:07 +0100 |
commit | bbc6e7edb5fca4a61ac53dd9bce79cb4f0bb3403 (patch) | |
tree | 0fbce767bc383358cf4cd65aafc74140e1850982 /compiler/optimizing/loop_analysis.cc | |
parent | 19379b58bd433da91230e4fe6cd96e7416d16adc (diff) |
Use 'final' and 'override' specifiers directly in ART.
Remove all uses of macros 'FINAL' and 'OVERRIDE' and replace them with
'final' and 'override' specifiers. Remove all definitions of these
macros as well, which were located in these files:
- libartbase/base/macros.h
- test/913-heaps/heaps.cc
- test/ti-agent/ti_macros.h
ART is now using C++14; the 'final' and 'override' specifiers have
been introduced in C++11.
Test: mmma art
Change-Id: I256c7758155a71a2940ef2574925a44076feeebf
Diffstat (limited to 'compiler/optimizing/loop_analysis.cc')
-rw-r--r-- | compiler/optimizing/loop_analysis.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/optimizing/loop_analysis.cc b/compiler/optimizing/loop_analysis.cc index d355cedb35..2ae3683ffa 100644 --- a/compiler/optimizing/loop_analysis.cc +++ b/compiler/optimizing/loop_analysis.cc @@ -87,14 +87,14 @@ class ArchDefaultLoopHelper : public ArchNoOptsLoopHelper { // Maximum number of instructions to be created as a result of full unrolling. static constexpr uint32_t kScalarHeuristicFullyUnrolledMaxInstrThreshold = 35; - bool IsLoopNonBeneficialForScalarOpts(LoopAnalysisInfo* analysis_info) const OVERRIDE { + bool IsLoopNonBeneficialForScalarOpts(LoopAnalysisInfo* analysis_info) const override { return analysis_info->HasLongTypeInstructions() || IsLoopTooBig(analysis_info, kScalarHeuristicMaxBodySizeInstr, kScalarHeuristicMaxBodySizeBlocks); } - uint32_t GetScalarUnrollingFactor(const LoopAnalysisInfo* analysis_info) const OVERRIDE { + uint32_t GetScalarUnrollingFactor(const LoopAnalysisInfo* analysis_info) const override { int64_t trip_count = analysis_info->GetTripCount(); // Unroll only loops with known trip count. if (trip_count == LoopAnalysisInfo::kUnknownTripCount) { @@ -108,9 +108,9 @@ class ArchDefaultLoopHelper : public ArchNoOptsLoopHelper { return desired_unrolling_factor; } - bool IsLoopPeelingEnabled() const OVERRIDE { return true; } + bool IsLoopPeelingEnabled() const override { return true; } - bool IsFullUnrollingBeneficial(LoopAnalysisInfo* analysis_info) const OVERRIDE { + bool IsFullUnrollingBeneficial(LoopAnalysisInfo* analysis_info) const override { int64_t trip_count = analysis_info->GetTripCount(); // We assume that trip count is known. DCHECK_NE(trip_count, LoopAnalysisInfo::kUnknownTripCount); @@ -144,7 +144,7 @@ class Arm64LoopHelper : public ArchDefaultLoopHelper { // Loop's maximum basic block count. Loops with higher count will not be peeled/unrolled. static constexpr uint32_t kArm64ScalarHeuristicMaxBodySizeBlocks = 8; - bool IsLoopNonBeneficialForScalarOpts(LoopAnalysisInfo* loop_analysis_info) const OVERRIDE { + bool IsLoopNonBeneficialForScalarOpts(LoopAnalysisInfo* loop_analysis_info) const override { return IsLoopTooBig(loop_analysis_info, kArm64ScalarHeuristicMaxBodySizeInstr, kArm64ScalarHeuristicMaxBodySizeBlocks); @@ -153,7 +153,7 @@ class Arm64LoopHelper : public ArchDefaultLoopHelper { uint32_t GetSIMDUnrollingFactor(HBasicBlock* block, int64_t trip_count, uint32_t max_peel, - uint32_t vector_length) const OVERRIDE { + uint32_t vector_length) const override { // Don't unroll with insufficient iterations. // TODO: Unroll loops with unknown trip count. DCHECK_NE(vector_length, 0u); |