Merge layout-speed compiler filter into speed-profile.

Bug: 29921113
Test: mm test-art-host
Change-Id: I2a22cbec7172f05e61b5e6d3d5dfc09026f92ec3
diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc
index e8a92c1..19f0f1c 100644
--- a/dex2oat/dex2oat.cc
+++ b/dex2oat/dex2oat.cc
@@ -277,7 +277,6 @@
                 "|balanced"
                 "|speed-profile"
                 "|speed"
-                "|layout-profile"
                 "|everything-profile"
                 "|everything):");
   UsageError("      select compiler filter.");
@@ -1540,9 +1539,9 @@
         std::unique_ptr<MemMap> opened_dex_files_map;
         std::vector<std::unique_ptr<const DexFile>> opened_dex_files;
         // No need to verify the dex file for:
-        // 1) dexlayout, which already verified it
+        // 1) kSpeedProfile, since it includes dexlayout, which does the verification.
         // 2) when we have a vdex file, which means it was already verified.
-        bool verify = compiler_options_->GetCompilerFilter() != CompilerFilter::kLayoutProfile &&
+        bool verify = compiler_options_->GetCompilerFilter() != CompilerFilter::kSpeedProfile &&
             (input_vdex_file_ == nullptr);
         if (!oat_writers_[i]->WriteAndOpenDexFiles(
             kIsVdexEnabled ? vdex_files_[i].get() : oat_files_[i].get(),
@@ -2349,7 +2348,7 @@
                                                      compiler_options_.get(),
                                                      oat_file.get()));
       elf_writers_.back()->Start();
-      bool do_dexlayout = compiler_options_->GetCompilerFilter() == CompilerFilter::kLayoutProfile;
+      bool do_dexlayout = compiler_options_->GetCompilerFilter() == CompilerFilter::kSpeedProfile;
       oat_writers_.emplace_back(new OatWriter(
           IsBootImage(), timings_, do_dexlayout ? profile_compilation_info_.get() : nullptr));
     }
diff --git a/dex2oat/dex2oat_test.cc b/dex2oat/dex2oat_test.cc
index e86e560..8933dd0 100644
--- a/dex2oat/dex2oat_test.cc
+++ b/dex2oat/dex2oat_test.cc
@@ -591,7 +591,7 @@
     GenerateProfile(profile_location, dex_location, dex_file->GetLocationChecksum());
 
     const std::vector<std::string>& extra_args = { "--profile-file=" + profile_location };
-    GenerateOdexForTest(dex_location, odex_location, CompilerFilter::kLayoutProfile, extra_args);
+    GenerateOdexForTest(dex_location, odex_location, CompilerFilter::kSpeedProfile, extra_args);
 
     CheckValidity();
     ASSERT_TRUE(success_);
@@ -632,7 +632,7 @@
       EXPECT_EQ(old_class1, new_class0);
     }
 
-    EXPECT_EQ(odex_file->GetCompilerFilter(), CompilerFilter::kLayoutProfile);
+    EXPECT_EQ(odex_file->GetCompilerFilter(), CompilerFilter::kSpeedProfile);
   }
 
     // Check whether the dex2oat run was really successful.