Make dex2oat support profiles passed to non profile filters

Using a non profile filter with an input profile should compile
everything but generate an app image and optimize layout based on
the profile.

Change UseProfileGuidedCompilation to use the profile arguments.
Using profile arguments instead of being based on the compiler
filter lets us do full speed compile and layout based on profile.

Fix ShouldCompileBasedOnProfile to use the compiler filter instead
of the existence of a profile.

Fixed gtests.

Test: test-art-host

Bug: 34927277

Change-Id: I325a10d2072ed427bb32f96e4efa54cf81e94ad3
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc
index 26c0818..b6d1fef 100644
--- a/compiler/driver/compiler_driver.cc
+++ b/compiler/driver/compiler_driver.cc
@@ -1050,9 +1050,9 @@
 }
 
 bool CompilerDriver::ShouldCompileBasedOnProfile(const MethodReference& method_ref) const {
-  if (profile_compilation_info_ == nullptr) {
-    // If we miss profile information it means that we don't do a profile guided compilation.
-    // Return true, and let the other filters decide if the method should be compiled.
+  if (!CompilerFilter::DependsOnProfile(compiler_options_->GetCompilerFilter())) {
+    // Use the compiler filter instead of the presence of profile_compilation_info_ since
+    // we may want to have full speed compilation along with profile based layout optimizations.
     return true;
   }
   bool result = profile_compilation_info_->ContainsMethod(method_ref);