diff options
author | 2023-05-16 10:32:54 +0000 | |
---|---|---|
committer | 2023-05-22 10:36:39 +0000 | |
commit | 78f3c72e8948087352788997a70854dee613352c (patch) | |
tree | 306db3c15bc4b7af149bcf3e07be533e50679b88 /compiler/optimizing/loop_analysis.h | |
parent | dc771261232c2ff702373f396a5a7fe586e2f0a6 (diff) |
Use C++17's [[maybe_unused]] attribute in ART
Bug: 169680875
Test: mmm art
Change-Id: Ic0cc320891c42b07a2b5520a584d2b62052e7235
Diffstat (limited to 'compiler/optimizing/loop_analysis.h')
-rw-r--r-- | compiler/optimizing/loop_analysis.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/compiler/optimizing/loop_analysis.h b/compiler/optimizing/loop_analysis.h index cec00fecf4..cd8f00588d 100644 --- a/compiler/optimizing/loop_analysis.h +++ b/compiler/optimizing/loop_analysis.h @@ -148,13 +148,15 @@ class ArchNoOptsLoopHelper : public ArenaObject<kArenaAllocOptimization> { // // Returns 'true' by default, should be overridden by particular target loop helper. virtual bool IsLoopNonBeneficialForScalarOpts( - LoopAnalysisInfo* loop_analysis_info ATTRIBUTE_UNUSED) const { return true; } + [[maybe_unused]] LoopAnalysisInfo* loop_analysis_info) const { + return true; + } // Returns optimal scalar unrolling factor for the loop. // // Returns kNoUnrollingFactor by default, should be overridden by particular target loop helper. virtual uint32_t GetScalarUnrollingFactor( - const LoopAnalysisInfo* analysis_info ATTRIBUTE_UNUSED) const { + [[maybe_unused]] const LoopAnalysisInfo* analysis_info) const { return LoopAnalysisInfo::kNoUnrollingFactor; } @@ -166,17 +168,17 @@ class ArchNoOptsLoopHelper : public ArenaObject<kArenaAllocOptimization> { // Returns whether it is beneficial to fully unroll the loop. // // Returns 'false' by default, should be overridden by particular target loop helper. - virtual bool IsFullUnrollingBeneficial(LoopAnalysisInfo* analysis_info ATTRIBUTE_UNUSED) const { + virtual bool IsFullUnrollingBeneficial([[maybe_unused]] LoopAnalysisInfo* analysis_info) const { return false; } // Returns optimal SIMD unrolling factor for the loop. // // Returns kNoUnrollingFactor by default, should be overridden by particular target loop helper. - virtual uint32_t GetSIMDUnrollingFactor(HBasicBlock* block ATTRIBUTE_UNUSED, - int64_t trip_count ATTRIBUTE_UNUSED, - uint32_t max_peel ATTRIBUTE_UNUSED, - uint32_t vector_length ATTRIBUTE_UNUSED) const { + virtual uint32_t GetSIMDUnrollingFactor([[maybe_unused]] HBasicBlock* block, + [[maybe_unused]] int64_t trip_count, + [[maybe_unused]] uint32_t max_peel, + [[maybe_unused]] uint32_t vector_length) const { return LoopAnalysisInfo::kNoUnrollingFactor; } |