diff options
Diffstat (limited to 'include')
60 files changed, 43 insertions, 128 deletions
diff --git a/include/llvm/ADT/FoldingSet.h b/include/llvm/ADT/FoldingSet.h index 4c93711394..63f73b997d 100644 --- a/include/llvm/ADT/FoldingSet.h +++ b/include/llvm/ADT/FoldingSet.h @@ -457,6 +457,4 @@ template<typename T> struct FoldingSetTrait<const T*> { } // End of namespace llvm. - #endif - diff --git a/include/llvm/ADT/STLExtras.h b/include/llvm/ADT/STLExtras.h index acfeae5473..ca711b7982 100644 --- a/include/llvm/ADT/STLExtras.h +++ b/include/llvm/ADT/STLExtras.h @@ -19,7 +19,7 @@ #include <functional> #include <utility> // for std::pair -#include <cstring> // for std::size_t +#include <cstddef> // 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 efd0accaad..b4b53805c4 100644 --- a/include/llvm/ADT/SparseBitVector.h +++ b/include/llvm/ADT/SparseBitVector.h @@ -17,11 +17,11 @@ #include <cassert> #include <cstring> -#include <algorithm> #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 0acbf46a1a..42d09c7b45 100644 --- a/include/llvm/ADT/ilist.h +++ b/include/llvm/ADT/ilist.h @@ -40,7 +40,6 @@ #include "llvm/ADT/iterator.h" #include <cassert> -#include <cstdlib> 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 c52b24efe8..bac551f049 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 1564774ada..cca0d502b6 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 94ab04eb56..35cdb24651 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 871630dd6d..3f4da25310 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 <set> 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<TargetData>(); - AU.addRequiredTransitive<AliasAnalysis>(); - AU.setPreservesAll(); - } + void getAnalysisUsage(AnalysisUsage &AU) const; //===--------------------------------------------------------------------- // Client API diff --git a/include/llvm/Analysis/FindUsedTypes.h b/include/llvm/Analysis/FindUsedTypes.h index 35e4e6f3f9..c897af3a58 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<const Type *> UsedTypes; diff --git a/include/llvm/Analysis/LoopInfo.h b/include/llvm/Analysis/LoopInfo.h index 1b684d73d3..5ba8a7a004 100644 --- a/include/llvm/Analysis/LoopInfo.h +++ b/include/llvm/Analysis/LoopInfo.h @@ -54,8 +54,6 @@ static void RemoveFromVector(std::vector<T*> &V, T *N) { class DominatorTree; class LoopInfo; -class PHINode; -class Instruction; template<class N> class LoopInfoBase; template<class N> class LoopBase; diff --git a/include/llvm/Analysis/ScalarEvolutionExpander.h b/include/llvm/Analysis/ScalarEvolutionExpander.h index 7ecf5332ed..a3ed17d19c 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 a054c76c9b..1476329306 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 <iosfwd> #include <vector> #include <set> @@ -31,6 +31,8 @@ namespace llvm { class BasicBlock; class Function; class SparseSolver; + + template<typename T> 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 1003269e28..8c27b23758 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 <string> -#include <llvm/Support/DataTypes.h> namespace llvm { class Value; diff --git a/include/llvm/AutoUpgrade.h b/include/llvm/AutoUpgrade.h index 3a97353ac9..f61bd1a08d 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 ac88d8ce23..9d7ff15ffc 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 d7f50559ba..486129728c 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 f5f5cd30d3..8614eecfb0 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 <iosfwd> - 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 e584e3eb4e..c3f88f1ad6 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 1cc8310605..c35d43dc28 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 cb7aea476b..b3781e0c60 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 <iosfwd> - namespace llvm { class PassManagerBase; diff --git a/include/llvm/CodeGen/GCMetadataPrinter.h b/include/llvm/CodeGen/GCMetadataPrinter.h index 1c0665bbd9..b693b1bbfc 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 <iosfwd> -#include <string> namespace llvm { diff --git a/include/llvm/CodeGen/GCStrategy.h b/include/llvm/CodeGen/GCStrategy.h index 80249bc29d..cd760dba92 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 <iosfwd> #include <string> namespace llvm { diff --git a/include/llvm/CodeGen/LinkAllAsmWriterComponents.h b/include/llvm/CodeGen/LinkAllAsmWriterComponents.h index a1ba565d5d..1673c897a7 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 6b080478cf..9dd5526149 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 <cmath> diff --git a/include/llvm/CodeGen/LiveVariables.h b/include/llvm/CodeGen/LiveVariables.h index 346fd9661d..0d932cf198 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 79f4eef608..cfa192aca6 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 7d1d9fe9cc..5981e5a3a5 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<MachineBasicBlock>* DT; - MachineDominatorTree() : MachineFunctionPass(intptr_t(&ID)) { - DT = new DominatorTreeBase<MachineBasicBlock>(false); - } + MachineDominatorTree(); - ~MachineDominatorTree() { - DT->releaseMemory(); - delete DT; - } + ~MachineDominatorTree(); DominatorTreeBase<MachineBasicBlock>& 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 ffe5fbe044..d097362a55 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 fa2d2290e3..dc5350722e 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 01d55fdb1c..2e9ea555f0 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 |