From: Dan Gohman Date: Mon, 5 Jan 2009 17:59:02 +0000 (+0000) Subject: Tidy up #includes, deleting a bunch of unnecessary #includes. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d68a07650cdb2e18f18f362ba533459aa10e01b6;p=oota-llvm.git Tidy up #includes, deleting a bunch of unnecessary #includes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61715 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/ADT/FoldingSet.h b/include/llvm/ADT/FoldingSet.h index 4c93711394e..63f73b997d0 100644 --- a/include/llvm/ADT/FoldingSet.h +++ b/include/llvm/ADT/FoldingSet.h @@ -457,6 +457,4 @@ template struct FoldingSetTrait { } // End of namespace llvm. - #endif - diff --git a/include/llvm/ADT/STLExtras.h b/include/llvm/ADT/STLExtras.h index acfeae54731..ca711b79822 100644 --- a/include/llvm/ADT/STLExtras.h +++ b/include/llvm/ADT/STLExtras.h @@ -19,7 +19,7 @@ #include #include // for std::pair -#include // for std::size_t +#include // for std::size_t #include "llvm/ADT/iterator.h" namespace llvm { diff --git a/include/llvm/ADT/SparseBitVector.h b/include/llvm/ADT/SparseBitVector.h index efd0accaad2..b4b53805c43 100644 --- a/include/llvm/ADT/SparseBitVector.h +++ b/include/llvm/ADT/SparseBitVector.h @@ -17,11 +17,11 @@ #include #include -#include #include "llvm/Support/DataTypes.h" #include "llvm/ADT/STLExtras.h" #include "llvm/Support/MathExtras.h" #include "llvm/ADT/ilist.h" + namespace llvm { /// SparseBitVector is an implementation of a bitvector that is sparse by only diff --git a/include/llvm/ADT/ilist.h b/include/llvm/ADT/ilist.h index 0acbf46a1aa..42d09c7b450 100644 --- a/include/llvm/ADT/ilist.h +++ b/include/llvm/ADT/ilist.h @@ -40,7 +40,6 @@ #include "llvm/ADT/iterator.h" #include -#include namespace llvm { @@ -366,7 +365,7 @@ public: } void swap(iplist &RHS) { - abort(); // Swap does not use list traits callback correctly yet! + assert(0 && "Swap does not use list traits callback correctly yet!"); std::swap(Head, RHS.Head); } diff --git a/include/llvm/Analysis/ConstantsScanner.h b/include/llvm/Analysis/ConstantsScanner.h index c52b24efe8b..bac551f0492 100644 --- a/include/llvm/Analysis/ConstantsScanner.h +++ b/include/llvm/Analysis/ConstantsScanner.h @@ -17,7 +17,6 @@ #define LLVM_ANALYSIS_CONSTANTSSCANNER_H #include "llvm/Support/InstIterator.h" -#include "llvm/Instruction.h" #include "llvm/ADT/iterator.h" namespace llvm { diff --git a/include/llvm/Analysis/DominatorInternals.h b/include/llvm/Analysis/DominatorInternals.h index 1564774adae..cca0d502b69 100644 --- a/include/llvm/Analysis/DominatorInternals.h +++ b/include/llvm/Analysis/DominatorInternals.h @@ -11,8 +11,8 @@ #define LLVM_ANALYSIS_DOMINATOR_INTERNALS_H #include "llvm/Analysis/Dominators.h" -#include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallPtrSet.h" + //===----------------------------------------------------------------------===// // // DominatorTree construction - This pass constructs immediate dominator diff --git a/include/llvm/Analysis/Dominators.h b/include/llvm/Analysis/Dominators.h index 94ab04eb56b..35cdb246518 100644 --- a/include/llvm/Analysis/Dominators.h +++ b/include/llvm/Analysis/Dominators.h @@ -24,7 +24,6 @@ #include "llvm/Pass.h" #include "llvm/BasicBlock.h" #include "llvm/Function.h" -#include "llvm/Instruction.h" #include "llvm/Instructions.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/GraphTraits.h" diff --git a/include/llvm/Analysis/EscapeAnalysis.h b/include/llvm/Analysis/EscapeAnalysis.h index 871630dd6d0..3f4da25310d 100644 --- a/include/llvm/Analysis/EscapeAnalysis.h +++ b/include/llvm/Analysis/EscapeAnalysis.h @@ -15,13 +15,13 @@ #define LLVM_ANALYSIS_ESCAPEANALYSIS_H #include "llvm/Pass.h" -#include "llvm/Instructions.h" -#include "llvm/Analysis/AliasAnalysis.h" -#include "llvm/Target/TargetData.h" #include namespace llvm { +class Instruction; +class Value; + /// EscapeAnalysis - This class determines whether an allocation (a MallocInst /// or an AllocaInst) can escape from the current function. It performs some /// precomputation, with the rest of the work happening on-demand. @@ -40,11 +40,7 @@ public: EscapePoints.clear(); } - void getAnalysisUsage(AnalysisUsage &AU) const { - AU.addRequiredTransitive(); - AU.addRequiredTransitive(); - AU.setPreservesAll(); - } + void getAnalysisUsage(AnalysisUsage &AU) const; //===--------------------------------------------------------------------- // Client API diff --git a/include/llvm/Analysis/FindUsedTypes.h b/include/llvm/Analysis/FindUsedTypes.h index 35e4e6f3f9e..c897af3a58a 100644 --- a/include/llvm/Analysis/FindUsedTypes.h +++ b/include/llvm/Analysis/FindUsedTypes.h @@ -20,6 +20,7 @@ namespace llvm { class Type; +class Value; class FindUsedTypes : public ModulePass { std::set UsedTypes; diff --git a/include/llvm/Analysis/LoopInfo.h b/include/llvm/Analysis/LoopInfo.h index 1b684d73d3c..5ba8a7a0042 100644 --- a/include/llvm/Analysis/LoopInfo.h +++ b/include/llvm/Analysis/LoopInfo.h @@ -54,8 +54,6 @@ static void RemoveFromVector(std::vector &V, T *N) { class DominatorTree; class LoopInfo; -class PHINode; -class Instruction; template class LoopInfoBase; template class LoopBase; diff --git a/include/llvm/Analysis/ScalarEvolutionExpander.h b/include/llvm/Analysis/ScalarEvolutionExpander.h index 7ecf5332edd..a3ed17d19cc 100644 --- a/include/llvm/Analysis/ScalarEvolutionExpander.h +++ b/include/llvm/Analysis/ScalarEvolutionExpander.h @@ -14,7 +14,7 @@ #ifndef LLVM_ANALYSIS_SCALAREVOLUTION_EXPANDER_H #define LLVM_ANALYSIS_SCALAREVOLUTION_EXPANDER_H -#include "llvm/Instructions.h" +#include "llvm/Instruction.h" #include "llvm/Type.h" #include "llvm/Analysis/ScalarEvolution.h" #include "llvm/Analysis/ScalarEvolutionExpressions.h" @@ -119,4 +119,3 @@ namespace llvm { } #endif - diff --git a/include/llvm/Analysis/SparsePropagation.h b/include/llvm/Analysis/SparsePropagation.h index a054c76c9bc..14763293060 100644 --- a/include/llvm/Analysis/SparsePropagation.h +++ b/include/llvm/Analysis/SparsePropagation.h @@ -17,7 +17,7 @@ #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallPtrSet.h" -#include "llvm/ADT/SmallVector.h" +#include #include #include @@ -31,6 +31,8 @@ namespace llvm { class BasicBlock; class Function; class SparseSolver; + + template class SmallVectorImpl; /// AbstractLatticeFunction - This class is implemented by the dataflow instance /// to specify what the lattice values are and how they handle merges etc. diff --git a/include/llvm/Analysis/ValueTracking.h b/include/llvm/Analysis/ValueTracking.h index 1003269e289..8c27b237581 100644 --- a/include/llvm/Analysis/ValueTracking.h +++ b/include/llvm/Analysis/ValueTracking.h @@ -15,8 +15,8 @@ #ifndef LLVM_ANALYSIS_VALUETRACKING_H #define LLVM_ANALYSIS_VALUETRACKING_H +#include "llvm/Support/DataTypes.h" #include -#include namespace llvm { class Value; diff --git a/include/llvm/AutoUpgrade.h b/include/llvm/AutoUpgrade.h index 3a97353ac92..f61bd1a08d3 100644 --- a/include/llvm/AutoUpgrade.h +++ b/include/llvm/AutoUpgrade.h @@ -17,7 +17,6 @@ namespace llvm { class Function; class CallInst; - class BasicBlock; /// This is a more granular function that simply checks an intrinsic function /// for upgrading, and returns true if it requires upgrading. It may return diff --git a/include/llvm/CodeGen/AsmPrinter.h b/include/llvm/CodeGen/AsmPrinter.h index ac88d8ce230..9d7ff15ffcb 100644 --- a/include/llvm/CodeGen/AsmPrinter.h +++ b/include/llvm/CodeGen/AsmPrinter.h @@ -30,7 +30,6 @@ namespace llvm { class ConstantVector; class GCMetadataPrinter; class GlobalVariable; - class GlobalAlias; class MachineConstantPoolEntry; class MachineConstantPoolValue; class MachineModuleInfo; diff --git a/include/llvm/CodeGen/BreakCriticalMachineEdge.h b/include/llvm/CodeGen/BreakCriticalMachineEdge.h index d7f50559ba1..486129728ce 100644 --- a/include/llvm/CodeGen/BreakCriticalMachineEdge.h +++ b/include/llvm/CodeGen/BreakCriticalMachineEdge.h @@ -1,4 +1,4 @@ -//===--------- BreakCriticalMachineEdges.h - Break critical edges ---------===// +//===--------- BreakCriticalMachineEdge.h - Break critical edges ---------===// // // The LLVM Compiler Infrastructure // @@ -11,8 +11,8 @@ // //===---------------------------------------------------------------------===// -#ifndef LLVM_CODEGEN_BREAKCRITICALMACHINEEDGES_H -#define LLVM_CODEGEN_BREAKCRITICALMACHINEEDGES_H +#ifndef LLVM_CODEGEN_BREAKCRITICALMACHINEEDGE_H +#define LLVM_CODEGEN_BREAKCRITICALMACHINEEDGE_H #include "llvm/CodeGen/MachineJumpTableInfo.h" #include "llvm/Target/TargetInstrInfo.h" diff --git a/include/llvm/CodeGen/DwarfWriter.h b/include/llvm/CodeGen/DwarfWriter.h index f5f5cd30d35..8614eecfb05 100644 --- a/include/llvm/CodeGen/DwarfWriter.h +++ b/include/llvm/CodeGen/DwarfWriter.h @@ -20,8 +20,6 @@ #ifndef LLVM_CODEGEN_DWARFWRITER_H #define LLVM_CODEGEN_DWARFWRITER_H -#include - namespace llvm { class AsmPrinter; @@ -48,7 +46,6 @@ private: DwarfException *DE; public: - DwarfWriter(raw_ostream &OS, AsmPrinter *A, const TargetAsmInfo *T); virtual ~DwarfWriter(); diff --git a/include/llvm/CodeGen/ELFRelocation.h b/include/llvm/CodeGen/ELFRelocation.h index e584e3eb4ef..c3f88f1ad6a 100644 --- a/include/llvm/CodeGen/ELFRelocation.h +++ b/include/llvm/CodeGen/ELFRelocation.h @@ -49,4 +49,3 @@ namespace llvm { } // end llvm namespace #endif // LLVM_CODEGEN_ELF_RELOCATION_H - diff --git a/include/llvm/CodeGen/FastISel.h b/include/llvm/CodeGen/FastISel.h index 1cc83106052..c35d43dc287 100644 --- a/include/llvm/CodeGen/FastISel.h +++ b/include/llvm/CodeGen/FastISel.h @@ -14,7 +14,6 @@ #ifndef LLVM_CODEGEN_FASTISEL_H #define LLVM_CODEGEN_FASTISEL_H -#include "llvm/BasicBlock.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallSet.h" #include "llvm/CodeGen/SelectionDAGNodes.h" diff --git a/include/llvm/CodeGen/FileWriters.h b/include/llvm/CodeGen/FileWriters.h index cb7aea476b7..b3781e0c601 100644 --- a/include/llvm/CodeGen/FileWriters.h +++ b/include/llvm/CodeGen/FileWriters.h @@ -14,8 +14,6 @@ #ifndef LLVM_CODEGEN_FILEWRITERS_H #define LLVM_CODEGEN_FILEWRITERS_H -#include - namespace llvm { class PassManagerBase; diff --git a/include/llvm/CodeGen/GCMetadataPrinter.h b/include/llvm/CodeGen/GCMetadataPrinter.h index 1c0665bbd9a..b693b1bbfc7 100644 --- a/include/llvm/CodeGen/GCMetadataPrinter.h +++ b/include/llvm/CodeGen/GCMetadataPrinter.h @@ -23,8 +23,6 @@ #include "llvm/CodeGen/GCMetadata.h" #include "llvm/CodeGen/GCStrategy.h" #include "llvm/Support/Registry.h" -#include -#include namespace llvm { diff --git a/include/llvm/CodeGen/GCStrategy.h b/include/llvm/CodeGen/GCStrategy.h index 80249bc29da..cd760dba92a 100644 --- a/include/llvm/CodeGen/GCStrategy.h +++ b/include/llvm/CodeGen/GCStrategy.h @@ -38,7 +38,6 @@ #include "llvm/CodeGen/GCMetadata.h" #include "llvm/Support/Registry.h" -#include #include namespace llvm { diff --git a/include/llvm/CodeGen/LinkAllAsmWriterComponents.h b/include/llvm/CodeGen/LinkAllAsmWriterComponents.h index a1ba565d5d3..1673c897a70 100644 --- a/include/llvm/CodeGen/LinkAllAsmWriterComponents.h +++ b/include/llvm/CodeGen/LinkAllAsmWriterComponents.h @@ -34,4 +34,3 @@ namespace { } #endif // LLVM_CODEGEN_LINKALLASMWRITERCOMPONENTS_H - diff --git a/include/llvm/CodeGen/LiveIntervalAnalysis.h b/include/llvm/CodeGen/LiveIntervalAnalysis.h index 6b080478cf8..9dd55261492 100644 --- a/include/llvm/CodeGen/LiveIntervalAnalysis.h +++ b/include/llvm/CodeGen/LiveIntervalAnalysis.h @@ -24,7 +24,6 @@ #include "llvm/CodeGen/LiveInterval.h" #include "llvm/ADT/BitVector.h" #include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/Support/Allocator.h" #include diff --git a/include/llvm/CodeGen/LiveVariables.h b/include/llvm/CodeGen/LiveVariables.h index 346fd9661d8..0d932cf1987 100644 --- a/include/llvm/CodeGen/LiveVariables.h +++ b/include/llvm/CodeGen/LiveVariables.h @@ -32,7 +32,6 @@ #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/ADT/BitVector.h" #include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/SmallSet.h" #include "llvm/ADT/SmallVector.h" namespace llvm { diff --git a/include/llvm/CodeGen/MachineConstantPool.h b/include/llvm/CodeGen/MachineConstantPool.h index 79f4eef608e..cfa192aca6b 100644 --- a/include/llvm/CodeGen/MachineConstantPool.h +++ b/include/llvm/CodeGen/MachineConstantPool.h @@ -20,7 +20,6 @@ namespace llvm { -class AsmPrinter; class Constant; class FoldingSetNodeID; class TargetData; diff --git a/include/llvm/CodeGen/MachineDominators.h b/include/llvm/CodeGen/MachineDominators.h index 7d1d9fe9ccf..5981e5a3a58 100644 --- a/include/llvm/CodeGen/MachineDominators.h +++ b/include/llvm/CodeGen/MachineDominators.h @@ -16,9 +16,6 @@ #define LLVM_CODEGEN_MACHINEDOMINATORS_H #include "llvm/CodeGen/MachineFunctionPass.h" -#include "llvm/CodeGen/MachineBasicBlock.h" -#include "llvm/CodeGen/MachineFunction.h" -#include "llvm/CodeGen/MachineInstr.h" #include "llvm/Analysis/Dominators.h" #include "llvm/Analysis/DominatorInternals.h" @@ -45,21 +42,13 @@ public: static char ID; // Pass ID, replacement for typeid DominatorTreeBase* DT; - MachineDominatorTree() : MachineFunctionPass(intptr_t(&ID)) { - DT = new DominatorTreeBase(false); - } + MachineDominatorTree(); - ~MachineDominatorTree() { - DT->releaseMemory(); - delete DT; - } + ~MachineDominatorTree(); DominatorTreeBase& getBase() { return *DT; } - virtual void getAnalysisUsage(AnalysisUsage &AU) const { - AU.setPreservesAll(); - MachineFunctionPass::getAnalysisUsage(AU); - } + virtual void getAnalysisUsage(AnalysisUsage &AU) const; /// getRoots - Return the root blocks of the current CFG. This may include /// multiple blocks if we are computing post dominators. For forward @@ -77,11 +66,7 @@ public: return DT->getRootNode(); } - virtual bool runOnMachineFunction(MachineFunction &F) { - DT->recalculate(F); - - return false; - } + virtual bool runOnMachineFunction(MachineFunction &F); inline bool dominates(MachineDomTreeNode* A, MachineDomTreeNode* B) const { return DT->dominates(A, B); @@ -173,9 +158,7 @@ public: } - virtual void releaseMemory() { - DT->releaseMemory(); - } + virtual void releaseMemory(); virtual void print(std::ostream &OS, const Module* M= 0) const { DT->print(OS, M); diff --git a/include/llvm/CodeGen/MachineInstrBuilder.h b/include/llvm/CodeGen/MachineInstrBuilder.h index ffe5fbe0441..d097362a558 100644 --- a/include/llvm/CodeGen/MachineInstrBuilder.h +++ b/include/llvm/CodeGen/MachineInstrBuilder.h @@ -17,7 +17,6 @@ #ifndef LLVM_CODEGEN_MACHINEINSTRBUILDER_H #define LLVM_CODEGEN_MACHINEINSTRBUILDER_H -#include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/CodeGen/MachineFunction.h" namespace llvm { diff --git a/include/llvm/CodeGen/MachineLoopInfo.h b/include/llvm/CodeGen/MachineLoopInfo.h index fa2d2290e31..dc5350722ed 100644 --- a/include/llvm/CodeGen/MachineLoopInfo.h +++ b/include/llvm/CodeGen/MachineLoopInfo.h @@ -31,9 +31,6 @@ #define LLVM_CODEGEN_MACHINE_LOOP_INFO_H #include "llvm/CodeGen/MachineFunctionPass.h" -#include "llvm/CodeGen/MachineBasicBlock.h" -#include "llvm/CodeGen/MachineFunction.h" -#include "llvm/CodeGen/MachineInstr.h" #include "llvm/Analysis/LoopInfo.h" namespace llvm { diff --git a/include/llvm/CodeGen/RegisterCoalescer.h b/include/llvm/CodeGen/RegisterCoalescer.h index 01d55fdb1cb..2e9ea555f0b 100644 --- a/include/llvm/CodeGen/RegisterCoalescer.h +++ b/include/llvm/CodeGen/RegisterCoalescer.h @@ -13,22 +13,18 @@ //===----------------------------------------------------------------------===// #include "llvm/System/IncludeFile.h" -#include "llvm/CodeGen/MachineInstr.h" -#include "llvm/CodeGen/LiveIntervalAnalysis.h" -#include "llvm/CodeGen/LiveVariables.h" -#include "llvm/Target/TargetRegisterInfo.h" +#include "llvm/CodeGen/LiveInterval.h" +#include "llvm/ADT/SmallPtrSet.h" #ifndef LLVM_CODEGEN_REGISTER_COALESCER_H #define LLVM_CODEGEN_REGISTER_COALESCER_H -namespace llvm -{ +namespace llvm { + class MachineFunction; class RegallocQuery; class AnalysisUsage; - class LiveIntervals; class MachineInstr; - class TargetRegisterInfo; /// An abstract interface for register coalescers. Coalescers must /// implement this interface to be part of the coalescer analysis diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h index 74693dc8bfe..6acbc3fc3f9 100644 --- a/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/include/llvm/CodeGen/SelectionDAGNodes.h @@ -19,7 +19,6 @@ #ifndef LLVM_CODEGEN_SELECTIONDAGNODES_H #define LLVM_CODEGEN_SELECTIONDAGNODES_H -#include "llvm/Value.h" #include "llvm/Constants.h" #include "llvm/ADT/FoldingSet.h" #include "llvm/ADT/GraphTraits.h" diff --git a/include/llvm/CompilerDriver/Tool.h b/include/llvm/CompilerDriver/Tool.h index 8e8f6e73c25..6756d1ca941 100644 --- a/include/llvm/CompilerDriver/Tool.h +++ b/include/llvm/CompilerDriver/Tool.h @@ -20,7 +20,6 @@ #include "llvm/ADT/StringSet.h" #include "llvm/System/Path.h" -#include #include namespace llvmc { diff --git a/include/llvm/Config/alloca.h b/include/llvm/Config/alloca.h index 321cec121d9..9990507ef07 100644 --- a/include/llvm/Config/alloca.h +++ b/include/llvm/Config/alloca.h @@ -47,4 +47,3 @@ #endif #endif - diff --git a/include/llvm/Debugger/InferiorProcess.h b/include/llvm/Debugger/InferiorProcess.h index a775d89153e..71d138b1098 100644 --- a/include/llvm/Debugger/InferiorProcess.h +++ b/include/llvm/Debugger/InferiorProcess.h @@ -135,4 +135,3 @@ namespace llvm { } // end namespace llvm #endif - diff --git a/include/llvm/ExecutionEngine/ExecutionEngine.h b/include/llvm/ExecutionEngine/ExecutionEngine.h index 327e9c6aa92..a26c755ee76 100644 --- a/include/llvm/ExecutionEngine/ExecutionEngine.h +++ b/include/llvm/ExecutionEngine/ExecutionEngine.h @@ -17,7 +17,6 @@ #include #include -#include #include #include "llvm/System/Mutex.h" #include "llvm/ADT/SmallVector.h" diff --git a/include/llvm/GlobalAlias.h b/include/llvm/GlobalAlias.h index d689ad75654..b106116f375 100644 --- a/include/llvm/GlobalAlias.h +++ b/include/llvm/GlobalAlias.h @@ -23,7 +23,6 @@ namespace llvm { class Module; class Constant; -class PointerType; template class SymbolTableListTraits; diff --git a/include/llvm/GlobalVariable.h b/include/llvm/GlobalVariable.h index 1f9bfd4f508..bcbf3213462 100644 --- a/include/llvm/GlobalVariable.h +++ b/include/llvm/GlobalVariable.h @@ -28,7 +28,6 @@ namespace llvm { class Module; class Constant; -class PointerType; template class SymbolTableListTraits; diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h index b833c672ba7..237c1a80981 100644 --- a/include/llvm/Instructions.h +++ b/include/llvm/Instructions.h @@ -16,19 +16,16 @@ #ifndef LLVM_INSTRUCTIONS_H #define LLVM_INSTRUCTIONS_H -#include - #include "llvm/InstrTypes.h" #include "llvm/DerivedTypes.h" #include "llvm/Attributes.h" #include "llvm/BasicBlock.h" #include "llvm/ADT/SmallVector.h" +#include namespace llvm { class ConstantInt; -class PointerType; -class VectorType; class ConstantRange; class APInt; diff --git a/include/llvm/Pass.h b/include/llvm/Pass.h index 66cb189409f..dd012da93cf 100644 --- a/include/llvm/Pass.h +++ b/include/llvm/Pass.h @@ -38,7 +38,6 @@ namespace llvm { -class Value; class BasicBlock; class Function; class Module; diff --git a/include/llvm/PassManagers.h b/include/llvm/PassManagers.h index e0c1bf2de51..22d5062b6b1 100644 --- a/include/llvm/PassManagers.h +++ b/include/llvm/PassManagers.h @@ -1,4 +1,4 @@ -//===- llvm/PassManager.h - Pass Inftrastructre classes --------*- C++ -*-===// +//===- llvm/PassManagers.h - Pass Infrastructure classes -------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -11,8 +11,8 @@ // //===----------------------------------------------------------------------===// -#ifndef PASSMANAGERS_H -#define PASSMANAGERS_H +#ifndef LLVM_PASSMANAGERS_H +#define LLVM_PASSMANAGERS_H #include "llvm/PassManager.h" #include "llvm/ADT/SmallVector.h" @@ -428,4 +428,3 @@ extern void StartPassTimer(llvm::Pass *); extern void StopPassTimer(llvm::Pass *); #endif - diff --git a/include/llvm/Support/Annotation.h b/include/llvm/Support/Annotation.h index dcdcf224545..ffc92965e60 100644 --- a/include/llvm/Support/Annotation.h +++ b/include/llvm/Support/Annotation.h @@ -22,7 +22,6 @@ #ifndef LLVM_SUPPORT_ANNOTATION_H #define LLVM_SUPPORT_ANNOTATION_H -#include #include namespace llvm { diff --git a/include/llvm/Support/DataFlow.h b/include/llvm/Support/DataFlow.h index 8d0ae0c70c5..110e0e11a55 100644 --- a/include/llvm/Support/DataFlow.h +++ b/include/llvm/Support/DataFlow.h @@ -15,7 +15,6 @@ #define LLVM_SUPPORT_DATAFLOW_H #include "llvm/User.h" -#include "llvm/Value.h" #include "llvm/ADT/GraphTraits.h" namespace llvm { diff --git a/include/llvm/Support/DebugInfoBuilder.h b/include/llvm/Support/DebugInfoBuilder.h index 875ae4180f8..4c12ca46aec 100644 --- a/include/llvm/Support/DebugInfoBuilder.h +++ b/include/llvm/Support/DebugInfoBuilder.h @@ -15,7 +15,7 @@ #ifndef LLVM_SUPPORT_DEBUGINFOBUILDER_H #define LLVM_SUPPORT_DEBUGINFOBUILDER_H -#include +#include "llvm/Module.h" #include namespace llvm { diff --git a/include/llvm/Support/ELF.h b/include/llvm/Support/ELF.h index 3a9c9703215..3552c872eeb 100644 --- a/include/llvm/Support/ELF.h +++ b/include/llvm/Support/ELF.h @@ -23,7 +23,6 @@ #include "llvm/Support/DataTypes.h" #include -#include namespace llvm { diff --git a/include/llvm/Support/IRBuilder.h b/include/llvm/Support/IRBuilder.h index 5496a541c05..719e4832dac 100644 --- a/include/llvm/Support/IRBuilder.h +++ b/include/llvm/Support/IRBuilder.h @@ -15,7 +15,6 @@ #ifndef LLVM_SUPPORT_IRBUILDER_H #define LLVM_SUPPORT_IRBUILDER_H -#include "llvm/BasicBlock.h" #include "llvm/Constants.h" #include "llvm/Instructions.h" #include "llvm/GlobalVariable.h" diff --git a/include/llvm/Support/InstVisitor.h b/include/llvm/Support/InstVisitor.h index 932e7fbb7f7..0b8a9bdead4 100644 --- a/include/llvm/Support/InstVisitor.h +++ b/include/llvm/Support/InstVisitor.h @@ -23,10 +23,6 @@ namespace llvm { #define HANDLE_INST(NUM, OPCODE, CLASS) class CLASS; #include "llvm/Instruction.def" -// Forward declare the intermediate types... -class TerminatorInst; class BinaryOperator; -class AllocationInst; - #define DELEGATE(CLASS_TO_VISIT) \ return static_cast(this)-> \ visit##CLASS_TO_VISIT(static_cast(I)) diff --git a/include/llvm/Support/MutexGuard.h b/include/llvm/Support/MutexGuard.h index 723794177c3..9958b97a3e6 100644 --- a/include/llvm/Support/MutexGuard.h +++ b/include/llvm/Support/MutexGuard.h @@ -15,7 +15,7 @@ #ifndef LLVM_SUPPORT_MUTEXGUARD_H #define LLVM_SUPPORT_MUTEXGUARD_H -#include +#include "llvm/System/Mutex.h" namespace llvm { /// Instances of this class acquire a given Mutex Lock when constructed and diff --git a/include/llvm/Support/PassNameParser.h b/include/llvm/Support/PassNameParser.h index 961638c43f4..e489e0a6f0b 100644 --- a/include/llvm/Support/PassNameParser.h +++ b/include/llvm/Support/PassNameParser.h @@ -129,4 +129,5 @@ public: }; } // End llvm namespace + #endif diff --git a/include/llvm/Support/PredIteratorCache.h b/include/llvm/Support/PredIteratorCache.h index 2de2a02461d..9eb7a770446 100644 --- a/include/llvm/Support/PredIteratorCache.h +++ b/include/llvm/Support/PredIteratorCache.h @@ -59,4 +59,3 @@ namespace llvm { } // end namespace llvm #endif - diff --git a/include/llvm/Target/DarwinTargetAsmInfo.h b/include/llvm/Target/DarwinTargetAsmInfo.h index 5813ce35057..6241ffe29b8 100644 --- a/include/llvm/Target/DarwinTargetAsmInfo.h +++ b/include/llvm/Target/DarwinTargetAsmInfo.h @@ -16,7 +16,6 @@ #define LLVM_DARWIN_TARGET_ASM_INFO_H #include "llvm/Target/TargetAsmInfo.h" -#include "llvm/Target/TargetMachine.h" namespace llvm { class GlobalValue; diff --git a/include/llvm/Target/ELFTargetAsmInfo.h b/include/llvm/Target/ELFTargetAsmInfo.h index d065df3cc33..2eeff85d66e 100644 --- a/include/llvm/Target/ELFTargetAsmInfo.h +++ b/include/llvm/Target/ELFTargetAsmInfo.h @@ -16,7 +16,6 @@ #define LLVM_ELF_TARGET_ASM_INFO_H #include "llvm/Target/TargetAsmInfo.h" -#include "llvm/Target/TargetMachine.h" namespace llvm { class GlobalValue; diff --git a/include/llvm/Target/TargetELFWriterInfo.h b/include/llvm/Target/TargetELFWriterInfo.h index f08e2e957c9..548cc077a94 100644 --- a/include/llvm/Target/TargetELFWriterInfo.h +++ b/include/llvm/Target/TargetELFWriterInfo.h @@ -16,8 +16,6 @@ namespace llvm { - class MachineBasicBlock; - //===--------------------------------------------------------------------===// // TargetELFWriterInfo //===--------------------------------------------------------------------===// diff --git a/include/llvm/Target/TargetFrameInfo.h b/include/llvm/Target/TargetFrameInfo.h index 836d8721d60..3e26b9dd01b 100644 --- a/include/llvm/Target/TargetFrameInfo.h +++ b/include/llvm/Target/TargetFrameInfo.h @@ -18,8 +18,6 @@ namespace llvm { -class MachineFunction; - /// Information about stack frame layout on the target. It holds the direction /// of stack growth, the known stack alignment on entry to each function, and /// the offset to the locals area. diff --git a/include/llvm/Target/TargetInstrDesc.h b/include/llvm/Target/TargetInstrDesc.h index 8378206bf1b..2f6e00c01ac 100644 --- a/include/llvm/Target/TargetInstrDesc.h +++ b/include/llvm/Target/TargetInstrDesc.h @@ -15,8 +15,6 @@ #ifndef LLVM_TARGET_TARGETINSTRDESC_H #define LLVM_TARGET_TARGETINSTRDESC_H -#include - namespace llvm { class TargetRegisterClass; diff --git a/include/llvm/Target/TargetJITInfo.h b/include/llvm/Target/TargetJITInfo.h index e60933799ed..1d06cd790d2 100644 --- a/include/llvm/Target/TargetJITInfo.h +++ b/include/llvm/Target/TargetJITInfo.h @@ -23,7 +23,6 @@ namespace llvm { class Function; class GlobalValue; - class MachineBasicBlock; class MachineCodeEmitter; class MachineRelocation; diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h index fbc933d5d5d..cbcfc53bf34 100644 --- a/include/llvm/Target/TargetLowering.h +++ b/include/llvm/Target/TargetLowering.h @@ -22,9 +22,7 @@ #ifndef LLVM_TARGET_TARGETLOWERING_H #define LLVM_TARGET_TARGETLOWERING_H -#include "llvm/Constants.h" #include "llvm/InlineAsm.h" -#include "llvm/Instructions.h" #include "llvm/CodeGen/SelectionDAGNodes.h" #include "llvm/CodeGen/RuntimeLibcalls.h" #include "llvm/ADT/APFloat.h" @@ -36,6 +34,7 @@ namespace llvm { class AllocaInst; + class CallInst; class Function; class FastISel; class MachineBasicBlock; @@ -51,7 +50,6 @@ namespace llvm { class TargetRegisterClass; class TargetSubtarget; class Value; - class VectorType; //===----------------------------------------------------------------------===// /// TargetLowering - This class defines information used to lower LLVM code to diff --git a/include/llvm/Target/TargetMachine.h b/include/llvm/Target/TargetMachine.h index 38e377d1002..b8bfc83aad4 100644 --- a/include/llvm/Target/TargetMachine.h +++ b/include/llvm/Target/TargetMachine.h @@ -16,7 +16,6 @@ #include "llvm/Target/TargetInstrItineraries.h" #include -#include namespace llvm { @@ -78,7 +77,7 @@ class TargetMachine { TargetMachine(const TargetMachine &); // DO NOT IMPLEMENT void operator=(const TargetMachine &); // DO NOT IMPLEMENT protected: // Can only create subclasses. - TargetMachine() : AsmInfo(NULL) { } + TargetMachine() : AsmInfo(0) { } /// getSubtargetImpl - virtual method implemented by subclasses that returns /// a reference to that target's TargetSubtarget-derived member variable. @@ -90,7 +89,7 @@ protected: // Can only create subclasses. /// createTargetAsmInfo - Create a new instance of target specific asm /// information. - virtual const TargetAsmInfo *createTargetAsmInfo() const { return NULL; } + virtual const TargetAsmInfo *createTargetAsmInfo() const { return 0; } public: virtual ~TargetMachine(); diff --git a/include/llvm/Target/TargetRegisterInfo.h b/include/llvm/Target/TargetRegisterInfo.h index 105baef2bcd..fbc0bbc6f40 100644 --- a/include/llvm/Target/TargetRegisterInfo.h +++ b/include/llvm/Target/TargetRegisterInfo.h @@ -16,7 +16,6 @@ #ifndef LLVM_TARGET_TARGETREGISTERINFO_H #define LLVM_TARGET_TARGETREGISTERINFO_H -#include "llvm/ADT/SmallVector.h" #include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/CodeGen/ValueTypes.h" #include @@ -26,12 +25,8 @@ namespace llvm { class BitVector; class MachineFunction; -class MachineInstr; class MachineMove; class RegScavenger; -class SDNode; -class SelectionDAG; -class Type; /// TargetRegisterDesc - This record contains all of the information known about /// a particular register. The AliasSet field (if not null) contains a pointer diff --git a/include/llvm/Transforms/Utils/Local.h b/include/llvm/Transforms/Utils/Local.h index 3ccc61280f7..35d2c0ce7e0 100644 --- a/include/llvm/Transforms/Utils/Local.h +++ b/include/llvm/Transforms/Utils/Local.h @@ -15,15 +15,18 @@ #ifndef LLVM_TRANSFORMS_UTILS_LOCAL_H #define LLVM_TRANSFORMS_UTILS_LOCAL_H -#include "llvm/Function.h" - namespace llvm { +class BasicBlock; +class Instruction; +class Value; class Pass; class PHINode; class AllocaInst; class ConstantExpr; class TargetData; + +template class SmallVectorImpl; //===----------------------------------------------------------------------===// // Local constant propagation. @@ -84,12 +87,12 @@ bool SimplifyCFG(BasicBlock *BB); /// the alloca inserted to create a stack slot for X. /// AllocaInst *DemoteRegToStack(Instruction &X, bool VolatileLoads = false, - Instruction *AllocaPoint = NULL); + Instruction *AllocaPoint = 0); /// DemotePHIToStack - This function takes a virtual register computed by a phi /// node and replaces it with a slot in the stack frame, allocated via alloca. /// The phi node is deleted and it returns the pointer to the alloca inserted. -AllocaInst *DemotePHIToStack(PHINode *P, Instruction *AllocaPoint = NULL); +AllocaInst *DemotePHIToStack(PHINode *P, Instruction *AllocaPoint = 0); } // End llvm namespace diff --git a/include/llvm/TypeSymbolTable.h b/include/llvm/TypeSymbolTable.h index f4e64100282..0ed44ba96ab 100644 --- a/include/llvm/TypeSymbolTable.h +++ b/include/llvm/TypeSymbolTable.h @@ -134,4 +134,3 @@ private: } // End llvm namespace #endif - diff --git a/lib/Analysis/EscapeAnalysis.cpp b/lib/Analysis/EscapeAnalysis.cpp index 67cc6009e39..c621c9f9abc 100644 --- a/lib/Analysis/EscapeAnalysis.cpp +++ b/lib/Analysis/EscapeAnalysis.cpp @@ -14,8 +14,11 @@ #define DEBUG_TYPE "escape-analysis" #include "llvm/Analysis/EscapeAnalysis.h" #include "llvm/Constants.h" +#include "llvm/Instructions.h" #include "llvm/Module.h" +#include "llvm/Analysis/AliasAnalysis.h" #include "llvm/Support/InstIterator.h" +#include "llvm/Target/TargetData.h" #include "llvm/ADT/SmallPtrSet.h" #include using namespace llvm; @@ -25,6 +28,12 @@ static RegisterPass X("escape-analysis", "Pointer Escape Analysis", true, true); +void EscapeAnalysis::getAnalysisUsage(AnalysisUsage &AU) const { + AU.addRequiredTransitive(); + AU.addRequiredTransitive(); + AU.setPreservesAll(); +} + /// runOnFunction - Precomputation for escape analysis. This collects all know /// "escape points" in the def-use graph of the function. These are /// instructions which allow their inputs to escape from the current function. diff --git a/lib/Analysis/ProfileInfoLoader.cpp b/lib/Analysis/ProfileInfoLoader.cpp index 732829887e9..3a0a740f003 100644 --- a/lib/Analysis/ProfileInfoLoader.cpp +++ b/lib/Analysis/ProfileInfoLoader.cpp @@ -18,6 +18,7 @@ #include "llvm/InstrTypes.h" #include "llvm/Support/Streams.h" #include +#include #include using namespace llvm; diff --git a/lib/Archive/ArchiveReader.cpp b/lib/Archive/ArchiveReader.cpp index 8d607f0df7f..b07e884b654 100644 --- a/lib/Archive/ArchiveReader.cpp +++ b/lib/Archive/ArchiveReader.cpp @@ -15,6 +15,7 @@ #include "llvm/Bitcode/ReaderWriter.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Module.h" +#include #include using namespace llvm; diff --git a/lib/AsmParser/LLLexer.h b/lib/AsmParser/LLLexer.h index 5e9843ccec8..adf053cf9b0 100644 --- a/lib/AsmParser/LLLexer.h +++ b/lib/AsmParser/LLLexer.h @@ -17,9 +17,7 @@ #include "LLToken.h" #include "llvm/ADT/APSInt.h" #include "llvm/ADT/APFloat.h" -#include #include -#include namespace llvm { class MemoryBuffer; diff --git a/lib/CodeGen/MachineDominators.cpp b/lib/CodeGen/MachineDominators.cpp index 8f679936209..f7820484376 100644 --- a/lib/CodeGen/MachineDominators.cpp +++ b/lib/CodeGen/MachineDominators.cpp @@ -26,3 +26,28 @@ static RegisterPass E("machinedomtree", "MachineDominator Tree Construction", true); const PassInfo *const llvm::MachineDominatorsID = &E; + +void MachineDominatorTree::getAnalysisUsage(AnalysisUsage &AU) const { + AU.setPreservesAll(); + MachineFunctionPass::getAnalysisUsage(AU); +} + +bool MachineDominatorTree::runOnMachineFunction(MachineFunction &F) { + DT->recalculate(F); + + return false; +} + +MachineDominatorTree::MachineDominatorTree() + : MachineFunctionPass(intptr_t(&ID)) { + DT = new DominatorTreeBase(false); +} + +MachineDominatorTree::~MachineDominatorTree() { + DT->releaseMemory(); + delete DT; +} + +void MachineDominatorTree::releaseMemory() { + DT->releaseMemory(); +} diff --git a/lib/CodeGen/MachineLICM.cpp b/lib/CodeGen/MachineLICM.cpp index d0baaa87ae1..10f52a61955 100644 --- a/lib/CodeGen/MachineLICM.cpp +++ b/lib/CodeGen/MachineLICM.cpp @@ -20,7 +20,6 @@ #include "llvm/Target/TargetRegisterInfo.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetMachine.h" -#include "llvm/ADT/SmallVector.h" #include "llvm/ADT/Statistic.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Compiler.h" diff --git a/lib/CodeGen/MachineSink.cpp b/lib/CodeGen/MachineSink.cpp index 0f608d637c5..87114396f9e 100644 --- a/lib/CodeGen/MachineSink.cpp +++ b/lib/CodeGen/MachineSink.cpp @@ -18,7 +18,6 @@ #include "llvm/Target/TargetRegisterInfo.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetMachine.h" -#include "llvm/ADT/SmallVector.h" #include "llvm/ADT/Statistic.h" #include "llvm/Support/Compiler.h" #include "llvm/Support/Debug.h" diff --git a/lib/CodeGen/PostRASchedulerList.cpp b/lib/CodeGen/PostRASchedulerList.cpp index dc11400094c..1e72b1201b0 100644 --- a/lib/CodeGen/PostRASchedulerList.cpp +++ b/lib/CodeGen/PostRASchedulerList.cpp @@ -32,10 +32,7 @@ #include "llvm/Support/Compiler.h" #include "llvm/Support/Debug.h" #include "llvm/ADT/Statistic.h" -#include "llvm/ADT/DenseSet.h" -#include "llvm/ADT/SmallVector.h" #include -#include using namespace llvm; STATISTIC(NumStalls, "Number of pipeline stalls"); diff --git a/lib/CodeGen/RegAllocLinearScan.cpp b/lib/CodeGen/RegAllocLinearScan.cpp index 919b94c5577..1e7d0a89c1d 100644 --- a/lib/CodeGen/RegAllocLinearScan.cpp +++ b/lib/CodeGen/RegAllocLinearScan.cpp @@ -29,6 +29,7 @@ #include "llvm/Target/TargetOptions.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/ADT/EquivalenceClasses.h" +#include "llvm/ADT/SmallSet.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/STLExtras.h" #include "llvm/Support/Debug.h" diff --git a/lib/CodeGen/RegisterScavenging.cpp b/lib/CodeGen/RegisterScavenging.cpp index ff593c156dd..9447ff2c410 100644 --- a/lib/CodeGen/RegisterScavenging.cpp +++ b/lib/CodeGen/RegisterScavenging.cpp @@ -24,6 +24,7 @@ #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetMachine.h" #include "llvm/ADT/SmallPtrSet.h" +#include "llvm/ADT/SmallVector.h" #include "llvm/ADT/STLExtras.h" using namespace llvm; diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp index 7635c7e2699..436056c6445 100644 --- a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp +++ b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp @@ -24,9 +24,7 @@ #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Support/Debug.h" #include "llvm/Support/Compiler.h" -#include "llvm/ADT/BitVector.h" #include "llvm/ADT/PriorityQueue.h" -#include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallSet.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/STLExtras.h" diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index c2b7d3f1db4..3221de064e3 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -14,7 +14,6 @@ #define DEBUG_TYPE "isel" #include "llvm/CodeGen/SelectionDAGISel.h" #include "SelectionDAGBuild.h" -#include "llvm/ADT/BitVector.h" #include "llvm/Analysis/AliasAnalysis.h" #include "llvm/Constants.h" #include "llvm/CallingConv.h" diff --git a/lib/CodeGen/SimpleRegisterCoalescing.h b/lib/CodeGen/SimpleRegisterCoalescing.h index abe392990d1..71a64a20385 100644 --- a/lib/CodeGen/SimpleRegisterCoalescing.h +++ b/lib/CodeGen/SimpleRegisterCoalescing.h @@ -15,11 +15,9 @@ #define LLVM_CODEGEN_SIMPLE_REGISTER_COALESCING_H #include "llvm/CodeGen/MachineFunctionPass.h" -#include "llvm/CodeGen/LiveInterval.h" #include "llvm/CodeGen/LiveIntervalAnalysis.h" #include "llvm/CodeGen/RegisterCoalescer.h" #include "llvm/ADT/BitVector.h" -#include "llvm/ADT/IndexedMap.h" #include namespace llvm { diff --git a/lib/CodeGen/TwoAddressInstructionPass.cpp b/lib/CodeGen/TwoAddressInstructionPass.cpp index 52a54eb5bd8..1d97f679822 100644 --- a/lib/CodeGen/TwoAddressInstructionPass.cpp +++ b/lib/CodeGen/TwoAddressInstructionPass.cpp @@ -42,7 +42,7 @@ #include "llvm/Support/Debug.h" #include "llvm/ADT/BitVector.h" #include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/SmallPtrSet.h" +#include "llvm/ADT/SmallSet.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/STLExtras.h" using namespace llvm; diff --git a/lib/CodeGen/VirtRegMap.h b/lib/CodeGen/VirtRegMap.h index 52c4486392e..8b494a7c617 100644 --- a/lib/CodeGen/VirtRegMap.h +++ b/lib/CodeGen/VirtRegMap.h @@ -21,6 +21,7 @@ #include "llvm/ADT/BitVector.h" #include "llvm/ADT/IndexedMap.h" #include "llvm/ADT/SmallPtrSet.h" +#include "llvm/ADT/SmallVector.h" #include "llvm/Support/Streams.h" #include diff --git a/lib/Debugger/Debugger.cpp b/lib/Debugger/Debugger.cpp index 78f48f6f731..b12d90ac9db 100644 --- a/lib/Debugger/Debugger.cpp +++ b/lib/Debugger/Debugger.cpp @@ -18,6 +18,7 @@ #include "llvm/Debugger/InferiorProcess.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/ADT/StringExtras.h" +#include #include using namespace llvm; diff --git a/lib/ExecutionEngine/Interpreter/Interpreter.h b/lib/ExecutionEngine/Interpreter/Interpreter.h index fc7da18fd05..f9555b7b094 100644 --- a/lib/ExecutionEngine/Interpreter/Interpreter.h +++ b/lib/ExecutionEngine/Interpreter/Interpreter.h @@ -17,7 +17,6 @@ #include "llvm/Function.h" #include "llvm/ExecutionEngine/ExecutionEngine.h" #include "llvm/ExecutionEngine/GenericValue.h" -#include "llvm/ADT/APInt.h" #include "llvm/Support/InstVisitor.h" #include "llvm/Support/CallSite.h" #include "llvm/Target/TargetData.h" diff --git a/lib/Target/ARM/ARM.h b/lib/Target/ARM/ARM.h index 4b26b2409ce..0358230c66a 100644 --- a/lib/Target/ARM/ARM.h +++ b/lib/Target/ARM/ARM.h @@ -15,7 +15,6 @@ #ifndef TARGET_ARM_H #define TARGET_ARM_H -#include #include namespace llvm { diff --git a/lib/Target/ARM/ARMConstantPoolValue.h b/lib/Target/ARM/ARMConstantPoolValue.h index 7b10565ba3a..d2b9066dcc9 100644 --- a/lib/Target/ARM/ARMConstantPoolValue.h +++ b/lib/Target/ARM/ARMConstantPoolValue.h @@ -15,7 +15,7 @@ #define LLVM_TARGET_ARM_CONSTANTPOOLVALUE_H #include "llvm/CodeGen/MachineConstantPool.h" -#include +#include namespace llvm { diff --git a/lib/Target/Alpha/Alpha.h b/lib/Target/Alpha/Alpha.h index f62270dd88f..9af46d0c70f 100644 --- a/lib/Target/Alpha/Alpha.h +++ b/lib/Target/Alpha/Alpha.h @@ -15,8 +15,6 @@ #ifndef TARGET_ALPHA_H #define TARGET_ALPHA_H -#include - namespace llvm { class AlphaTargetMachine; diff --git a/lib/Target/Alpha/AlphaInstrInfo.cpp b/lib/Target/Alpha/AlphaInstrInfo.cpp index bd6f2cf3e37..fa8224f113f 100644 --- a/lib/Target/Alpha/AlphaInstrInfo.cpp +++ b/lib/Target/Alpha/AlphaInstrInfo.cpp @@ -15,6 +15,7 @@ #include "AlphaInstrInfo.h" #include "AlphaGenInstrInfo.inc" #include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/SmallVector.h" #include "llvm/CodeGen/MachineInstrBuilder.h" using namespace llvm; diff --git a/lib/Target/CellSPU/SPU.h b/lib/Target/CellSPU/SPU.h index 776b9bfb083..a6a911067fd 100644 --- a/lib/Target/CellSPU/SPU.h +++ b/lib/Target/CellSPU/SPU.h @@ -16,7 +16,6 @@ #define LLVM_TARGET_IBMCELLSPU_H #include "llvm/Support/DataTypes.h" -#include namespace llvm { class SPUTargetMachine; diff --git a/lib/Target/IA64/IA64.h b/lib/Target/IA64/IA64.h index 1fe14881310..030a23382f7 100644 --- a/lib/Target/IA64/IA64.h +++ b/lib/Target/IA64/IA64.h @@ -14,8 +14,6 @@ #ifndef TARGET_IA64_H #define TARGET_IA64_H -#include - namespace llvm { class IA64TargetMachine; diff --git a/lib/Target/IA64/IA64InstrInfo.cpp b/lib/Target/IA64/IA64InstrInfo.cpp index a9dce854521..0a13c68abf8 100644 --- a/lib/Target/IA64/IA64InstrInfo.cpp +++ b/lib/Target/IA64/IA64InstrInfo.cpp @@ -15,6 +15,7 @@ #include "IA64.h" #include "IA64InstrBuilder.h" #include "llvm/CodeGen/MachineInstrBuilder.h" +#include "llvm/ADT/SmallVector.h" #include "IA64GenInstrInfo.inc" using namespace llvm; diff --git a/lib/Target/MSIL/MSILWriter.h b/lib/Target/MSIL/MSILWriter.h index c64ceeeff59..45f5579bfb3 100644 --- a/lib/Target/MSIL/MSILWriter.h +++ b/lib/Target/MSIL/MSILWriter.h @@ -27,7 +27,6 @@ #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetMachineRegistry.h" #include "llvm/Support/Mangler.h" -#include #include using namespace llvm; diff --git a/lib/Target/Mips/Mips.h b/lib/Target/Mips/Mips.h index 1dc53ca342f..03f5a525ba6 100644 --- a/lib/Target/Mips/Mips.h +++ b/lib/Target/Mips/Mips.h @@ -15,8 +15,6 @@ #ifndef TARGET_MIPS_H #define TARGET_MIPS_H -#include - namespace llvm { class MipsTargetMachine; class FunctionPass; diff --git a/lib/Target/Mips/MipsMachineFunction.h b/lib/Target/Mips/MipsMachineFunction.h index fd5658c721a..b95394ec81c 100644 --- a/lib/Target/Mips/MipsMachineFunction.h +++ b/lib/Target/Mips/MipsMachineFunction.h @@ -14,6 +14,7 @@ #ifndef MIPS_MACHINE_FUNCTION_INFO_H #define MIPS_MACHINE_FUNCTION_INFO_H +#include "llvm/ADT/SmallVector.h" #include "llvm/ADT/VectorExtras.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineFrameInfo.h" diff --git a/lib/Target/PIC16/PIC16.h b/lib/Target/PIC16/PIC16.h index f35acd57315..6850bd664bc 100644 --- a/lib/Target/PIC16/PIC16.h +++ b/lib/Target/PIC16/PIC16.h @@ -15,8 +15,6 @@ #ifndef LLVM_TARGET_PIC16_H #define LLVM_TARGET_PIC16_H -#include - namespace llvm { class PIC16TargetMachine; class FunctionPass; diff --git a/lib/Target/PowerPC/PPC.h b/lib/Target/PowerPC/PPC.h index 9a8e22e88de..773b9c169b4 100644 --- a/lib/Target/PowerPC/PPC.h +++ b/lib/Target/PowerPC/PPC.h @@ -15,9 +15,6 @@ #ifndef LLVM_TARGET_POWERPC_H #define LLVM_TARGET_POWERPC_H -#include - - // GCC #defines PPC on Linux but we use it as our namespace name #undef PPC diff --git a/lib/Target/PowerPC/PPCSubtarget.cpp b/lib/Target/PowerPC/PPCSubtarget.cpp index e63368bd659..425d8e6195c 100644 --- a/lib/Target/PowerPC/PPCSubtarget.cpp +++ b/lib/Target/PowerPC/PPCSubtarget.cpp @@ -16,6 +16,7 @@ #include "llvm/Module.h" #include "llvm/Target/TargetMachine.h" #include "PPCGenSubtarget.inc" +#include using namespace llvm; #if defined(__APPLE__) diff --git a/lib/Target/Sparc/Sparc.h b/lib/Target/Sparc/Sparc.h index 1096144e87b..baac8f0159a 100644 --- a/lib/Target/Sparc/Sparc.h +++ b/lib/Target/Sparc/Sparc.h @@ -15,7 +15,6 @@ #ifndef TARGET_SPARC_H #define TARGET_SPARC_H -#include #include namespace llvm { diff --git a/lib/Target/Sparc/SparcInstrInfo.cpp b/lib/Target/Sparc/SparcInstrInfo.cpp index 8b07bcbabc5..8601cbe4df7 100644 --- a/lib/Target/Sparc/SparcInstrInfo.cpp +++ b/lib/Target/Sparc/SparcInstrInfo.cpp @@ -15,6 +15,7 @@ #include "SparcSubtarget.h" #include "Sparc.h" #include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/SmallVector.h" #include "llvm/CodeGen/MachineInstrBuilder.h" #include "SparcGenInstrInfo.inc" using namespace llvm; diff --git a/lib/Target/X86/X86.h b/lib/Target/X86/X86.h index 0c2d3b36a2f..135787b98a9 100644 --- a/lib/Target/X86/X86.h +++ b/lib/Target/X86/X86.h @@ -15,8 +15,6 @@ #ifndef TARGET_X86_H #define TARGET_X86_H -#include - namespace llvm { class X86TargetMachine; diff --git a/lib/Target/X86/X86InstrInfo.cpp b/lib/Target/X86/X86InstrInfo.cpp index cb12a9d53c9..9170c24ddbc 100644 --- a/lib/Target/X86/X86InstrInfo.cpp +++ b/lib/Target/X86/X86InstrInfo.cpp @@ -18,6 +18,7 @@ #include "X86MachineFunctionInfo.h" #include "X86Subtarget.h" #include "X86TargetMachine.h" +#include "llvm/DerivedTypes.h" #include "llvm/ADT/STLExtras.h" #include "llvm/CodeGen/MachineConstantPool.h" #include "llvm/CodeGen/MachineFrameInfo.h" @@ -1913,7 +1914,7 @@ bool X86InstrInfo::restoreCalleeSavedRegisters(MachineBasicBlock &MBB, } static MachineInstr *FuseTwoAddrInst(MachineFunction &MF, unsigned Opcode, - const SmallVector &MOs, + const SmallVectorImpl &MOs, MachineInstr *MI, const TargetInstrInfo &TII) { // Create the base instruction with the memory operand as the first part. MachineInstr *NewMI = MF.CreateMachineInstr(TII.get(Opcode), true); @@ -1939,7 +1940,7 @@ static MachineInstr *FuseTwoAddrInst(MachineFunction &MF, unsigned Opcode, static MachineInstr *FuseInst(MachineFunction &MF, unsigned Opcode, unsigned OpNo, - const SmallVector &MOs, + const SmallVectorImpl &MOs, MachineInstr *MI, const TargetInstrInfo &TII) { MachineInstr *NewMI = MF.CreateMachineInstr(TII.get(Opcode), true); MachineInstrBuilder MIB(NewMI); @@ -1961,7 +1962,7 @@ static MachineInstr *FuseInst(MachineFunction &MF, } static MachineInstr *MakeM0Inst(const TargetInstrInfo &TII, unsigned Opcode, - const SmallVector &MOs, + const SmallVectorImpl &MOs, MachineInstr *MI) { MachineFunction &MF = *MI->getParent()->getParent(); MachineInstrBuilder MIB = BuildMI(MF, TII.get(Opcode)); @@ -1977,7 +1978,7 @@ static MachineInstr *MakeM0Inst(const TargetInstrInfo &TII, unsigned Opcode, MachineInstr* X86InstrInfo::foldMemoryOperandImpl(MachineFunction &MF, MachineInstr *MI, unsigned i, - const SmallVector &MOs) const{ + const SmallVectorImpl &MOs) const{ const DenseMap *OpcodeTablePtr = NULL; bool isTwoAddrFold = false; unsigned NumOps = MI->getDesc().getNumOperands(); diff --git a/lib/Target/X86/X86InstrInfo.h b/lib/Target/X86/X86InstrInfo.h index 21c9a1f0179..a75c5e64d15 100644 --- a/lib/Target/X86/X86InstrInfo.h +++ b/lib/Target/X86/X86InstrInfo.h @@ -17,7 +17,7 @@ #include "llvm/Target/TargetInstrInfo.h" #include "X86.h" #include "X86RegisterInfo.h" -#include "llvm/ADT/IndexedMap.h" +#include "llvm/ADT/DenseMap.h" #include "llvm/Target/TargetRegisterInfo.h" namespace llvm { @@ -447,7 +447,7 @@ private: MachineInstr* foldMemoryOperandImpl(MachineFunction &MF, MachineInstr* MI, unsigned OpNum, - const SmallVector &MOs) const; + const SmallVectorImpl &MOs) const; }; } // End llvm namespace diff --git a/lib/Target/X86/X86RegisterInfo.h b/lib/Target/X86/X86RegisterInfo.h index 25d7b07bad1..b51a53327f5 100644 --- a/lib/Target/X86/X86RegisterInfo.h +++ b/lib/Target/X86/X86RegisterInfo.h @@ -14,8 +14,6 @@ #ifndef X86REGISTERINFO_H #define X86REGISTERINFO_H -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/SmallVector.h" #include "llvm/Target/TargetRegisterInfo.h" #include "X86GenRegisterInfo.h.inc" diff --git a/lib/Target/X86/X86Subtarget.h b/lib/Target/X86/X86Subtarget.h index 646a953370f..ded26e891e1 100644 --- a/lib/Target/X86/X86Subtarget.h +++ b/lib/Target/X86/X86Subtarget.h @@ -15,7 +15,6 @@ #define X86SUBTARGET_H #include "llvm/Target/TargetSubtarget.h" - #include namespace llvm { diff --git a/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp b/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp index ba58fbd987a..848f2b87c4e 100644 --- a/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp +++ b/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp @@ -20,7 +20,6 @@ #include "llvm/Function.h" #include "llvm/Instructions.h" #include "llvm/Type.h" -#include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringExtras.h" using namespace llvm; diff --git a/lib/VMCore/Function.cpp b/lib/VMCore/Function.cpp index 8210350d715..8eaff880ee4 100644 --- a/lib/VMCore/Function.cpp +++ b/lib/VMCore/Function.cpp @@ -18,7 +18,6 @@ #include "llvm/Support/LeakDetector.h" #include "llvm/Support/StringPool.h" #include "SymbolTableListTraitsImpl.h" -#include "llvm/ADT/BitVector.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/StringExtras.h" using namespace llvm;