From cac31ad4c43a24a959a4d3652b8b46538bdc8c53 Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Mon, 6 Nov 2017 20:01:17 -0800 Subject: ART: Add compiler option for code deduplication Add --deduplicate-code and --no-deduplicate-code to ease in experiments with deduplication, e.g., profiling. Add dex2oat test. Test: m test-art-host Change-Id: Ib6c7fe082f43c5f76c8463cc563e2503c9a50480 --- compiler/driver/compiler_options_map-inl.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'compiler/driver/compiler_options_map-inl.h') diff --git a/compiler/driver/compiler_options_map-inl.h b/compiler/driver/compiler_options_map-inl.h index 772d1b44de..e28d49974a 100644 --- a/compiler/driver/compiler_options_map-inl.h +++ b/compiler/driver/compiler_options_map-inl.h @@ -76,6 +76,7 @@ inline bool ReadCompilerOptions(Base& map, CompilerOptions* options, std::string } } map.AssignIfExists(Base::VerboseMethods, &options->verbose_methods_); + options->deduplicate_code_ = map.GetOrDefault(Base::DeduplicateCode); return true; } @@ -123,6 +124,11 @@ inline void AddCompilerOptionsArgumentParserOptions(Builder& b) { .WithValues({true, false}) .IntoKey(Map::GenerateBuildID) + .Define({"--deduplicate-code=_"}) + .template WithType() + .WithValueMap({{"false", false}, {"true", true}}) + .IntoKey(Map::DeduplicateCode) + .Define("--debuggable") .IntoKey(Map::Debuggable) -- cgit v1.2.3-59-g8ed1b