From 7f9a0c3c3878c8e613ca518eb0cecb3553780cb0 Mon Sep 17 00:00:00 2001 From: Mat M Date: Sat, 3 Sep 2016 16:48:03 -0400 Subject: [PATCH] Remove unnecessary explicit includes (#16) --- src/backend_x64/emit_x64.cpp | 5 ++++- src/backend_x64/emit_x64.h | 12 ++++++++---- src/backend_x64/interface_x64.cpp | 2 +- src/backend_x64/reg_alloc.cpp | 1 - src/backend_x64/reg_alloc.h | 2 -- src/common/bit_util.h | 2 +- src/common/intrusive_list.h | 2 +- src/common/memory_pool.h | 3 +-- src/common/mp.h | 2 +- src/frontend/ir/ir_emitter.cpp | 3 ++- src/frontend/ir/ir_emitter.h | 3 ++- src/ir_opt/dead_code_elimination_pass.cpp | 2 -- 12 files changed, 21 insertions(+), 18 deletions(-) diff --git a/src/backend_x64/emit_x64.cpp b/src/backend_x64/emit_x64.cpp index fbd669f9..cd9fb324 100644 --- a/src/backend_x64/emit_x64.cpp +++ b/src/backend_x64/emit_x64.cpp @@ -4,14 +4,17 @@ * General Public License version 2 or any later version. */ -#include #include #include +#include + #include "backend_x64/abi.h" #include "backend_x64/emit_x64.h" #include "backend_x64/jitstate.h" #include "frontend/arm_types.h" +#include "frontend/ir/basic_block.h" +#include "frontend/ir/microinstruction.h" // TODO: Have ARM flags in host flags and not have them use up GPR registers unless necessary. // TODO: Actually implement that proper instruction selector you've always wanted to sweetheart. diff --git a/src/backend_x64/emit_x64.h b/src/backend_x64/emit_x64.h index 6ef86439..6b6ce997 100644 --- a/src/backend_x64/emit_x64.h +++ b/src/backend_x64/emit_x64.h @@ -6,22 +6,26 @@ #pragma once -#include #include #include #include -#include #include "backend_x64/block_of_code.h" #include "backend_x64/reg_alloc.h" #include "dynarmic/callbacks.h" #include "frontend/arm_types.h" -#include "frontend/ir/basic_block.h" -#include "frontend/ir/microinstruction.h" #include "frontend/ir/terminal.h" namespace Dynarmic { + +class Jit; + +namespace IR { +class Block; +class Inst; +} // namespace IR + namespace BackendX64 { class EmitX64 final { diff --git a/src/backend_x64/interface_x64.cpp b/src/backend_x64/interface_x64.cpp index 2fa41fe7..65058643 100644 --- a/src/backend_x64/interface_x64.cpp +++ b/src/backend_x64/interface_x64.cpp @@ -17,11 +17,11 @@ #include "backend_x64/emit_x64.h" #include "backend_x64/jitstate.h" #include "common/assert.h" -#include "common/bit_util.h" #include "common/common_types.h" #include "common/scope_exit.h" #include "dynarmic/dynarmic.h" #include "frontend/arm_types.h" +#include "frontend/ir/basic_block.h" #include "frontend/translate/translate.h" #include "ir_opt/passes.h" diff --git a/src/backend_x64/reg_alloc.cpp b/src/backend_x64/reg_alloc.cpp index 889d92ac..9800e022 100644 --- a/src/backend_x64/reg_alloc.cpp +++ b/src/backend_x64/reg_alloc.cpp @@ -5,7 +5,6 @@ */ #include -#include #include diff --git a/src/backend_x64/reg_alloc.h b/src/backend_x64/reg_alloc.h index dc92aecb..a528b6c9 100644 --- a/src/backend_x64/reg_alloc.h +++ b/src/backend_x64/reg_alloc.h @@ -7,7 +7,6 @@ #pragma once #include -#include #include #include @@ -15,7 +14,6 @@ #include "backend_x64/block_of_code.h" #include "backend_x64/hostloc.h" -#include "backend_x64/jitstate.h" #include "common/common_types.h" #include "frontend/ir/microinstruction.h" #include "frontend/ir/value.h" diff --git a/src/common/bit_util.h b/src/common/bit_util.h index 3e9c1750..eae8748c 100644 --- a/src/common/bit_util.h +++ b/src/common/bit_util.h @@ -8,9 +8,9 @@ #include #include +#include #include "common/assert.h" -#include "common/common_types.h" #ifdef _MSC_VER #include diff --git a/src/common/intrusive_list.h b/src/common/intrusive_list.h index 7123caca..9fd2bc66 100644 --- a/src/common/intrusive_list.h +++ b/src/common/intrusive_list.h @@ -6,12 +6,12 @@ #pragma once +#include #include #include #include #include "common/assert.h" -#include "common/common_types.h" namespace Dynarmic { namespace Common { diff --git a/src/common/memory_pool.h b/src/common/memory_pool.h index 43b440da..fc64958b 100644 --- a/src/common/memory_pool.h +++ b/src/common/memory_pool.h @@ -6,10 +6,9 @@ #pragma once +#include #include -#include "common/common_types.h" - namespace Dynarmic { namespace Common { diff --git a/src/common/mp.h b/src/common/mp.h index 8f72df69..cdf1b147 100644 --- a/src/common/mp.h +++ b/src/common/mp.h @@ -6,8 +6,8 @@ #pragma once +#include #include -#include "common/common_types.h" namespace Dynarmic { namespace mp { diff --git a/src/frontend/ir/ir_emitter.cpp b/src/frontend/ir/ir_emitter.cpp index 2258b79c..8c92119c 100644 --- a/src/frontend/ir/ir_emitter.cpp +++ b/src/frontend/ir/ir_emitter.cpp @@ -5,7 +5,8 @@ */ #include "common/assert.h" -#include "ir_emitter.h" +#include "frontend/ir/ir_emitter.h" +#include "frontend/ir/opcodes.h" namespace Dynarmic { namespace IR { diff --git a/src/frontend/ir/ir_emitter.h b/src/frontend/ir/ir_emitter.h index f7194aa8..6a0b8df1 100644 --- a/src/frontend/ir/ir_emitter.h +++ b/src/frontend/ir/ir_emitter.h @@ -11,7 +11,6 @@ #include "common/common_types.h" #include "frontend/arm_types.h" #include "frontend/ir/basic_block.h" -#include "frontend/ir/opcodes.h" #include "frontend/ir/terminal.h" #include "frontend/ir/value.h" @@ -25,6 +24,8 @@ namespace Dynarmic { namespace IR { +enum class Opcode; + /** * Convenience class to construct a basic block of the intermediate representation. * `block` is the resulting block. diff --git a/src/ir_opt/dead_code_elimination_pass.cpp b/src/ir_opt/dead_code_elimination_pass.cpp index d1d8441c..7a65bdc3 100644 --- a/src/ir_opt/dead_code_elimination_pass.cpp +++ b/src/ir_opt/dead_code_elimination_pass.cpp @@ -4,9 +4,7 @@ * General Public License version 2 or any later version. */ -#include "common/assert.h" #include "frontend/ir/basic_block.h" -#include "frontend/ir/opcodes.h" #include "ir_opt/passes.h" namespace Dynarmic {