From 07000c6f01d8f57170f2d4c77a86d934bdc5c696 Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Fri, 12 May 2006 06:33:49 +0000 Subject: [PATCH] Refactor a bunch of includes so that TargetMachine.h doesn't have to include TargetData.h. This should make recompiles a bit faster with my current TargetData tinkering. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28238 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Target/TargetMachine.h | 4 +++- lib/CodeGen/AsmPrinter.cpp | 1 + lib/CodeGen/DwarfWriter.cpp | 1 + lib/CodeGen/ELFWriter.cpp | 1 + lib/CodeGen/MachineBasicBlock.cpp | 1 + lib/CodeGen/MachineFunction.cpp | 1 + lib/CodeGen/SelectionDAG/ScheduleDAG.cpp | 1 + lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp | 1 + lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp | 1 + lib/CodeGen/SelectionDAG/ScheduleDAGSimple.cpp | 1 + lib/CodeGen/SelectionDAG/TargetLowering.cpp | 1 + lib/ExecutionEngine/JIT/JIT.cpp | 1 + lib/Target/Alpha/AlphaTargetMachine.h | 1 + lib/Target/CBackend/CTargetMachine.h | 1 + lib/Target/IA64/IA64TargetMachine.h | 1 + lib/Target/PowerPC/PPCTargetMachine.h | 1 + lib/Target/Sparc/SparcAsmPrinter.cpp | 1 + lib/Target/Sparc/SparcTargetMachine.h | 1 + lib/Target/X86/X86TargetMachine.h | 1 + tools/llc/llc.cpp | 1 + tools/opt/opt.cpp | 1 + 21 files changed, 23 insertions(+), 1 deletion(-) diff --git a/include/llvm/Target/TargetMachine.h b/include/llvm/Target/TargetMachine.h index 31f5f3c9139..53912faefd2 100644 --- a/include/llvm/Target/TargetMachine.h +++ b/include/llvm/Target/TargetMachine.h @@ -14,12 +14,13 @@ #ifndef LLVM_TARGET_TARGETMACHINE_H #define LLVM_TARGET_TARGETMACHINE_H -#include "llvm/Target/TargetData.h" #include "llvm/Target/TargetInstrItineraries.h" #include +#include namespace llvm { +class TargetData; class TargetSubtarget; class TargetInstrInfo; class TargetInstrDescriptor; @@ -28,6 +29,7 @@ class TargetLowering; class TargetFrameInfo; class MachineCodeEmitter; class MRegisterInfo; +class Module; class FunctionPassManager; class PassManager; class Pass; diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp index db677939248..3048602e12b 100644 --- a/lib/CodeGen/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter.cpp @@ -20,6 +20,7 @@ #include "llvm/CodeGen/MachineJumpTableInfo.h" #include "llvm/Support/Mangler.h" #include "llvm/Support/MathExtras.h" +#include "llvm/Target/TargetData.h" #include "llvm/Target/TargetMachine.h" #include #include diff --git a/lib/CodeGen/DwarfWriter.cpp b/lib/CodeGen/DwarfWriter.cpp index 5a664ff367c..9aff4382ea5 100644 --- a/lib/CodeGen/DwarfWriter.cpp +++ b/lib/CodeGen/DwarfWriter.cpp @@ -24,6 +24,7 @@ #include "llvm/Support/CommandLine.h" #include "llvm/Support/Mangler.h" #include "llvm/Target/MRegisterInfo.h" +#include "llvm/Target/TargetData.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetFrameInfo.h" diff --git a/lib/CodeGen/ELFWriter.cpp b/lib/CodeGen/ELFWriter.cpp index bf3c5882c40..4f041c27375 100644 --- a/lib/CodeGen/ELFWriter.cpp +++ b/lib/CodeGen/ELFWriter.cpp @@ -35,6 +35,7 @@ #include "llvm/Module.h" #include "llvm/CodeGen/MachineCodeEmitter.h" #include "llvm/CodeGen/MachineConstantPool.h" +#include "llvm/Target/TargetData.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Support/Mangler.h" #include diff --git a/lib/CodeGen/MachineBasicBlock.cpp b/lib/CodeGen/MachineBasicBlock.cpp index ee8da6744e3..84d2657891b 100644 --- a/lib/CodeGen/MachineBasicBlock.cpp +++ b/lib/CodeGen/MachineBasicBlock.cpp @@ -15,6 +15,7 @@ #include "llvm/BasicBlock.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineInstr.h" +#include "llvm/Target/TargetData.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Support/LeakDetector.h" diff --git a/lib/CodeGen/MachineFunction.cpp b/lib/CodeGen/MachineFunction.cpp index 02646de18fd..f5df4e8f65f 100644 --- a/lib/CodeGen/MachineFunction.cpp +++ b/lib/CodeGen/MachineFunction.cpp @@ -20,6 +20,7 @@ #include "llvm/CodeGen/MachineConstantPool.h" #include "llvm/CodeGen/MachineJumpTableInfo.h" #include "llvm/CodeGen/Passes.h" +#include "llvm/Target/TargetData.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetFrameInfo.h" #include "llvm/Function.h" diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp index 8a32fee1eb5..5100f3a3dcf 100644 --- a/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp +++ b/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp @@ -18,6 +18,7 @@ #include "llvm/CodeGen/MachineConstantPool.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/SSARegMap.h" +#include "llvm/Target/TargetData.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetLowering.h" diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp index 34136d847ce..c9aa18a342e 100644 --- a/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp +++ b/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp @@ -22,6 +22,7 @@ #include "llvm/CodeGen/ScheduleDAG.h" #include "llvm/CodeGen/SSARegMap.h" #include "llvm/Target/MRegisterInfo.h" +#include "llvm/Target/TargetData.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Support/Debug.h" diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp index 9b359aa189a..ee47e67e01a 100644 --- a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp +++ b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp @@ -19,6 +19,7 @@ #include "llvm/CodeGen/ScheduleDAG.h" #include "llvm/CodeGen/SSARegMap.h" #include "llvm/Target/MRegisterInfo.h" +#include "llvm/Target/TargetData.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Support/Debug.h" diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGSimple.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGSimple.cpp index 0a92b40fb94..c6ea68e95a5 100644 --- a/lib/CodeGen/SelectionDAG/ScheduleDAGSimple.cpp +++ b/lib/CodeGen/SelectionDAG/ScheduleDAGSimple.cpp @@ -16,6 +16,7 @@ #define DEBUG_TYPE "sched" #include "llvm/CodeGen/ScheduleDAG.h" #include "llvm/CodeGen/SelectionDAG.h" +#include "llvm/Target/TargetData.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Support/Debug.h" diff --git a/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/lib/CodeGen/SelectionDAG/TargetLowering.cpp index bbe8e95b785..50d2dfb16e4 100644 --- a/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/lib/CodeGen/SelectionDAG/TargetLowering.cpp @@ -12,6 +12,7 @@ //===----------------------------------------------------------------------===// #include "llvm/Target/TargetLowering.h" +#include "llvm/Target/TargetData.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/MRegisterInfo.h" #include "llvm/DerivedTypes.h" diff --git a/lib/ExecutionEngine/JIT/JIT.cpp b/lib/ExecutionEngine/JIT/JIT.cpp index 022bd658c21..738b3a8547a 100644 --- a/lib/ExecutionEngine/JIT/JIT.cpp +++ b/lib/ExecutionEngine/JIT/JIT.cpp @@ -24,6 +24,7 @@ #include "llvm/ExecutionEngine/GenericValue.h" #include "llvm/Support/MutexGuard.h" #include "llvm/System/DynamicLibrary.h" +#include "llvm/Target/TargetData.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetJITInfo.h" #include diff --git a/lib/Target/Alpha/AlphaTargetMachine.h b/lib/Target/Alpha/AlphaTargetMachine.h index 6e23868172c..413a99464a6 100644 --- a/lib/Target/Alpha/AlphaTargetMachine.h +++ b/lib/Target/Alpha/AlphaTargetMachine.h @@ -15,6 +15,7 @@ #define ALPHA_TARGETMACHINE_H #include "llvm/Target/TargetMachine.h" +#include "llvm/Target/TargetData.h" #include "llvm/Target/TargetFrameInfo.h" #include "llvm/PassManager.h" #include "AlphaInstrInfo.h" diff --git a/lib/Target/CBackend/CTargetMachine.h b/lib/Target/CBackend/CTargetMachine.h index 98ea0cb267f..ad0959f4821 100644 --- a/lib/Target/CBackend/CTargetMachine.h +++ b/lib/Target/CBackend/CTargetMachine.h @@ -15,6 +15,7 @@ #define CTARGETMACHINE_H #include "llvm/Target/TargetMachine.h" +#include "llvm/Target/TargetData.h" namespace llvm { diff --git a/lib/Target/IA64/IA64TargetMachine.h b/lib/Target/IA64/IA64TargetMachine.h index ad5c0575e97..07d581b3de2 100644 --- a/lib/Target/IA64/IA64TargetMachine.h +++ b/lib/Target/IA64/IA64TargetMachine.h @@ -15,6 +15,7 @@ #define IA64TARGETMACHINE_H #include "llvm/Target/TargetMachine.h" +#include "llvm/Target/TargetData.h" #include "llvm/Target/TargetFrameInfo.h" #include "llvm/PassManager.h" #include "IA64InstrInfo.h" diff --git a/lib/Target/PowerPC/PPCTargetMachine.h b/lib/Target/PowerPC/PPCTargetMachine.h index e4893a86dd0..ea42989293b 100644 --- a/lib/Target/PowerPC/PPCTargetMachine.h +++ b/lib/Target/PowerPC/PPCTargetMachine.h @@ -20,6 +20,7 @@ #include "PPCInstrInfo.h" #include "PPCISelLowering.h" #include "llvm/Target/TargetMachine.h" +#include "llvm/Target/TargetData.h" namespace llvm { class PassManager; diff --git a/lib/Target/Sparc/SparcAsmPrinter.cpp b/lib/Target/Sparc/SparcAsmPrinter.cpp index da2a31e20d9..0de7fb032bb 100644 --- a/lib/Target/Sparc/SparcAsmPrinter.cpp +++ b/lib/Target/Sparc/SparcAsmPrinter.cpp @@ -22,6 +22,7 @@ #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineConstantPool.h" #include "llvm/CodeGen/MachineInstr.h" +#include "llvm/Target/TargetData.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Support/Mangler.h" #include "llvm/ADT/Statistic.h" diff --git a/lib/Target/Sparc/SparcTargetMachine.h b/lib/Target/Sparc/SparcTargetMachine.h index 7d30dd829f3..c2988fbf4bf 100644 --- a/lib/Target/Sparc/SparcTargetMachine.h +++ b/lib/Target/Sparc/SparcTargetMachine.h @@ -15,6 +15,7 @@ #define SPARCTARGETMACHINE_H #include "llvm/Target/TargetMachine.h" +#include "llvm/Target/TargetData.h" #include "llvm/Target/TargetFrameInfo.h" #include "llvm/PassManager.h" #include "SparcInstrInfo.h" diff --git a/lib/Target/X86/X86TargetMachine.h b/lib/Target/X86/X86TargetMachine.h index 2fe01737788..d891aed6a7c 100644 --- a/lib/Target/X86/X86TargetMachine.h +++ b/lib/Target/X86/X86TargetMachine.h @@ -15,6 +15,7 @@ #define X86TARGETMACHINE_H #include "llvm/Target/TargetMachine.h" +#include "llvm/Target/TargetData.h" #include "llvm/Target/TargetFrameInfo.h" #include "llvm/PassManager.h" #include "X86.h" diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp index 1df22ac0c79..6a66e52f547 100644 --- a/tools/llc/llc.cpp +++ b/tools/llc/llc.cpp @@ -15,6 +15,7 @@ #include "llvm/Bytecode/Reader.h" #include "llvm/Target/SubtargetFeature.h" +#include "llvm/Target/TargetData.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetMachineRegistry.h" #include "llvm/Transforms/Scalar.h" diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp index 566748848a3..b6ededd9ddd 100644 --- a/tools/opt/opt.cpp +++ b/tools/opt/opt.cpp @@ -18,6 +18,7 @@ #include "llvm/Bytecode/WriteBytecodePass.h" #include "llvm/Assembly/PrintModulePass.h" #include "llvm/Analysis/Verifier.h" +#include "llvm/Target/TargetData.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Support/PassNameParser.h" #include "llvm/System/Signals.h"