From 089c5fc39d68b5670e20733f13a0bb472c71e27f Mon Sep 17 00:00:00 2001 From: Santiago Aboy Solanes Date: Fri, 2 Feb 2024 09:21:03 +0000 Subject: CompilerOptions refactor after aosp/2808063 * Updated comments * Made constants constexpr * Renamed kBaselineMaxCodeUnits to include "Inline" Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b Change-Id: I37569b3d9e5eecfd65a505a79945bbe5b290fbbf --- compiler/driver/compiler_options.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'compiler/driver/compiler_options.h') diff --git a/compiler/driver/compiler_options.h b/compiler/driver/compiler_options.h index f659b12959..eaf9cc2fdb 100644 --- a/compiler/driver/compiler_options.h +++ b/compiler/driver/compiler_options.h @@ -60,14 +60,16 @@ enum class ProfileMethodsCheck : uint8_t { class CompilerOptions final { public: - // Guide heuristics to determine whether to compile method if profile data not available. - static const size_t kDefaultHugeMethodThreshold = 10000; - static const bool kDefaultGenerateDebugInfo = false; - static const bool kDefaultGenerateMiniDebugInfo = true; - static const size_t kDefaultInlineMaxCodeUnits = 32; - // We set a lower inlining threshold for baseline to reduce code size and compilation time. - static const size_t kBaselineMaxCodeUnits = 8; + // Default values for parameters set via flags. + static constexpr bool kDefaultGenerateDebugInfo = false; + static constexpr bool kDefaultGenerateMiniDebugInfo = true; + static constexpr size_t kDefaultHugeMethodThreshold = 10000; + static constexpr size_t kDefaultInlineMaxCodeUnits = 32; + // Token to represent no value set for `inline_max_code_units_`. static constexpr size_t kUnsetInlineMaxCodeUnits = -1; + // We set a lower inlining threshold for baseline to reduce code size and compilation time. This + // cannot be changed via flags. + static constexpr size_t kBaselineInlineMaxCodeUnits = 8; enum class CompilerType : uint8_t { kAotCompiler, // AOT compiler. -- cgit v1.2.3-59-g8ed1b