ART: Include cleanup
Let clang-format reorder the header includes.
Derived with:
* .clang-format:
BasedOnStyle: Google
IncludeIsMainRegex: '(_test|-inl)?$'
* Steps:
find . -name '*.cc' -o -name '*.h' | xargs sed -i.bak -e 's/^#include/ #include/' ; git commit -a -m 'ART: Include cleanup'
git-clang-format -style=file HEAD^
manual inspection
git commit -a --amend
Test: mmma art
Change-Id: Ia963a8ce3ce5f96b5e78acd587e26908c7a70d02
diff --git a/compiler/cfi_test.h b/compiler/cfi_test.h
index c754e55..5347e7f 100644
--- a/compiler/cfi_test.h
+++ b/compiler/cfi_test.h
@@ -17,9 +17,9 @@
#ifndef ART_COMPILER_CFI_TEST_H_
#define ART_COMPILER_CFI_TEST_H_
-#include <vector>
#include <memory>
#include <sstream>
+#include <vector>
#include "arch/instruction_set.h"
#include "base/enums.h"
diff --git a/compiler/common_compiler_test.cc b/compiler/common_compiler_test.cc
index 07bfe31..a9a718f 100644
--- a/compiler/common_compiler_test.cc
+++ b/compiler/common_compiler_test.cc
@@ -28,8 +28,8 @@
#include "driver/compiler_driver.h"
#include "driver/compiler_options.h"
#include "interpreter/interpreter.h"
-#include "mirror/class_loader.h"
#include "mirror/class-inl.h"
+#include "mirror/class_loader.h"
#include "mirror/dex_cache.h"
#include "mirror/object-inl.h"
#include "oat_quick_method_header.h"
diff --git a/compiler/compiled_method.h b/compiler/compiled_method.h
index 761e9e1..97127f5 100644
--- a/compiler/compiled_method.h
+++ b/compiler/compiled_method.h
@@ -17,8 +17,8 @@
#ifndef ART_COMPILER_COMPILED_METHOD_H_
#define ART_COMPILER_COMPILED_METHOD_H_
-#include <memory>
#include <iosfwd>
+#include <memory>
#include <string>
#include <vector>
diff --git a/compiler/compiler.h b/compiler/compiler.h
index ba89cb1..6c542c8 100644
--- a/compiler/compiler.h
+++ b/compiler/compiler.h
@@ -17,8 +17,8 @@
#ifndef ART_COMPILER_COMPILER_H_
#define ART_COMPILER_COMPILER_H_
-#include "dex_file.h"
#include "base/mutex.h"
+#include "dex_file.h"
#include "os.h"
namespace art {
diff --git a/compiler/debug/dwarf/dwarf_test.h b/compiler/debug/dwarf/dwarf_test.h
index e2f0a65..e1f538d 100644
--- a/compiler/debug/dwarf/dwarf_test.h
+++ b/compiler/debug/dwarf/dwarf_test.h
@@ -17,13 +17,14 @@
#ifndef ART_COMPILER_DEBUG_DWARF_DWARF_TEST_H_
#define ART_COMPILER_DEBUG_DWARF_DWARF_TEST_H_
-#include <cstring>
#include <dirent.h>
+#include <stdio.h>
+#include <sys/types.h>
+
+#include <cstring>
#include <memory>
#include <set>
-#include <stdio.h>
#include <string>
-#include <sys/types.h>
#include "base/unix_file/fd_file.h"
#include "common_runtime_test.h"
diff --git a/compiler/dex/dex_to_dex_decompiler_test.cc b/compiler/dex/dex_to_dex_decompiler_test.cc
index 88426a3..7b56f3e 100644
--- a/compiler/dex/dex_to_dex_decompiler_test.cc
+++ b/compiler/dex/dex_to_dex_decompiler_test.cc
@@ -19,16 +19,16 @@
#include "class_linker.h"
#include "compiler/common_compiler_test.h"
#include "compiler/compiled_method.h"
-#include "compiler/driver/compiler_options.h"
#include "compiler/driver/compiler_driver.h"
+#include "compiler/driver/compiler_options.h"
#include "compiler_callbacks.h"
#include "dex_file.h"
#include "handle_scope-inl.h"
-#include "verifier/method_verifier-inl.h"
#include "mirror/class_loader.h"
#include "runtime.h"
-#include "thread.h"
#include "scoped_thread_state_change-inl.h"
+#include "thread.h"
+#include "verifier/method_verifier-inl.h"
namespace art {
diff --git a/compiler/dex/inline_method_analyser.cc b/compiler/dex/inline_method_analyser.cc
index e5ff7fc..54ddc21 100644
--- a/compiler/dex/inline_method_analyser.cc
+++ b/compiler/dex/inline_method_analyser.cc
@@ -21,8 +21,8 @@
#include "base/enums.h"
#include "class_linker-inl.h"
#include "dex_file-inl.h"
-#include "dex_instruction.h"
#include "dex_instruction-inl.h"
+#include "dex_instruction.h"
#include "dex_instruction_utils.h"
#include "mirror/class-inl.h"
#include "mirror/dex_cache-inl.h"
diff --git a/compiler/dex/quick_compiler_callbacks.cc b/compiler/dex/quick_compiler_callbacks.cc
index b1006b2..872f7ea 100644
--- a/compiler/dex/quick_compiler_callbacks.cc
+++ b/compiler/dex/quick_compiler_callbacks.cc
@@ -16,8 +16,8 @@
#include "quick_compiler_callbacks.h"
-#include "verifier/method_verifier-inl.h"
#include "verification_results.h"
+#include "verifier/method_verifier-inl.h"
namespace art {
diff --git a/compiler/dex/verification_results.cc b/compiler/dex/verification_results.cc
index beb3439..e657e3b 100644
--- a/compiler/dex/verification_results.cc
+++ b/compiler/dex/verification_results.cc
@@ -22,8 +22,8 @@
#include "driver/compiler_driver.h"
#include "driver/compiler_options.h"
#include "runtime.h"
-#include "thread.h"
#include "thread-current-inl.h"
+#include "thread.h"
#include "utils/atomic_dex_ref_map-inl.h"
#include "verified_method.h"
#include "verifier/method_verifier-inl.h"
diff --git a/compiler/driver/compiled_method_storage_test.cc b/compiler/driver/compiled_method_storage_test.cc
index bbd28b2..2ec2af5 100644
--- a/compiler/driver/compiled_method_storage_test.cc
+++ b/compiler/driver/compiled_method_storage_test.cc
@@ -14,9 +14,10 @@
* limitations under the License.
*/
+#include "compiled_method_storage.h"
+
#include <gtest/gtest.h>
-#include "compiled_method_storage.h"
#include "compiled_method.h"
#include "compiler_driver.h"
#include "compiler_options.h"
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc
index dd58bc7..da375b6 100644
--- a/compiler/driver/compiler_driver.cc
+++ b/compiler/driver/compiler_driver.cc
@@ -16,9 +16,9 @@
#include "compiler_driver.h"
+#include <unistd.h>
#include <unordered_set>
#include <vector>
-#include <unistd.h>
#ifndef __APPLE__
#include <malloc.h> // For mallinfo
@@ -409,7 +409,7 @@
ClassName, MethodName, Signature) \
SetupIntrinsic(soa.Self(), Intrinsics::k##Name, InvokeType, ClassName, MethodName, Signature);
#include "intrinsics_list.h"
-INTRINSICS_LIST(SETUP_INTRINSICS)
+ INTRINSICS_LIST(SETUP_INTRINSICS)
#undef INTRINSICS_LIST
#undef SETUP_INTRINSICS
}
diff --git a/compiler/driver/compiler_driver.h b/compiler/driver/compiler_driver.h
index 93234cb..ecaed83 100644
--- a/compiler/driver/compiler_driver.h
+++ b/compiler/driver/compiler_driver.h
@@ -32,8 +32,8 @@
#include "dex_file.h"
#include "dex_file_types.h"
#include "driver/compiled_method_storage.h"
-#include "jit/profile_compilation_info.h"
#include "invoke_type.h"
+#include "jit/profile_compilation_info.h"
#include "method_reference.h"
#include "mirror/class.h" // For mirror::Class::Status.
#include "os.h"
diff --git a/compiler/driver/compiler_driver_test.cc b/compiler/driver/compiler_driver_test.cc
index 5d1d972..10bfd97 100644
--- a/compiler/driver/compiler_driver_test.cc
+++ b/compiler/driver/compiler_driver_test.cc
@@ -26,13 +26,13 @@
#include "dex_file.h"
#include "dex_file_types.h"
#include "gc/heap.h"
+#include "handle_scope-inl.h"
+#include "jit/profile_compilation_info.h"
#include "mirror/class-inl.h"
#include "mirror/class_loader.h"
#include "mirror/dex_cache-inl.h"
-#include "mirror/object_array-inl.h"
#include "mirror/object-inl.h"
-#include "handle_scope-inl.h"
-#include "jit/profile_compilation_info.h"
+#include "mirror/object_array-inl.h"
#include "scoped_thread_state_change-inl.h"
namespace art {
diff --git a/compiler/elf_writer_test.cc b/compiler/elf_writer_test.cc
index fa2d78d..984e9ee 100644
--- a/compiler/elf_writer_test.cc
+++ b/compiler/elf_writer_test.cc
@@ -18,9 +18,9 @@
#include "base/unix_file/fd_file.h"
#include "common_compiler_test.h"
+#include "elf_builder.h"
#include "elf_file.h"
#include "elf_file_impl.h"
-#include "elf_builder.h"
#include "elf_writer_quick.h"
#include "oat.h"
#include "utils.h"
diff --git a/compiler/exception_test.cc b/compiler/exception_test.cc
index 0b3ca69..f759aa5 100644
--- a/compiler/exception_test.cc
+++ b/compiler/exception_test.cc
@@ -21,19 +21,19 @@
#include "base/enums.h"
#include "class_linker.h"
#include "common_runtime_test.h"
-#include "dex_file.h"
#include "dex_file-inl.h"
+#include "dex_file.h"
#include "gtest/gtest.h"
+#include "handle_scope-inl.h"
#include "leb128.h"
#include "mirror/class-inl.h"
-#include "mirror/object_array-inl.h"
#include "mirror/object-inl.h"
+#include "mirror/object_array-inl.h"
#include "mirror/stack_trace_element.h"
#include "oat_quick_method_header.h"
#include "optimizing/stack_map_stream.h"
#include "runtime-inl.h"
#include "scoped_thread_state_change-inl.h"
-#include "handle_scope-inl.h"
#include "thread.h"
namespace art {
diff --git a/compiler/image_test.h b/compiler/image_test.h
index 6c3a89b..57d0987 100644
--- a/compiler/image_test.h
+++ b/compiler/image_test.h
@@ -28,8 +28,8 @@
#include "art_method-inl.h"
#include "base/unix_file/fd_file.h"
#include "class_linker-inl.h"
-#include "compiler_callbacks.h"
#include "common_compiler_test.h"
+#include "compiler_callbacks.h"
#include "debug/method_debug_info.h"
#include "dex/quick_compiler_callbacks.h"
#include "driver/compiler_options.h"
diff --git a/compiler/image_writer.cc b/compiler/image_writer.cc
index 51730cf..318009c 100644
--- a/compiler/image_writer.cc
+++ b/compiler/image_writer.cc
@@ -16,9 +16,9 @@
#include "image_writer.h"
-#include <sys/stat.h>
#include <lz4.h>
#include <lz4hc.h>
+#include <sys/stat.h>
#include <memory>
#include <numeric>
@@ -43,8 +43,8 @@
#include "gc/accounting/heap_bitmap.h"
#include "gc/accounting/space_bitmap-inl.h"
#include "gc/collector/concurrent_copying.h"
-#include "gc/heap.h"
#include "gc/heap-visit-objects-inl.h"
+#include "gc/heap.h"
#include "gc/space/large_object_space.h"
#include "gc/space/space-inl.h"
#include "gc/verification.h"
@@ -59,8 +59,8 @@
#include "mirror/class-inl.h"
#include "mirror/class_ext.h"
#include "mirror/class_loader.h"
-#include "mirror/dex_cache.h"
#include "mirror/dex_cache-inl.h"
+#include "mirror/dex_cache.h"
#include "mirror/executable.h"
#include "mirror/method.h"
#include "mirror/object-inl.h"
diff --git a/compiler/image_writer.h b/compiler/image_writer.h
index ee6fc1d..34bbbad 100644
--- a/compiler/image_writer.h
+++ b/compiler/image_writer.h
@@ -22,10 +22,10 @@
#include <cstddef>
#include <memory>
+#include <ostream>
#include <set>
#include <stack>
#include <string>
-#include <ostream>
#include "art_method.h"
#include "base/bit_utils.h"
@@ -40,8 +40,8 @@
#include "lock_word.h"
#include "mem_map.h"
#include "mirror/dex_cache.h"
-#include "obj_ptr.h"
#include "oat_file.h"
+#include "obj_ptr.h"
#include "os.h"
#include "safe_map.h"
#include "utils.h"
diff --git a/compiler/jit/jit_compiler.h b/compiler/jit/jit_compiler.h
index f0f24d3..1e1838e 100644
--- a/compiler/jit/jit_compiler.h
+++ b/compiler/jit/jit_compiler.h
@@ -19,9 +19,9 @@
#include "base/mutex.h"
#include "compiled_method.h"
-#include "jit_logger.h"
#include "driver/compiler_driver.h"
#include "driver/compiler_options.h"
+#include "jit_logger.h"
namespace art {
diff --git a/compiler/jni/quick/arm/calling_convention_arm.cc b/compiler/jni/quick/arm/calling_convention_arm.cc
index 3f29ae5..7e1ad9f 100644
--- a/compiler/jni/quick/arm/calling_convention_arm.cc
+++ b/compiler/jni/quick/arm/calling_convention_arm.cc
@@ -14,8 +14,9 @@
* limitations under the License.
*/
-#include "base/logging.h"
#include "calling_convention_arm.h"
+
+#include "base/logging.h"
#include "handle_scope-inl.h"
#include "utils/arm/managed_register_arm.h"
diff --git a/compiler/jni/quick/arm64/calling_convention_arm64.cc b/compiler/jni/quick/arm64/calling_convention_arm64.cc
index e086455..292ce10 100644
--- a/compiler/jni/quick/arm64/calling_convention_arm64.cc
+++ b/compiler/jni/quick/arm64/calling_convention_arm64.cc
@@ -14,8 +14,9 @@
* limitations under the License.
*/
-#include "base/logging.h"
#include "calling_convention_arm64.h"
+
+#include "base/logging.h"
#include "handle_scope-inl.h"
#include "utils/arm64/managed_register_arm64.h"
diff --git a/compiler/jni/quick/jni_compiler.cc b/compiler/jni/quick/jni_compiler.cc
index 68ec7bd..b65b93f 100644
--- a/compiler/jni/quick/jni_compiler.cc
+++ b/compiler/jni/quick/jni_compiler.cc
@@ -17,36 +17,36 @@
#include "jni_compiler.h"
#include <algorithm>
+#include <fstream>
#include <ios>
#include <memory>
#include <vector>
-#include <fstream>
#include "art_method.h"
#include "base/arena_allocator.h"
#include "base/enums.h"
#include "base/logging.h"
#include "base/macros.h"
-#include "memory_region.h"
#include "calling_convention.h"
#include "class_linker.h"
#include "compiled_method.h"
+#include "debug/dwarf/debug_frame_opcode_writer.h"
#include "dex_file-inl.h"
#include "driver/compiler_driver.h"
#include "driver/compiler_options.h"
#include "entrypoints/quick/quick_entrypoints.h"
#include "jni_env_ext.h"
-#include "debug/dwarf/debug_frame_opcode_writer.h"
+#include "memory_region.h"
+#include "thread.h"
+#include "utils.h"
+#include "utils/arm/managed_register_arm.h"
+#include "utils/arm64/managed_register_arm64.h"
#include "utils/assembler.h"
#include "utils/jni_macro_assembler.h"
#include "utils/managed_register.h"
-#include "utils/arm/managed_register_arm.h"
-#include "utils/arm64/managed_register_arm64.h"
#include "utils/mips/managed_register_mips.h"
#include "utils/mips64/managed_register_mips64.h"
#include "utils/x86/managed_register_x86.h"
-#include "utils.h"
-#include "thread.h"
#define __ jni_asm->
diff --git a/compiler/linker/arm/relative_patcher_thumb2.cc b/compiler/linker/arm/relative_patcher_thumb2.cc
index 18d6b9a..2ac2a1d 100644
--- a/compiler/linker/arm/relative_patcher_thumb2.cc
+++ b/compiler/linker/arm/relative_patcher_thumb2.cc
@@ -22,8 +22,8 @@
#include "compiled_method.h"
#include "entrypoints/quick/quick_entrypoints_enum.h"
#include "lock_word.h"
-#include "mirror/object.h"
#include "mirror/array-inl.h"
+#include "mirror/object.h"
#include "read_barrier.h"
#include "utils/arm/assembler_arm_vixl.h"
diff --git a/compiler/linker/arm/relative_patcher_thumb2_test.cc b/compiler/linker/arm/relative_patcher_thumb2_test.cc
index 52e27af..fe76dfe 100644
--- a/compiler/linker/arm/relative_patcher_thumb2_test.cc
+++ b/compiler/linker/arm/relative_patcher_thumb2_test.cc
@@ -14,9 +14,10 @@
* limitations under the License.
*/
+#include "linker/arm/relative_patcher_thumb2.h"
+
#include "base/casts.h"
#include "linker/relative_patcher_test.h"
-#include "linker/arm/relative_patcher_thumb2.h"
#include "lock_word.h"
#include "mirror/array-inl.h"
#include "mirror/object.h"
diff --git a/compiler/linker/arm64/relative_patcher_arm64.cc b/compiler/linker/arm64/relative_patcher_arm64.cc
index 38c732b..db829f3 100644
--- a/compiler/linker/arm64/relative_patcher_arm64.cc
+++ b/compiler/linker/arm64/relative_patcher_arm64.cc
@@ -25,8 +25,8 @@
#include "entrypoints/quick/quick_entrypoints_enum.h"
#include "linker/output_stream.h"
#include "lock_word.h"
-#include "mirror/object.h"
#include "mirror/array-inl.h"
+#include "mirror/object.h"
#include "oat.h"
#include "oat_quick_method_header.h"
#include "read_barrier.h"
diff --git a/compiler/linker/arm64/relative_patcher_arm64_test.cc b/compiler/linker/arm64/relative_patcher_arm64_test.cc
index 5d02d44..d6919e9 100644
--- a/compiler/linker/arm64/relative_patcher_arm64_test.cc
+++ b/compiler/linker/arm64/relative_patcher_arm64_test.cc
@@ -14,9 +14,10 @@
* limitations under the License.
*/
+#include "linker/arm64/relative_patcher_arm64.h"
+
#include "base/casts.h"
#include "linker/relative_patcher_test.h"
-#include "linker/arm64/relative_patcher_arm64.h"
#include "lock_word.h"
#include "mirror/array-inl.h"
#include "mirror/object.h"
diff --git a/compiler/linker/mips/relative_patcher_mips.h b/compiler/linker/mips/relative_patcher_mips.h
index 0b74bd3..d6eda34 100644
--- a/compiler/linker/mips/relative_patcher_mips.h
+++ b/compiler/linker/mips/relative_patcher_mips.h
@@ -17,8 +17,8 @@
#ifndef ART_COMPILER_LINKER_MIPS_RELATIVE_PATCHER_MIPS_H_
#define ART_COMPILER_LINKER_MIPS_RELATIVE_PATCHER_MIPS_H_
-#include "linker/relative_patcher.h"
#include "arch/mips/instruction_set_features_mips.h"
+#include "linker/relative_patcher.h"
namespace art {
namespace linker {
diff --git a/compiler/linker/mips/relative_patcher_mips32r6_test.cc b/compiler/linker/mips/relative_patcher_mips32r6_test.cc
index d1a75e2..586e2aa 100644
--- a/compiler/linker/mips/relative_patcher_mips32r6_test.cc
+++ b/compiler/linker/mips/relative_patcher_mips32r6_test.cc
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#include "linker/relative_patcher_test.h"
#include "linker/mips/relative_patcher_mips.h"
+#include "linker/relative_patcher_test.h"
namespace art {
namespace linker {
diff --git a/compiler/linker/mips/relative_patcher_mips_test.cc b/compiler/linker/mips/relative_patcher_mips_test.cc
index 2f7a075..ebe5406 100644
--- a/compiler/linker/mips/relative_patcher_mips_test.cc
+++ b/compiler/linker/mips/relative_patcher_mips_test.cc
@@ -14,9 +14,10 @@
* limitations under the License.
*/
-#include "linker/relative_patcher_test.h"
#include "linker/mips/relative_patcher_mips.h"
+#include "linker/relative_patcher_test.h"
+
namespace art {
namespace linker {
diff --git a/compiler/linker/mips64/relative_patcher_mips64_test.cc b/compiler/linker/mips64/relative_patcher_mips64_test.cc
index a5f494d..4edcae7 100644
--- a/compiler/linker/mips64/relative_patcher_mips64_test.cc
+++ b/compiler/linker/mips64/relative_patcher_mips64_test.cc
@@ -14,9 +14,10 @@
* limitations under the License.
*/
-#include "linker/relative_patcher_test.h"
#include "linker/mips64/relative_patcher_mips64.h"
+#include "linker/relative_patcher_test.h"
+
namespace art {
namespace linker {
diff --git a/compiler/linker/multi_oat_relative_patcher.cc b/compiler/linker/multi_oat_relative_patcher.cc
index e9e242b..4ae75d6 100644
--- a/compiler/linker/multi_oat_relative_patcher.cc
+++ b/compiler/linker/multi_oat_relative_patcher.cc
@@ -16,9 +16,9 @@
#include "multi_oat_relative_patcher.h"
-#include "globals.h"
#include "base/bit_utils.h"
#include "base/logging.h"
+#include "globals.h"
namespace art {
namespace linker {
diff --git a/compiler/linker/multi_oat_relative_patcher_test.cc b/compiler/linker/multi_oat_relative_patcher_test.cc
index 615b2b9..e967901 100644
--- a/compiler/linker/multi_oat_relative_patcher_test.cc
+++ b/compiler/linker/multi_oat_relative_patcher_test.cc
@@ -14,9 +14,10 @@
* limitations under the License.
*/
+#include "multi_oat_relative_patcher.h"
+
#include "compiled_method.h"
#include "gtest/gtest.h"
-#include "multi_oat_relative_patcher.h"
#include "vector_output_stream.h"
namespace art {
diff --git a/compiler/linker/output_stream_test.cc b/compiler/linker/output_stream_test.cc
index 09fef29..87cb100 100644
--- a/compiler/linker/output_stream_test.cc
+++ b/compiler/linker/output_stream_test.cc
@@ -17,8 +17,8 @@
#include "file_output_stream.h"
#include "vector_output_stream.h"
-#include "base/unix_file/fd_file.h"
#include "base/logging.h"
+#include "base/unix_file/fd_file.h"
#include "buffered_output_stream.h"
#include "common_runtime_test.h"
diff --git a/compiler/linker/vector_output_stream.h b/compiler/linker/vector_output_stream.h
index 3210143..a9b93e7 100644
--- a/compiler/linker/vector_output_stream.h
+++ b/compiler/linker/vector_output_stream.h
@@ -19,8 +19,8 @@
#include "output_stream.h"
-#include <string>
#include <string.h>
+#include <string>
#include <vector>
namespace art {
diff --git a/compiler/linker/x86/relative_patcher_x86_test.cc b/compiler/linker/x86/relative_patcher_x86_test.cc
index 0bd9de8..4f74cee 100644
--- a/compiler/linker/x86/relative_patcher_x86_test.cc
+++ b/compiler/linker/x86/relative_patcher_x86_test.cc
@@ -14,9 +14,10 @@
* limitations under the License.
*/
-#include "linker/relative_patcher_test.h"
#include "linker/x86/relative_patcher_x86.h"
+#include "linker/relative_patcher_test.h"
+
namespace art {
namespace linker {
diff --git a/compiler/linker/x86_64/relative_patcher_x86_64_test.cc b/compiler/linker/x86_64/relative_patcher_x86_64_test.cc
index 6d6bb40..ae17aa7 100644
--- a/compiler/linker/x86_64/relative_patcher_x86_64_test.cc
+++ b/compiler/linker/x86_64/relative_patcher_x86_64_test.cc
@@ -14,9 +14,10 @@
* limitations under the License.
*/
-#include "linker/relative_patcher_test.h"
#include "linker/x86_64/relative_patcher_x86_64.h"
+#include "linker/relative_patcher_test.h"
+
namespace art {
namespace linker {
diff --git a/compiler/optimizing/bounds_check_elimination.cc b/compiler/optimizing/bounds_check_elimination.cc
index f3ecdf0..c166deb 100644
--- a/compiler/optimizing/bounds_check_elimination.cc
+++ b/compiler/optimizing/bounds_check_elimination.cc
@@ -20,8 +20,8 @@
#include "base/arena_containers.h"
#include "induction_var_range.h"
-#include "side_effects_analysis.h"
#include "nodes.h"
+#include "side_effects_analysis.h"
namespace art {
diff --git a/compiler/optimizing/bounds_check_elimination_test.cc b/compiler/optimizing/bounds_check_elimination_test.cc
index a949c33..575e2fc 100644
--- a/compiler/optimizing/bounds_check_elimination_test.cc
+++ b/compiler/optimizing/bounds_check_elimination_test.cc
@@ -14,8 +14,9 @@
* limitations under the License.
*/
-#include "base/arena_allocator.h"
#include "bounds_check_elimination.h"
+
+#include "base/arena_allocator.h"
#include "builder.h"
#include "gvn.h"
#include "induction_var_analysis.h"
diff --git a/compiler/optimizing/builder.h b/compiler/optimizing/builder.h
index 3a4c9db..43429cf 100644
--- a/compiler/optimizing/builder.h
+++ b/compiler/optimizing/builder.h
@@ -20,14 +20,14 @@
#include "base/arena_containers.h"
#include "base/arena_object.h"
#include "block_builder.h"
-#include "dex_file.h"
#include "dex_file-inl.h"
+#include "dex_file.h"
#include "driver/compiler_driver.h"
#include "driver/dex_compilation_unit.h"
#include "instruction_builder.h"
+#include "nodes.h"
#include "optimizing_compiler_stats.h"
#include "primitive.h"
-#include "nodes.h"
#include "ssa_builder.h"
namespace art {
diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc
index 2872cf7..d7d0fff 100644
--- a/compiler/optimizing/code_generator.cc
+++ b/compiler/optimizing/code_generator.cc
@@ -57,8 +57,8 @@
#include "mirror/reference.h"
#include "mirror/string.h"
#include "parallel_move_resolver.h"
-#include "ssa_liveness_analysis.h"
#include "scoped_thread_state_change-inl.h"
+#include "ssa_liveness_analysis.h"
#include "thread-current-inl.h"
#include "utils/assembler.h"
diff --git a/compiler/optimizing/code_generator_arm64.cc b/compiler/optimizing/code_generator_arm64.cc
index 7e5b1a0..4999950 100644
--- a/compiler/optimizing/code_generator_arm64.cc
+++ b/compiler/optimizing/code_generator_arm64.cc
@@ -29,9 +29,9 @@
#include "intrinsics.h"
#include "intrinsics_arm64.h"
#include "linker/arm64/relative_patcher_arm64.h"
+#include "lock_word.h"
#include "mirror/array-inl.h"
#include "mirror/class-inl.h"
-#include "lock_word.h"
#include "offsets.h"
#include "thread.h"
#include "utils/arm64/assembler_arm64.h"
diff --git a/compiler/optimizing/code_generator_arm_vixl.h b/compiler/optimizing/code_generator_arm_vixl.h
index 01cf287..7ab2993 100644
--- a/compiler/optimizing/code_generator_arm_vixl.h
+++ b/compiler/optimizing/code_generator_arm_vixl.h
@@ -22,8 +22,8 @@
#include "common_arm.h"
#include "driver/compiler_options.h"
#include "nodes.h"
-#include "string_reference.h"
#include "parallel_move_resolver.h"
+#include "string_reference.h"
#include "type_reference.h"
#include "utils/arm/assembler_arm_vixl.h"
diff --git a/compiler/optimizing/code_generator_x86.cc b/compiler/optimizing/code_generator_x86.cc
index af0e646..142cc7f 100644
--- a/compiler/optimizing/code_generator_x86.cc
+++ b/compiler/optimizing/code_generator_x86.cc
@@ -24,9 +24,9 @@
#include "gc/accounting/card_table.h"
#include "intrinsics.h"
#include "intrinsics_x86.h"
+#include "lock_word.h"
#include "mirror/array-inl.h"
#include "mirror/class-inl.h"
-#include "lock_word.h"
#include "thread.h"
#include "utils/assembler.h"
#include "utils/stack_checks.h"
diff --git a/compiler/optimizing/common_arm.h b/compiler/optimizing/common_arm.h
index 8fcceed..e354654 100644
--- a/compiler/optimizing/common_arm.h
+++ b/compiler/optimizing/common_arm.h
@@ -17,8 +17,8 @@
#ifndef ART_COMPILER_OPTIMIZING_COMMON_ARM_H_
#define ART_COMPILER_OPTIMIZING_COMMON_ARM_H_
-#include "instruction_simplifier_shared.h"
#include "debug/dwarf/register.h"
+#include "instruction_simplifier_shared.h"
#include "locations.h"
#include "nodes.h"
#include "utils/arm/constants_arm.h"
diff --git a/compiler/optimizing/dead_code_elimination_test.cc b/compiler/optimizing/dead_code_elimination_test.cc
index fdd77e7..96fa540 100644
--- a/compiler/optimizing/dead_code_elimination_test.cc
+++ b/compiler/optimizing/dead_code_elimination_test.cc
@@ -14,9 +14,10 @@
* limitations under the License.
*/
+#include "dead_code_elimination.h"
+
#include "arch/x86/instruction_set_features_x86.h"
#include "code_generator_x86.h"
-#include "dead_code_elimination.h"
#include "driver/compiler_options.h"
#include "graph_checker.h"
#include "optimizing_unit_test.h"
diff --git a/compiler/optimizing/find_loops_test.cc b/compiler/optimizing/find_loops_test.cc
index 04789d9..bbd28f5 100644
--- a/compiler/optimizing/find_loops_test.cc
+++ b/compiler/optimizing/find_loops_test.cc
@@ -20,8 +20,8 @@
#include "dex_instruction.h"
#include "nodes.h"
#include "optimizing_unit_test.h"
-#include "ssa_liveness_analysis.h"
#include "pretty_printer.h"
+#include "ssa_liveness_analysis.h"
#include "gtest/gtest.h"
diff --git a/compiler/optimizing/graph_checker.cc b/compiler/optimizing/graph_checker.cc
index aea901d..327e11f 100644
--- a/compiler/optimizing/graph_checker.cc
+++ b/compiler/optimizing/graph_checker.cc
@@ -17,8 +17,8 @@
#include "graph_checker.h"
#include <algorithm>
-#include <string>
#include <sstream>
+#include <string>
#include "android-base/stringprintf.h"
diff --git a/compiler/optimizing/gvn_test.cc b/compiler/optimizing/gvn_test.cc
index f8d37bd..e1ed7f6 100644
--- a/compiler/optimizing/gvn_test.cc
+++ b/compiler/optimizing/gvn_test.cc
@@ -14,9 +14,10 @@
* limitations under the License.
*/
+#include "gvn.h"
+
#include "base/arena_allocator.h"
#include "builder.h"
-#include "gvn.h"
#include "nodes.h"
#include "optimizing_unit_test.h"
#include "side_effects_analysis.h"
diff --git a/compiler/optimizing/induction_var_range_test.cc b/compiler/optimizing/induction_var_range_test.cc
index 67d2093..2b82b33 100644
--- a/compiler/optimizing/induction_var_range_test.cc
+++ b/compiler/optimizing/induction_var_range_test.cc
@@ -14,10 +14,11 @@
* limitations under the License.
*/
+#include "induction_var_range.h"
+
#include "base/arena_allocator.h"
#include "builder.h"
#include "induction_var_analysis.h"
-#include "induction_var_range.h"
#include "nodes.h"
#include "optimizing_unit_test.h"
diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc
index 18390cc..38a1a8c 100644
--- a/compiler/optimizing/inliner.cc
+++ b/compiler/optimizing/inliner.cc
@@ -23,8 +23,8 @@
#include "constant_folding.h"
#include "dead_code_elimination.h"
#include "dex/inline_method_analyser.h"
-#include "dex/verified_method.h"
#include "dex/verification_results.h"
+#include "dex/verified_method.h"
#include "driver/compiler_driver-inl.h"
#include "driver/compiler_options.h"
#include "driver/dex_compilation_unit.h"
@@ -38,10 +38,10 @@
#include "optimizing_compiler.h"
#include "reference_type_propagation.h"
#include "register_allocator_linear_scan.h"
+#include "scoped_thread_state_change-inl.h"
#include "sharpening.h"
#include "ssa_builder.h"
#include "ssa_phi_elimination.h"
-#include "scoped_thread_state_change-inl.h"
#include "thread.h"
namespace art {
diff --git a/compiler/optimizing/inliner.h b/compiler/optimizing/inliner.h
index 67476b6..62c6713 100644
--- a/compiler/optimizing/inliner.h
+++ b/compiler/optimizing/inliner.h
@@ -19,8 +19,8 @@
#include "dex_file_types.h"
#include "invoke_type.h"
-#include "optimization.h"
#include "jit/profile_compilation_info.h"
+#include "optimization.h"
namespace art {
diff --git a/compiler/optimizing/instruction_builder.cc b/compiler/optimizing/instruction_builder.cc
index 8054140..143c77f 100644
--- a/compiler/optimizing/instruction_builder.cc
+++ b/compiler/optimizing/instruction_builder.cc
@@ -23,8 +23,8 @@
#include "driver/compiler_options.h"
#include "imtable-inl.h"
#include "quicken_info.h"
-#include "sharpening.h"
#include "scoped_thread_state_change-inl.h"
+#include "sharpening.h"
namespace art {
diff --git a/compiler/optimizing/instruction_builder.h b/compiler/optimizing/instruction_builder.h
index 5a83df3..2a9b9f5 100644
--- a/compiler/optimizing/instruction_builder.h
+++ b/compiler/optimizing/instruction_builder.h
@@ -21,8 +21,8 @@
#include "base/arena_object.h"
#include "block_builder.h"
#include "dex_file_types.h"
-#include "driver/compiler_driver.h"
#include "driver/compiler_driver-inl.h"
+#include "driver/compiler_driver.h"
#include "driver/dex_compilation_unit.h"
#include "mirror/dex_cache.h"
#include "nodes.h"
diff --git a/compiler/optimizing/instruction_simplifier.cc b/compiler/optimizing/instruction_simplifier.cc
index f2a8cc0..02cfbbc 100644
--- a/compiler/optimizing/instruction_simplifier.cc
+++ b/compiler/optimizing/instruction_simplifier.cc
@@ -21,8 +21,8 @@
#include "escape.h"
#include "intrinsics.h"
#include "mirror/class-inl.h"
-#include "sharpening.h"
#include "scoped_thread_state_change-inl.h"
+#include "sharpening.h"
namespace art {
diff --git a/compiler/optimizing/instruction_simplifier_arm.cc b/compiler/optimizing/instruction_simplifier_arm.cc
index a025fb1..a32d0ce 100644
--- a/compiler/optimizing/instruction_simplifier_arm.cc
+++ b/compiler/optimizing/instruction_simplifier_arm.cc
@@ -14,9 +14,10 @@
* limitations under the License.
*/
+#include "instruction_simplifier_arm.h"
+
#include "code_generator.h"
#include "common_arm.h"
-#include "instruction_simplifier_arm.h"
#include "instruction_simplifier_shared.h"
#include "mirror/array-inl.h"
#include "mirror/string.h"
diff --git a/compiler/optimizing/intrinsics.cc b/compiler/optimizing/intrinsics.cc
index b664d41..7bdeef5 100644
--- a/compiler/optimizing/intrinsics.cc
+++ b/compiler/optimizing/intrinsics.cc
@@ -39,7 +39,7 @@
case Intrinsics::k ## Name: \
return IsStatic;
#include "intrinsics_list.h"
-INTRINSICS_LIST(OPTIMIZING_INTRINSICS)
+ INTRINSICS_LIST(OPTIMIZING_INTRINSICS)
#undef INTRINSICS_LIST
#undef OPTIMIZING_INTRINSICS
}
@@ -55,7 +55,7 @@
case Intrinsics::k ## Name: \
return NeedsEnvironmentOrCache;
#include "intrinsics_list.h"
-INTRINSICS_LIST(OPTIMIZING_INTRINSICS)
+ INTRINSICS_LIST(OPTIMIZING_INTRINSICS)
#undef INTRINSICS_LIST
#undef OPTIMIZING_INTRINSICS
}
@@ -71,7 +71,7 @@
case Intrinsics::k ## Name: \
return SideEffects;
#include "intrinsics_list.h"
-INTRINSICS_LIST(OPTIMIZING_INTRINSICS)
+ INTRINSICS_LIST(OPTIMIZING_INTRINSICS)
#undef INTRINSICS_LIST
#undef OPTIMIZING_INTRINSICS
}
@@ -87,7 +87,7 @@
case Intrinsics::k ## Name: \
return Exceptions;
#include "intrinsics_list.h"
-INTRINSICS_LIST(OPTIMIZING_INTRINSICS)
+ INTRINSICS_LIST(OPTIMIZING_INTRINSICS)
#undef INTRINSICS_LIST
#undef OPTIMIZING_INTRINSICS
}
@@ -172,7 +172,7 @@
os << # Name; \
break;
#include "intrinsics_list.h"
-INTRINSICS_LIST(OPTIMIZING_INTRINSICS)
+ INTRINSICS_LIST(OPTIMIZING_INTRINSICS)
#undef STATIC_INTRINSICS_LIST
#undef VIRTUAL_INTRINSICS_LIST
#undef OPTIMIZING_INTRINSICS
diff --git a/compiler/optimizing/intrinsics.h b/compiler/optimizing/intrinsics.h
index 9da5a7f..6411e82 100644
--- a/compiler/optimizing/intrinsics.h
+++ b/compiler/optimizing/intrinsics.h
@@ -63,7 +63,7 @@
Visit ## Name(invoke); \
return;
#include "intrinsics_list.h"
-INTRINSICS_LIST(OPTIMIZING_INTRINSICS)
+ INTRINSICS_LIST(OPTIMIZING_INTRINSICS)
#undef INTRINSICS_LIST
#undef OPTIMIZING_INTRINSICS
@@ -77,7 +77,7 @@
virtual void Visit ## Name(HInvoke* invoke ATTRIBUTE_UNUSED) { \
}
#include "intrinsics_list.h"
-INTRINSICS_LIST(OPTIMIZING_INTRINSICS)
+ INTRINSICS_LIST(OPTIMIZING_INTRINSICS)
#undef INTRINSICS_LIST
#undef OPTIMIZING_INTRINSICS
diff --git a/compiler/optimizing/intrinsics_arm64.h b/compiler/optimizing/intrinsics_arm64.h
index ff59ce9..5a6d180 100644
--- a/compiler/optimizing/intrinsics_arm64.h
+++ b/compiler/optimizing/intrinsics_arm64.h
@@ -47,7 +47,7 @@
#define OPTIMIZING_INTRINSICS(Name, IsStatic, NeedsEnvironmentOrCache, SideEffects, Exceptions, ...) \
void Visit ## Name(HInvoke* invoke) OVERRIDE;
#include "intrinsics_list.h"
-INTRINSICS_LIST(OPTIMIZING_INTRINSICS)
+ INTRINSICS_LIST(OPTIMIZING_INTRINSICS)
#undef INTRINSICS_LIST
#undef OPTIMIZING_INTRINSICS
@@ -72,7 +72,7 @@
#define OPTIMIZING_INTRINSICS(Name, IsStatic, NeedsEnvironmentOrCache, SideEffects, Exceptions, ...) \
void Visit ## Name(HInvoke* invoke) OVERRIDE;
#include "intrinsics_list.h"
-INTRINSICS_LIST(OPTIMIZING_INTRINSICS)
+ INTRINSICS_LIST(OPTIMIZING_INTRINSICS)
#undef INTRINSICS_LIST
#undef OPTIMIZING_INTRINSICS
diff --git a/compiler/optimizing/intrinsics_arm_vixl.h b/compiler/optimizing/intrinsics_arm_vixl.h
index 023cba1..a4a2830 100644
--- a/compiler/optimizing/intrinsics_arm_vixl.h
+++ b/compiler/optimizing/intrinsics_arm_vixl.h
@@ -36,7 +36,7 @@
#define OPTIMIZING_INTRINSICS(Name, IsStatic, NeedsEnvironmentOrCache, SideEffects, Exceptions, ...) \
void Visit ## Name(HInvoke* invoke) OVERRIDE;
#include "intrinsics_list.h"
-INTRINSICS_LIST(OPTIMIZING_INTRINSICS)
+ INTRINSICS_LIST(OPTIMIZING_INTRINSICS)
#undef INTRINSICS_LIST
#undef OPTIMIZING_INTRINSICS
@@ -63,7 +63,7 @@
#define OPTIMIZING_INTRINSICS(Name, IsStatic, NeedsEnvironmentOrCache, SideEffects, Exceptions, ...) \
void Visit ## Name(HInvoke* invoke) OVERRIDE;
#include "intrinsics_list.h"
-INTRINSICS_LIST(OPTIMIZING_INTRINSICS)
+ INTRINSICS_LIST(OPTIMIZING_INTRINSICS)
#undef INTRINSICS_LIST
#undef OPTIMIZING_INTRINSICS
diff --git a/compiler/optimizing/intrinsics_mips.h b/compiler/optimizing/intrinsics_mips.h
index eaadad2..05d1aa2 100644
--- a/compiler/optimizing/intrinsics_mips.h
+++ b/compiler/optimizing/intrinsics_mips.h
@@ -39,7 +39,7 @@
#define OPTIMIZING_INTRINSICS(Name, IsStatic, NeedsEnvironmentOrCache, SideEffects, Exceptions, ...) \
void Visit ## Name(HInvoke* invoke) OVERRIDE;
#include "intrinsics_list.h"
-INTRINSICS_LIST(OPTIMIZING_INTRINSICS)
+ INTRINSICS_LIST(OPTIMIZING_INTRINSICS)
#undef INTRINSICS_LIST
#undef OPTIMIZING_INTRINSICS
@@ -64,7 +64,7 @@
#define OPTIMIZING_INTRINSICS(Name, IsStatic, NeedsEnvironmentOrCache, SideEffects, Exceptions, ...) \
void Visit ## Name(HInvoke* invoke) OVERRIDE;
#include "intrinsics_list.h"
-INTRINSICS_LIST(OPTIMIZING_INTRINSICS)
+ INTRINSICS_LIST(OPTIMIZING_INTRINSICS)
#undef INTRINSICS_LIST
#undef OPTIMIZING_INTRINSICS
diff --git a/compiler/optimizing/intrinsics_mips64.h b/compiler/optimizing/intrinsics_mips64.h
index 179627a..6880a25 100644
--- a/compiler/optimizing/intrinsics_mips64.h
+++ b/compiler/optimizing/intrinsics_mips64.h
@@ -39,7 +39,7 @@
#define OPTIMIZING_INTRINSICS(Name, IsStatic, NeedsEnvironmentOrCache, SideEffects, Exceptions, ...) \
void Visit ## Name(HInvoke* invoke) OVERRIDE;
#include "intrinsics_list.h"
-INTRINSICS_LIST(OPTIMIZING_INTRINSICS)
+ INTRINSICS_LIST(OPTIMIZING_INTRINSICS)
#undef INTRINSICS_LIST
#undef OPTIMIZING_INTRINSICS
@@ -64,7 +64,7 @@
#define OPTIMIZING_INTRINSICS(Name, IsStatic, NeedsEnvironmentOrCache, SideEffects, Exceptions, ...) \
void Visit ## Name(HInvoke* invoke) OVERRIDE;
#include "intrinsics_list.h"
-INTRINSICS_LIST(OPTIMIZING_INTRINSICS)
+ INTRINSICS_LIST(OPTIMIZING_INTRINSICS)
#undef INTRINSICS_LIST
#undef OPTIMIZING_INTRINSICS
diff --git a/compiler/optimizing/intrinsics_x86.h b/compiler/optimizing/intrinsics_x86.h
index 3743cb1..22f11b1 100644
--- a/compiler/optimizing/intrinsics_x86.h
+++ b/compiler/optimizing/intrinsics_x86.h
@@ -39,7 +39,7 @@
#define OPTIMIZING_INTRINSICS(Name, IsStatic, NeedsEnvironmentOrCache, SideEffects, Exceptions, ...) \
void Visit ## Name(HInvoke* invoke) OVERRIDE;
#include "intrinsics_list.h"
-INTRINSICS_LIST(OPTIMIZING_INTRINSICS)
+ INTRINSICS_LIST(OPTIMIZING_INTRINSICS)
#undef INTRINSICS_LIST
#undef OPTIMIZING_INTRINSICS
@@ -64,7 +64,7 @@
#define OPTIMIZING_INTRINSICS(Name, IsStatic, NeedsEnvironmentOrCache, SideEffects, Exceptions, ...) \
void Visit ## Name(HInvoke* invoke) OVERRIDE;
#include "intrinsics_list.h"
-INTRINSICS_LIST(OPTIMIZING_INTRINSICS)
+ INTRINSICS_LIST(OPTIMIZING_INTRINSICS)
#undef INTRINSICS_LIST
#undef OPTIMIZING_INTRINSICS
diff --git a/compiler/optimizing/intrinsics_x86_64.h b/compiler/optimizing/intrinsics_x86_64.h
index 97404aa..4b28788 100644
--- a/compiler/optimizing/intrinsics_x86_64.h
+++ b/compiler/optimizing/intrinsics_x86_64.h
@@ -39,7 +39,7 @@
#define OPTIMIZING_INTRINSICS(Name, IsStatic, NeedsEnvironmentOrCache, SideEffects, Exceptions, ...) \
void Visit ## Name(HInvoke* invoke) OVERRIDE;
#include "intrinsics_list.h"
-INTRINSICS_LIST(OPTIMIZING_INTRINSICS)
+ INTRINSICS_LIST(OPTIMIZING_INTRINSICS)
#undef INTRINSICS_LIST
#undef OPTIMIZING_INTRINSICS
@@ -64,7 +64,7 @@
#define OPTIMIZING_INTRINSICS(Name, IsStatic, NeedsEnvironmentOrCache, SideEffects, Exceptions, ...) \
void Visit ## Name(HInvoke* invoke) OVERRIDE;
#include "intrinsics_list.h"
-INTRINSICS_LIST(OPTIMIZING_INTRINSICS)
+ INTRINSICS_LIST(OPTIMIZING_INTRINSICS)
#undef INTRINSICS_LIST
#undef OPTIMIZING_INTRINSICS
diff --git a/compiler/optimizing/licm_test.cc b/compiler/optimizing/licm_test.cc
index 8d15f78..8967d7c 100644
--- a/compiler/optimizing/licm_test.cc
+++ b/compiler/optimizing/licm_test.cc
@@ -14,9 +14,10 @@
* limitations under the License.
*/
+#include "licm.h"
+
#include "base/arena_allocator.h"
#include "builder.h"
-#include "licm.h"
#include "nodes.h"
#include "optimizing_unit_test.h"
#include "side_effects_analysis.h"
diff --git a/compiler/optimizing/load_store_elimination.cc b/compiler/optimizing/load_store_elimination.cc
index 211528b..fddda3d 100644
--- a/compiler/optimizing/load_store_elimination.cc
+++ b/compiler/optimizing/load_store_elimination.cc
@@ -14,10 +14,10 @@
* limitations under the License.
*/
-#include "load_store_analysis.h"
#include "load_store_elimination.h"
#include "escape.h"
+#include "load_store_analysis.h"
#include "side_effects_analysis.h"
#include <iostream>
diff --git a/compiler/optimizing/locations.cc b/compiler/optimizing/locations.cc
index a9fe209..40fe35b 100644
--- a/compiler/optimizing/locations.cc
+++ b/compiler/optimizing/locations.cc
@@ -18,8 +18,8 @@
#include <type_traits>
-#include "nodes.h"
#include "code_generator.h"
+#include "nodes.h"
namespace art {
diff --git a/compiler/optimizing/loop_optimization.cc b/compiler/optimizing/loop_optimization.cc
index 422e58d..274f065 100644
--- a/compiler/optimizing/loop_optimization.cc
+++ b/compiler/optimizing/loop_optimization.cc
@@ -16,9 +16,9 @@
#include "loop_optimization.h"
-#include "arch/instruction_set.h"
#include "arch/arm/instruction_set_features_arm.h"
#include "arch/arm64/instruction_set_features_arm64.h"
+#include "arch/instruction_set.h"
#include "arch/mips/instruction_set_features_mips.h"
#include "arch/mips64/instruction_set_features_mips64.h"
#include "arch/x86/instruction_set_features_x86.h"
diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc
index 4ca8337..ca48e08 100644
--- a/compiler/optimizing/nodes.cc
+++ b/compiler/optimizing/nodes.cc
@@ -18,16 +18,16 @@
#include <cfloat>
#include "art_method-inl.h"
+#include "base/bit_utils.h"
+#include "base/bit_vector-inl.h"
+#include "base/stl_util.h"
#include "class_linker-inl.h"
#include "code_generator.h"
#include "common_dominator.h"
-#include "ssa_builder.h"
-#include "base/bit_vector-inl.h"
-#include "base/bit_utils.h"
-#include "base/stl_util.h"
#include "intrinsics.h"
#include "mirror/class-inl.h"
#include "scoped_thread_state_change-inl.h"
+#include "ssa_builder.h"
namespace art {
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h
index 5e072cd..fa29378 100644
--- a/compiler/optimizing/nodes.h
+++ b/compiler/optimizing/nodes.h
@@ -28,14 +28,14 @@
#include "base/iteration_range.h"
#include "base/stl_util.h"
#include "base/transform_array_ref.h"
+#include "deoptimization_kind.h"
#include "dex_file.h"
#include "dex_file_types.h"
-#include "deoptimization_kind.h"
#include "entrypoints/quick/quick_entrypoints_enum.h"
#include "handle.h"
#include "handle_scope.h"
-#include "invoke_type.h"
#include "intrinsics_enum.h"
+#include "invoke_type.h"
#include "locations.h"
#include "method_reference.h"
#include "mirror/class.h"
diff --git a/compiler/optimizing/nodes_shared.cc b/compiler/optimizing/nodes_shared.cc
index f145bf9..f6d33f0 100644
--- a/compiler/optimizing/nodes_shared.cc
+++ b/compiler/optimizing/nodes_shared.cc
@@ -14,9 +14,15 @@
* limitations under the License.
*/
-#include "common_arm64.h"
+// Note: this include order may seem strange and is against the regular style. However it is the
+// required order as nodes_shared does not have the right dependency chain and compilation
+// will fail (as AsType on HInstruction will be defined before the full Instruction).
+#include "nodes.h"
+
#include "nodes_shared.h"
+#include "common_arm64.h"
+
namespace art {
using helpers::CanFitInShifterOperand;
diff --git a/compiler/optimizing/nodes_test.cc b/compiler/optimizing/nodes_test.cc
index 7686ba8..f3a78a0 100644
--- a/compiler/optimizing/nodes_test.cc
+++ b/compiler/optimizing/nodes_test.cc
@@ -14,8 +14,9 @@
* limitations under the License.
*/
-#include "base/arena_allocator.h"
#include "nodes.h"
+
+#include "base/arena_allocator.h"
#include "optimizing_unit_test.h"
#include "gtest/gtest.h"
diff --git a/compiler/optimizing/optimizing_cfi_test.cc b/compiler/optimizing/optimizing_cfi_test.cc
index 6cb27b3..c24f1de 100644
--- a/compiler/optimizing/optimizing_cfi_test.cc
+++ b/compiler/optimizing/optimizing_cfi_test.cc
@@ -23,8 +23,8 @@
#include "gtest/gtest.h"
#include "optimizing/code_generator.h"
#include "optimizing/optimizing_unit_test.h"
-#include "utils/assembler.h"
#include "utils/arm/assembler_arm_vixl.h"
+#include "utils/assembler.h"
#include "utils/mips/assembler_mips.h"
#include "utils/mips64/assembler_mips64.h"
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc
index b76a0df..51101f1 100644
--- a/compiler/optimizing/optimizing_compiler.cc
+++ b/compiler/optimizing/optimizing_compiler.cc
@@ -87,8 +87,8 @@
#include "prepare_for_register_allocation.h"
#include "reference_type_propagation.h"
#include "register_allocator_linear_scan.h"
-#include "select_generator.h"
#include "scheduler.h"
+#include "select_generator.h"
#include "sharpening.h"
#include "side_effects_analysis.h"
#include "ssa_builder.h"
diff --git a/compiler/optimizing/optimizing_unit_test.h b/compiler/optimizing/optimizing_unit_test.h
index 1cdcbd2..08493fa 100644
--- a/compiler/optimizing/optimizing_unit_test.h
+++ b/compiler/optimizing/optimizing_unit_test.h
@@ -17,12 +17,12 @@
#ifndef ART_COMPILER_OPTIMIZING_OPTIMIZING_UNIT_TEST_H_
#define ART_COMPILER_OPTIMIZING_OPTIMIZING_UNIT_TEST_H_
-#include "nodes.h"
#include "builder.h"
#include "common_compiler_test.h"
#include "dex_file.h"
#include "dex_instruction.h"
#include "handle_scope.h"
+#include "nodes.h"
#include "scoped_thread_state_change.h"
#include "ssa_builder.h"
#include "ssa_liveness_analysis.h"
diff --git a/compiler/optimizing/parallel_move_test.cc b/compiler/optimizing/parallel_move_test.cc
index 5e8fe37..50620f0 100644
--- a/compiler/optimizing/parallel_move_test.cc
+++ b/compiler/optimizing/parallel_move_test.cc
@@ -18,8 +18,8 @@
#include "nodes.h"
#include "parallel_move_resolver.h"
-#include "gtest/gtest.h"
#include "gtest/gtest-typed-test.h"
+#include "gtest/gtest.h"
namespace art {
diff --git a/compiler/optimizing/pretty_printer_test.cc b/compiler/optimizing/pretty_printer_test.cc
index 1af94f3..14d2360 100644
--- a/compiler/optimizing/pretty_printer_test.cc
+++ b/compiler/optimizing/pretty_printer_test.cc
@@ -14,13 +14,14 @@
* limitations under the License.
*/
+#include "pretty_printer.h"
+
#include "base/arena_allocator.h"
#include "builder.h"
#include "dex_file.h"
#include "dex_instruction.h"
#include "nodes.h"
#include "optimizing_unit_test.h"
-#include "pretty_printer.h"
#include "gtest/gtest.h"
diff --git a/compiler/optimizing/reference_type_propagation_test.cc b/compiler/optimizing/reference_type_propagation_test.cc
index 0b49ce1..d537459 100644
--- a/compiler/optimizing/reference_type_propagation_test.cc
+++ b/compiler/optimizing/reference_type_propagation_test.cc
@@ -14,12 +14,13 @@
* limitations under the License.
*/
+#include "reference_type_propagation.h"
+
#include "base/arena_allocator.h"
#include "builder.h"
#include "nodes.h"
#include "object_lock.h"
#include "optimizing_unit_test.h"
-#include "reference_type_propagation.h"
namespace art {
diff --git a/compiler/optimizing/register_allocator.cc b/compiler/optimizing/register_allocator.cc
index 5b768d5..c3b33e2 100644
--- a/compiler/optimizing/register_allocator.cc
+++ b/compiler/optimizing/register_allocator.cc
@@ -25,7 +25,6 @@
#include "register_allocator_linear_scan.h"
#include "ssa_liveness_analysis.h"
-
namespace art {
RegisterAllocator::RegisterAllocator(ArenaAllocator* allocator,
diff --git a/compiler/optimizing/register_allocator_test.cc b/compiler/optimizing/register_allocator_test.cc
index 24a2ab2..bcdd7f9 100644
--- a/compiler/optimizing/register_allocator_test.cc
+++ b/compiler/optimizing/register_allocator_test.cc
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+#include "register_allocator.h"
+
#include "arch/x86/instruction_set_features_x86.h"
#include "base/arena_allocator.h"
#include "builder.h"
@@ -25,7 +27,6 @@
#include "driver/compiler_options.h"
#include "nodes.h"
#include "optimizing_unit_test.h"
-#include "register_allocator.h"
#include "register_allocator_linear_scan.h"
#include "ssa_liveness_analysis.h"
#include "ssa_phi_elimination.h"
diff --git a/compiler/optimizing/scheduler.h b/compiler/optimizing/scheduler.h
index 930a2c8..66ffac5 100644
--- a/compiler/optimizing/scheduler.h
+++ b/compiler/optimizing/scheduler.h
@@ -20,11 +20,11 @@
#include <fstream>
#include "base/time_utils.h"
+#include "code_generator.h"
#include "driver/compiler_driver.h"
#include "load_store_analysis.h"
#include "nodes.h"
#include "optimization.h"
-#include "code_generator.h"
namespace art {
diff --git a/compiler/optimizing/scheduler_arm.cc b/compiler/optimizing/scheduler_arm.cc
index f025c0a..ea15790 100644
--- a/compiler/optimizing/scheduler_arm.cc
+++ b/compiler/optimizing/scheduler_arm.cc
@@ -14,11 +14,12 @@
* limitations under the License.
*/
+#include "scheduler_arm.h"
+
#include "arch/arm/instruction_set_features_arm.h"
#include "code_generator_utils.h"
#include "common_arm.h"
#include "mirror/array-inl.h"
-#include "scheduler_arm.h"
namespace art {
namespace arm {
diff --git a/compiler/optimizing/scheduler_arm64.cc b/compiler/optimizing/scheduler_arm64.cc
index 83b487f..f54d3f3 100644
--- a/compiler/optimizing/scheduler_arm64.cc
+++ b/compiler/optimizing/scheduler_arm64.cc
@@ -15,6 +15,7 @@
*/
#include "scheduler_arm64.h"
+
#include "code_generator_utils.h"
#include "mirror/array-inl.h"
diff --git a/compiler/optimizing/scheduler_test.cc b/compiler/optimizing/scheduler_test.cc
index 10c3cd7..cdb6666 100644
--- a/compiler/optimizing/scheduler_test.cc
+++ b/compiler/optimizing/scheduler_test.cc
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+#include "scheduler.h"
+
#include "base/arena_allocator.h"
#include "builder.h"
#include "codegen_test_utils.h"
@@ -23,7 +25,6 @@
#include "optimizing_unit_test.h"
#include "pc_relative_fixups_x86.h"
#include "register_allocator.h"
-#include "scheduler.h"
#ifdef ART_ENABLE_CODEGEN_arm64
#include "scheduler_arm64.h"
diff --git a/compiler/optimizing/sharpening.cc b/compiler/optimizing/sharpening.cc
index 8bd568b..9536d14 100644
--- a/compiler/optimizing/sharpening.cc
+++ b/compiler/optimizing/sharpening.cc
@@ -21,10 +21,9 @@
#include "base/enums.h"
#include "class_linker.h"
#include "code_generator.h"
+#include "driver/compiler_driver.h"
#include "driver/compiler_options.h"
#include "driver/dex_compilation_unit.h"
-#include "utils/dex_cache_arrays_layout-inl.h"
-#include "driver/compiler_driver.h"
#include "gc/heap.h"
#include "gc/space/image_space.h"
#include "handle_scope-inl.h"
@@ -33,6 +32,7 @@
#include "nodes.h"
#include "runtime.h"
#include "scoped_thread_state_change-inl.h"
+#include "utils/dex_cache_arrays_layout-inl.h"
namespace art {
diff --git a/compiler/optimizing/ssa_liveness_analysis_test.cc b/compiler/optimizing/ssa_liveness_analysis_test.cc
index 029eb4b..b46060a 100644
--- a/compiler/optimizing/ssa_liveness_analysis_test.cc
+++ b/compiler/optimizing/ssa_liveness_analysis_test.cc
@@ -14,15 +14,16 @@
* limitations under the License.
*/
+#include "ssa_liveness_analysis.h"
+
#include "arch/instruction_set.h"
#include "arch/instruction_set_features.h"
#include "base/arena_allocator.h"
#include "base/arena_containers.h"
-#include "driver/compiler_options.h"
#include "code_generator.h"
+#include "driver/compiler_options.h"
#include "nodes.h"
#include "optimizing_unit_test.h"
-#include "ssa_liveness_analysis.h"
namespace art {
diff --git a/compiler/optimizing/ssa_phi_elimination.cc b/compiler/optimizing/ssa_phi_elimination.cc
index aec7a3c..b4f8408 100644
--- a/compiler/optimizing/ssa_phi_elimination.cc
+++ b/compiler/optimizing/ssa_phi_elimination.cc
@@ -16,8 +16,8 @@
#include "ssa_phi_elimination.h"
-#include "base/arena_containers.h"
#include "base/arena_bit_vector.h"
+#include "base/arena_containers.h"
#include "base/bit_vector-inl.h"
namespace art {
diff --git a/compiler/utils/arm/jni_macro_assembler_arm_vixl.cc b/compiler/utils/arm/jni_macro_assembler_arm_vixl.cc
index bebe64c..ed57ca6 100644
--- a/compiler/utils/arm/jni_macro_assembler_arm_vixl.cc
+++ b/compiler/utils/arm/jni_macro_assembler_arm_vixl.cc
@@ -14,10 +14,11 @@
* limitations under the License.
*/
+#include "jni_macro_assembler_arm_vixl.h"
+
#include <iostream>
#include <type_traits>
-#include "jni_macro_assembler_arm_vixl.h"
#include "entrypoints/quick/quick_entrypoints.h"
#include "thread.h"
diff --git a/compiler/utils/arm/managed_register_arm_test.cc b/compiler/utils/arm/managed_register_arm_test.cc
index f5d4cc0..43b0b51 100644
--- a/compiler/utils/arm/managed_register_arm_test.cc
+++ b/compiler/utils/arm/managed_register_arm_test.cc
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#include "globals.h"
#include "managed_register_arm.h"
+#include "globals.h"
#include "gtest/gtest.h"
namespace art {
diff --git a/compiler/utils/arm64/assembler_arm64.h b/compiler/utils/arm64/assembler_arm64.h
index 66a7fed..5b8a34e 100644
--- a/compiler/utils/arm64/assembler_arm64.h
+++ b/compiler/utils/arm64/assembler_arm64.h
@@ -23,9 +23,9 @@
#include "base/arena_containers.h"
#include "base/logging.h"
+#include "offsets.h"
#include "utils/arm64/managed_register_arm64.h"
#include "utils/assembler.h"
-#include "offsets.h"
// TODO(VIXL): Make VIXL compile with -Wshadow.
#pragma GCC diagnostic push
diff --git a/compiler/utils/arm64/jni_macro_assembler_arm64.h b/compiler/utils/arm64/jni_macro_assembler_arm64.h
index 264e99a..baf0434 100644
--- a/compiler/utils/arm64/jni_macro_assembler_arm64.h
+++ b/compiler/utils/arm64/jni_macro_assembler_arm64.h
@@ -25,9 +25,9 @@
#include "base/arena_containers.h"
#include "base/enums.h"
#include "base/logging.h"
+#include "offsets.h"
#include "utils/assembler.h"
#include "utils/jni_macro_assembler.h"
-#include "offsets.h"
// TODO(VIXL): Make VIXL compile with -Wshadow.
#pragma GCC diagnostic push
diff --git a/compiler/utils/arm64/managed_register_arm64_test.cc b/compiler/utils/arm64/managed_register_arm64_test.cc
index 79076b8..2a79313 100644
--- a/compiler/utils/arm64/managed_register_arm64_test.cc
+++ b/compiler/utils/arm64/managed_register_arm64_test.cc
@@ -14,9 +14,10 @@
* limitations under the License.
*/
-#include "globals.h"
-#include "assembler_arm64.h"
#include "managed_register_arm64.h"
+
+#include "assembler_arm64.h"
+#include "globals.h"
#include "gtest/gtest.h"
namespace art {
diff --git a/compiler/utils/assembler_test.h b/compiler/utils/assembler_test.h
index f655994..ef53d72 100644
--- a/compiler/utils/assembler_test.h
+++ b/compiler/utils/assembler_test.h
@@ -19,14 +19,15 @@
#include "assembler.h"
-#include "assembler_test_base.h"
-#include "common_runtime_test.h" // For ScratchFile
+#include <sys/stat.h>
#include <cstdio>
#include <cstdlib>
#include <fstream>
#include <iterator>
-#include <sys/stat.h>
+
+#include "assembler_test_base.h"
+#include "common_runtime_test.h" // For ScratchFile
namespace art {
diff --git a/compiler/utils/assembler_test_base.h b/compiler/utils/assembler_test_base.h
index d76cb1c..2ef43bd 100644
--- a/compiler/utils/assembler_test_base.h
+++ b/compiler/utils/assembler_test_base.h
@@ -17,11 +17,11 @@
#ifndef ART_COMPILER_UTILS_ASSEMBLER_TEST_BASE_H_
#define ART_COMPILER_UTILS_ASSEMBLER_TEST_BASE_H_
+#include <sys/stat.h>
#include <cstdio>
#include <cstdlib>
#include <fstream>
#include <iterator>
-#include <sys/stat.h>
#include "android-base/strings.h"
diff --git a/compiler/utils/assembler_thumb_test.cc b/compiler/utils/assembler_thumb_test.cc
index 741beab..e51b622 100644
--- a/compiler/utils/assembler_thumb_test.cc
+++ b/compiler/utils/assembler_thumb_test.cc
@@ -16,10 +16,10 @@
#include <dirent.h>
#include <errno.h>
-#include <fstream>
-#include <map>
#include <string.h>
#include <sys/types.h>
+#include <fstream>
+#include <map>
#include "gtest/gtest.h"
diff --git a/compiler/utils/dedupe_set-inl.h b/compiler/utils/dedupe_set-inl.h
index c06e9ca..c866504 100644
--- a/compiler/utils/dedupe_set-inl.h
+++ b/compiler/utils/dedupe_set-inl.h
@@ -19,14 +19,15 @@
#include "dedupe_set.h"
-#include <algorithm>
#include <inttypes.h>
+
+#include <algorithm>
#include <unordered_map>
#include "android-base/stringprintf.h"
-#include "base/mutex.h"
#include "base/hash_set.h"
+#include "base/mutex.h"
#include "base/stl_util.h"
#include "base/time_utils.h"
diff --git a/compiler/utils/dedupe_set.h b/compiler/utils/dedupe_set.h
index b62f216..3baa061 100644
--- a/compiler/utils/dedupe_set.h
+++ b/compiler/utils/dedupe_set.h
@@ -17,8 +17,8 @@
#ifndef ART_COMPILER_UTILS_DEDUPE_SET_H_
#define ART_COMPILER_UTILS_DEDUPE_SET_H_
-#include <memory>
#include <stdint.h>
+#include <memory>
#include <string>
#include "base/macros.h"
diff --git a/compiler/utils/jni_macro_assembler_test.h b/compiler/utils/jni_macro_assembler_test.h
index 293f4cd..6129680 100644
--- a/compiler/utils/jni_macro_assembler_test.h
+++ b/compiler/utils/jni_macro_assembler_test.h
@@ -22,11 +22,12 @@
#include "assembler_test_base.h"
#include "common_runtime_test.h" // For ScratchFile
+#include <sys/stat.h>
+
#include <cstdio>
#include <cstdlib>
#include <fstream>
#include <iterator>
-#include <sys/stat.h>
namespace art {
diff --git a/compiler/utils/swap_space.cc b/compiler/utils/swap_space.cc
index 621a652..12d113d 100644
--- a/compiler/utils/swap_space.cc
+++ b/compiler/utils/swap_space.cc
@@ -16,9 +16,10 @@
#include "swap_space.h"
+#include <sys/mman.h>
+
#include <algorithm>
#include <numeric>
-#include <sys/mman.h>
#include "base/bit_utils.h"
#include "base/logging.h"
diff --git a/compiler/utils/swap_space.h b/compiler/utils/swap_space.h
index 0ff9fc6..08e243b 100644
--- a/compiler/utils/swap_space.h
+++ b/compiler/utils/swap_space.h
@@ -17,12 +17,12 @@
#ifndef ART_COMPILER_UTILS_SWAP_SPACE_H_
#define ART_COMPILER_UTILS_SWAP_SPACE_H_
+#include <stddef.h>
+#include <stdint.h>
#include <cstdlib>
#include <list>
-#include <vector>
#include <set>
-#include <stdint.h>
-#include <stddef.h>
+#include <vector>
#include "base/logging.h"
#include "base/macros.h"
diff --git a/compiler/utils/swap_space_test.cc b/compiler/utils/swap_space_test.cc
index bf50ac3..f4bca59 100644
--- a/compiler/utils/swap_space_test.cc
+++ b/compiler/utils/swap_space_test.cc
@@ -16,10 +16,12 @@
#include "utils/swap_space.h"
-#include <cstdio>
-#include <sys/types.h>
-#include <sys/stat.h>
#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
+#include <cstdio>
+
#include "gtest/gtest.h"
#include "base/unix_file/fd_file.h"
diff --git a/compiler/utils/test_dex_file_builder.h b/compiler/utils/test_dex_file_builder.h
index 6921780..9ba3903 100644
--- a/compiler/utils/test_dex_file_builder.h
+++ b/compiler/utils/test_dex_file_builder.h
@@ -17,12 +17,13 @@
#ifndef ART_COMPILER_UTILS_TEST_DEX_FILE_BUILDER_H_
#define ART_COMPILER_UTILS_TEST_DEX_FILE_BUILDER_H_
-#include <cstring>
-#include <set>
-#include <map>
-#include <vector>
#include <zlib.h>
+#include <cstring>
+#include <map>
+#include <set>
+#include <vector>
+
#include "base/bit_utils.h"
#include "base/logging.h"
#include "dex_file.h"
diff --git a/compiler/utils/x86/jni_macro_assembler_x86.cc b/compiler/utils/x86/jni_macro_assembler_x86.cc
index cfdf80b..e074346 100644
--- a/compiler/utils/x86/jni_macro_assembler_x86.cc
+++ b/compiler/utils/x86/jni_macro_assembler_x86.cc
@@ -16,10 +16,10 @@
#include "jni_macro_assembler_x86.h"
-#include "utils/assembler.h"
#include "base/casts.h"
#include "entrypoints/quick/quick_entrypoints.h"
#include "thread.h"
+#include "utils/assembler.h"
namespace art {
namespace x86 {
diff --git a/compiler/utils/x86/managed_register_x86_test.cc b/compiler/utils/x86/managed_register_x86_test.cc
index 4fbafda..0ed5c36 100644
--- a/compiler/utils/x86/managed_register_x86_test.cc
+++ b/compiler/utils/x86/managed_register_x86_test.cc
@@ -14,8 +14,9 @@
* limitations under the License.
*/
-#include "globals.h"
#include "managed_register_x86.h"
+
+#include "globals.h"
#include "gtest/gtest.h"
namespace art {
diff --git a/compiler/utils/x86_64/managed_register_x86_64_test.cc b/compiler/utils/x86_64/managed_register_x86_64_test.cc
index 2dc7581..e43d717 100644
--- a/compiler/utils/x86_64/managed_register_x86_64_test.cc
+++ b/compiler/utils/x86_64/managed_register_x86_64_test.cc
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#include "globals.h"
#include "managed_register_x86_64.h"
+#include "globals.h"
#include "gtest/gtest.h"
namespace art {