From 68498cefe602bf5364168b4acd0bd5806cdd72ec Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 21 Jul 2001 23:24:48 +0000 Subject: [PATCH] Eliminate lots of unnecessary #includes and forward decls there are probably more to kill git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/MachineInstr.h | 22 +------------------ include/llvm/CodeGen/Sparc.h | 15 ------------- include/llvm/CodeGen/TargetMachine.h | 11 +--------- include/llvm/DerivedTypes.h | 5 +---- lib/CodeGen/InstrSelection/InstrForest.cpp | 3 --- lib/CodeGen/MachineInstr.cpp | 18 +++------------ lib/CodeGen/TargetMachine/Sparc/Sparc.cpp | 7 ------ lib/CodeGen/TargetMachine/TargetMachine.cpp | 11 +--------- .../SparcV9/InstrSelection/InstrForest.cpp | 3 --- 9 files changed, 7 insertions(+), 88 deletions(-) diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h index 19b3c08985d..3a28a1ee0b1 100644 --- a/include/llvm/CodeGen/MachineInstr.h +++ b/include/llvm/CodeGen/MachineInstr.h @@ -15,31 +15,11 @@ #ifndef LLVM_CODEGEN_MACHINEINSTR_H #define LLVM_CODEGEN_MACHINEINSTR_H -//************************** System Include Files **************************/ - -#include -#include - -//*************************** User Include Files ***************************/ - +#include "llvm/CodeGen/InstrForest.h" #include "llvm/Tools/DataTypes.h" -#include "llvm/Instruction.h" #include "llvm/Support/Unique.h" #include "llvm/CodeGen/TargetMachine.h" - -//************************* Opaque Declarations ****************************/ - -class Value; -class InstrTreeNode; -class InstructionNode; -class MachineInstr; -class MachineInstrInfo; -class MachineOperand; - - -//************************ Exported Data Types *****************************/ - //--------------------------------------------------------------------------- // class MachineOperand // diff --git a/include/llvm/CodeGen/Sparc.h b/include/llvm/CodeGen/Sparc.h index f623bc26994..3eab4048cfe 100644 --- a/include/llvm/CodeGen/Sparc.h +++ b/include/llvm/CodeGen/Sparc.h @@ -12,19 +12,7 @@ #ifndef LLVM_CODEGEN_SPARC_H #define LLVM_CODEGEN_SPARC_H -//************************** System Include Files **************************/ - -//*************************** User Include Files ***************************/ - #include "llvm/CodeGen/TargetMachine.h" -#include "llvm/CodeGen/MachineInstr.h" - - -//************************* Opaque Declarations ****************************/ - - -//************************ Exported Constants ******************************/ - // OpCodeMask definitions for the Sparc V9 // @@ -33,9 +21,6 @@ const OpCodeMask Annul = 0x20000000; // annul delay instr? const OpCodeMask PredictTaken = 0x00080000; // predict branch taken? -//************************ Exported Data Types *****************************/ - - //--------------------------------------------------------------------------- // class UltraSparcMachine // diff --git a/include/llvm/CodeGen/TargetMachine.h b/include/llvm/CodeGen/TargetMachine.h index 72545f88e96..97bcc54e25a 100644 --- a/include/llvm/CodeGen/TargetMachine.h +++ b/include/llvm/CodeGen/TargetMachine.h @@ -12,21 +12,12 @@ #ifndef LLVM_CODEGEN_TARGETMACHINE_H #define LLVM_CODEGEN_TARGETMACHINE_H -//************************** System Include Files **************************/ - -//*************************** User Include Files ***************************/ - #include "llvm/Support/Unique.h" #include "llvm/Tools/DataTypes.h" - -//************************* Opaque Declarations ****************************/ +#include class Type; class StructType; -class MachineInstrInfo; - - -//************************ Exported Data Types *****************************/ //--------------------------------------------------------------------------- diff --git a/include/llvm/DerivedTypes.h b/include/llvm/DerivedTypes.h index a28210ba954..405a632d359 100644 --- a/include/llvm/DerivedTypes.h +++ b/include/llvm/DerivedTypes.h @@ -13,10 +13,7 @@ #include "llvm/Type.h" #include "llvm/CodeGen/TargetMachine.h" -#include "vector" - -class TargetMachine; - +#include // Future derived types: SIMD packed format diff --git a/lib/CodeGen/InstrSelection/InstrForest.cpp b/lib/CodeGen/InstrSelection/InstrForest.cpp index a90da0b584b..5701ba4e114 100644 --- a/lib/CodeGen/InstrSelection/InstrForest.cpp +++ b/lib/CodeGen/InstrSelection/InstrForest.cpp @@ -25,7 +25,6 @@ //*************************** User Include Files ***************************/ #include "llvm/CodeGen/InstrForest.h" -#include "llvm/Module.h" #include "llvm/Method.h" #include "llvm/iTerminators.h" #include "llvm/iMemory.h" @@ -33,8 +32,6 @@ #include "llvm/BasicBlock.h" #include "llvm/CodeGen/MachineInstr.h" -//************************ Class Implementations **************************/ - //------------------------------------------------------------------------ // class InstrTreeNode diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp index e8897bf2e96..d48f2d4e357 100644 --- a/lib/CodeGen/MachineInstr.cpp +++ b/lib/CodeGen/MachineInstr.cpp @@ -12,22 +12,10 @@ // 7/2/01 - Vikram Adve - Created //**************************************************************************/ - -//************************** System Include Files **************************/ - -#include -#include -#include - -//*************************** User Include Files ***************************/ - -#include "llvm/Type.h" -#include "llvm/DerivedTypes.h" -#include "llvm/ConstPoolVals.h" -#include "llvm/Value.h" -#include "llvm/Instruction.h" -#include "llvm/CodeGen/InstrForest.h" #include "llvm/CodeGen/MachineInstr.h" +#include "llvm/ConstPoolVals.h" +#include "llvm/Instruction.h" +#include //************************ Class Implementations **************************/ diff --git a/lib/CodeGen/TargetMachine/Sparc/Sparc.cpp b/lib/CodeGen/TargetMachine/Sparc/Sparc.cpp index c687da73d88..68270fae601 100644 --- a/lib/CodeGen/TargetMachine/Sparc/Sparc.cpp +++ b/lib/CodeGen/TargetMachine/Sparc/Sparc.cpp @@ -9,15 +9,8 @@ // 7/15/01 - Vikram Adve - Created //**************************************************************************/ - -//************************** System Include Files **************************/ - -//*************************** User Include Files ***************************/ - -#include "llvm/DerivedTypes.h" #include "llvm/CodeGen/Sparc.h" - //************************ Exported Constants ******************************/ diff --git a/lib/CodeGen/TargetMachine/TargetMachine.cpp b/lib/CodeGen/TargetMachine/TargetMachine.cpp index 9b9729c1acf..653f0217cd8 100644 --- a/lib/CodeGen/TargetMachine/TargetMachine.cpp +++ b/lib/CodeGen/TargetMachine/TargetMachine.cpp @@ -10,23 +10,14 @@ //**************************************************************************/ -//************************** System Include Files **************************/ - //*************************** User Include Files ***************************/ -#include "llvm/DerivedTypes.h" #include "llvm/CodeGen/TargetMachine.h" - - -//************************* Opaque Declarations ****************************/ - -class StructType; -class MachineInstrInfo; +#include "llvm/DerivedTypes.h" //************************ Class Implementations **************************/ - //--------------------------------------------------------------------------- // function TargetMachine::findOptimalMemberOffsets // diff --git a/lib/Target/SparcV9/InstrSelection/InstrForest.cpp b/lib/Target/SparcV9/InstrSelection/InstrForest.cpp index a90da0b584b..5701ba4e114 100644 --- a/lib/Target/SparcV9/InstrSelection/InstrForest.cpp +++ b/lib/Target/SparcV9/InstrSelection/InstrForest.cpp @@ -25,7 +25,6 @@ //*************************** User Include Files ***************************/ #include "llvm/CodeGen/InstrForest.h" -#include "llvm/Module.h" #include "llvm/Method.h" #include "llvm/iTerminators.h" #include "llvm/iMemory.h" @@ -33,8 +32,6 @@ #include "llvm/BasicBlock.h" #include "llvm/CodeGen/MachineInstr.h" -//************************ Class Implementations **************************/ - //------------------------------------------------------------------------ // class InstrTreeNode