Tidy up #includes, deleting a bunch of unnecessary #includes.
authorDan Gohman <gohman@apple.com>
Mon, 5 Jan 2009 17:59:02 +0000 (17:59 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 5 Jan 2009 17:59:02 +0000 (17:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61715 91177308-0d34-0410-b5e6-96231b3b80d8

99 files changed:
include/llvm/ADT/FoldingSet.h
include/llvm/ADT/STLExtras.h
include/llvm/ADT/SparseBitVector.h
include/llvm/ADT/ilist.h
include/llvm/Analysis/ConstantsScanner.h
include/llvm/Analysis/DominatorInternals.h
include/llvm/Analysis/Dominators.h
include/llvm/Analysis/EscapeAnalysis.h
include/llvm/Analysis/FindUsedTypes.h
include/llvm/Analysis/LoopInfo.h
include/llvm/Analysis/ScalarEvolutionExpander.h
include/llvm/Analysis/SparsePropagation.h
include/llvm/Analysis/ValueTracking.h
include/llvm/AutoUpgrade.h
include/llvm/CodeGen/AsmPrinter.h
include/llvm/CodeGen/BreakCriticalMachineEdge.h
include/llvm/CodeGen/DwarfWriter.h
include/llvm/CodeGen/ELFRelocation.h
include/llvm/CodeGen/FastISel.h
include/llvm/CodeGen/FileWriters.h
include/llvm/CodeGen/GCMetadataPrinter.h
include/llvm/CodeGen/GCStrategy.h
include/llvm/CodeGen/LinkAllAsmWriterComponents.h
include/llvm/CodeGen/LiveIntervalAnalysis.h
include/llvm/CodeGen/LiveVariables.h
include/llvm/CodeGen/MachineConstantPool.h
include/llvm/CodeGen/MachineDominators.h
include/llvm/CodeGen/MachineInstrBuilder.h
include/llvm/CodeGen/MachineLoopInfo.h
include/llvm/CodeGen/RegisterCoalescer.h
include/llvm/CodeGen/SelectionDAGNodes.h
include/llvm/CompilerDriver/Tool.h
include/llvm/Config/alloca.h
include/llvm/Debugger/InferiorProcess.h
include/llvm/ExecutionEngine/ExecutionEngine.h
include/llvm/GlobalAlias.h
include/llvm/GlobalVariable.h
include/llvm/Instructions.h
include/llvm/Pass.h
include/llvm/PassManagers.h
include/llvm/Support/Annotation.h
include/llvm/Support/DataFlow.h
include/llvm/Support/DebugInfoBuilder.h
include/llvm/Support/ELF.h
include/llvm/Support/IRBuilder.h
include/llvm/Support/InstVisitor.h
include/llvm/Support/MutexGuard.h
include/llvm/Support/PassNameParser.h
include/llvm/Support/PredIteratorCache.h
include/llvm/Target/DarwinTargetAsmInfo.h
include/llvm/Target/ELFTargetAsmInfo.h
include/llvm/Target/TargetELFWriterInfo.h
include/llvm/Target/TargetFrameInfo.h
include/llvm/Target/TargetInstrDesc.h
include/llvm/Target/TargetJITInfo.h
include/llvm/Target/TargetLowering.h
include/llvm/Target/TargetMachine.h
include/llvm/Target/TargetRegisterInfo.h
include/llvm/Transforms/Utils/Local.h
include/llvm/TypeSymbolTable.h
lib/Analysis/EscapeAnalysis.cpp
lib/Analysis/ProfileInfoLoader.cpp
lib/Archive/ArchiveReader.cpp
lib/AsmParser/LLLexer.h
lib/CodeGen/MachineDominators.cpp
lib/CodeGen/MachineLICM.cpp
lib/CodeGen/MachineSink.cpp
lib/CodeGen/PostRASchedulerList.cpp
lib/CodeGen/RegAllocLinearScan.cpp
lib/CodeGen/RegisterScavenging.cpp
lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
lib/CodeGen/SimpleRegisterCoalescing.h
lib/CodeGen/TwoAddressInstructionPass.cpp
lib/CodeGen/VirtRegMap.h
lib/Debugger/Debugger.cpp
lib/ExecutionEngine/Interpreter/Interpreter.h
lib/Target/ARM/ARM.h
lib/Target/ARM/ARMConstantPoolValue.h
lib/Target/Alpha/Alpha.h
lib/Target/Alpha/AlphaInstrInfo.cpp
lib/Target/CellSPU/SPU.h
lib/Target/IA64/IA64.h
lib/Target/IA64/IA64InstrInfo.cpp
lib/Target/MSIL/MSILWriter.h
lib/Target/Mips/Mips.h
lib/Target/Mips/MipsMachineFunction.h
lib/Target/PIC16/PIC16.h
lib/Target/PowerPC/PPC.h
lib/Target/PowerPC/PPCSubtarget.cpp
lib/Target/Sparc/Sparc.h
lib/Target/Sparc/SparcInstrInfo.cpp
lib/Target/X86/X86.h
lib/Target/X86/X86InstrInfo.cpp
lib/Target/X86/X86InstrInfo.h
lib/Target/X86/X86RegisterInfo.h
lib/Target/X86/X86Subtarget.h
lib/Transforms/Utils/UnifyFunctionExitNodes.cpp
lib/VMCore/Function.cpp

index 4c93711394e4ce900ec3a8c51866fa8fac172e25..63f73b997d0628d780eb3e210bc336026c534191 100644 (file)
@@ -457,6 +457,4 @@ template<typename T> struct FoldingSetTrait<const T*> {
 
 } // End of namespace llvm.
 
-
 #endif
-
index acfeae5473166c4bc98ba06a3116cfba1438177e..ca711b79822c739f2feb0e2e271571dd53ef4014 100644 (file)
@@ -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 {
index efd0accaad289f1aadecc17f9dcd66dfb29470c3..b4b53805c4345ced7618efe12e61d2e1d1986088 100644 (file)
 
 #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
index 0acbf46a1aade9a25b322002a5a7b19ff87e3611..42d09c7b4500804fddc7190cdf3981c320d0fa9c 100644 (file)
@@ -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);
   }
 
index c52b24efe8b811fc8350025bfcb1baccabe666e6..bac551f0492ad764a30792b68baa71587335e323 100644 (file)
@@ -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 {
index 1564774adaeccda2ad4760a9f2a47d6b552dff5f..cca0d502b69c393a036b81e35e14cca5154f41b3 100644 (file)
@@ -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
index 94ab04eb56bfb4c28d18dda3c630ac6a4c316ec3..35cdb246518dd2dc67239d5d3a2913938e120bb4 100644 (file)
@@ -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"
index 871630dd6d0b56c21a85e6c00d67f3e2923646e3..3f4da25310d70a21ce5857f42dad5786b21cc73d 100644 (file)
 #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
index 35e4e6f3f9e201449ef6acfb03d2f0dfcec1c2ab..c897af3a58a63a902af8173e38ffc4b999fcc467 100644 (file)
@@ -20,6 +20,7 @@
 namespace llvm {
 
 class Type;
+class Value;
 
 class FindUsedTypes : public ModulePass {
   std::set<const Type *> UsedTypes;
index 1b684d73d3ca8c85aeedfffafd4484f5a6deb706..5ba8a7a0042fbb67c3cc85ac87cb04335d89f18b 100644 (file)
@@ -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;
 
index 7ecf5332edd8839ff9ec0116e89d8d38787022ae..a3ed17d19cc7a4d103cf59a84b4bfd568aa33da7 100644 (file)
@@ -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
-
index a054c76c9bc5a7323aef55ace1b7e6d0414530fd..147632930600f2c4fd2358d38c8f8456910eadd2 100644 (file)
@@ -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.
index 1003269e2892a9ee098808a7e1a19b8413ee1c4d..8c27b237581a03f44c5a7536630e49b71715497d 100644 (file)
@@ -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;
index 3a97353ac92ee099dcadb18d2459d22330594d03..f61bd1a08d32bf3e90018bd5c3d70c011768013a 100644 (file)
@@ -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
index ac88d8ce230b7bd96d12299a4552a7036831817e..9d7ff15ffcb2df9a65c2543c313bba1a0373a77f 100644 (file)
@@ -30,7 +30,6 @@ namespace llvm {
   class ConstantVector;
   class GCMetadataPrinter;
   class GlobalVariable;
-  class GlobalAlias;
   class MachineConstantPoolEntry;
   class MachineConstantPoolValue;
   class MachineModuleInfo;
index d7f50559ba1231371047f6653412a1fadd0372c4..486129728ce4d2701f1d46f1122a670084a3cc68 100644 (file)
@@ -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"
index f5f5cd30d350b248474d9c29ca6b10a453ae7662..8614eecfb05b6c6f1f9c34878d0fce8956c8773e 100644 (file)
@@ -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();
   
index e584e3eb4ef8c4c5d08c244e536738ffc12e35b9..c3f88f1ad6ac3d4f4d54b78b9f376213052e4027 100644 (file)
@@ -49,4 +49,3 @@ namespace llvm {
 } // end llvm namespace
 
 #endif // LLVM_CODEGEN_ELF_RELOCATION_H
-
index 1cc83106052e3168e59e1255df081f5e08c1dc7b..c35d43dc287f54cefcc1ce78fe8690f27b335f0c 100644 (file)
@@ -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"
index cb7aea476b769ebc95ee0088a21263e6237acfca..b3781e0c6012391a10a334167460b12d6da2f7ac 100644 (file)
@@ -14,8 +14,6 @@
 #ifndef LLVM_CODEGEN_FILEWRITERS_H
 #define LLVM_CODEGEN_FILEWRITERS_H
 
-#include <iosfwd>
-
 namespace llvm {
 
   class PassManagerBase;
index 1c0665bbd9ad046f18cf7e84934334371066fb05..b693b1bbfc7c42f27a3efdc56497ede2050ef9cc 100644 (file)
@@ -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 {
   
index 80249bc29dadc8af1ccd3c08c051a789331bde43..cd760dba92aab15d037a76e7d23f93cacac16dc8 100644 (file)
@@ -38,7 +38,6 @@
 
 #include "llvm/CodeGen/GCMetadata.h"
 #include "llvm/Support/Registry.h"
-#include <iosfwd>
 #include <string>
 
 namespace llvm {
index a1ba565d5d3f18723b7691b535427524371798bb..1673c897a7082b13036cf31cb78531c7ae874e10 100644 (file)
@@ -34,4 +34,3 @@ namespace {
 }
 
 #endif // LLVM_CODEGEN_LINKALLASMWRITERCOMPONENTS_H
-
index 6b080478cf86ced11a9718a1a8acf7f509db3c78..9dd5526149227153b872545d731f22fc13e0d7ec 100644 (file)
@@ -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>
index 346fd9661d8f80bd8be4a61315bcb7df238e873b..0d932cf19871667fccec9d83504b5a30c20a5071 100644 (file)
@@ -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 {
index 79f4eef608e2914a5ae2cdc9f74edb657f7ec7b9..cfa192aca6b26fb80247df3185724c95a430ef1c 100644 (file)
@@ -20,7 +20,6 @@
 
 namespace llvm {
 
-class AsmPrinter;
 class Constant;
 class FoldingSetNodeID;
 class TargetData;
index 7d1d9fe9ccf31b8a4a3db4f65d4ebe2588688f20..5981e5a3a589fd38f179b9b9e9058b33adde9441 100644 (file)
@@ -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);
index ffe5fbe0441823c0191794c27fbae294c6b19ed4..d097362a55822ca6e638b8af8d8ccc052f9c69b9 100644 (file)
@@ -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 {
index fa2d2290e31df3607433cdc3031416c2554f07a3..dc5350722ed7775b51cc623a898fd5ef5448d493 100644 (file)
@@ -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 {
index 01d55fdb1cb2d9ed99712896193506dfb2f3f587..2e9ea555f0b7274871b5ae400257f762f7e45f20 100644 (file)
 //===----------------------------------------------------------------------===//
 
 #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
index 74693dc8bfee54bb5535e612d468f18807c62a47..6acbc3fc3f916e21672bca024e5bb77fdb8679dc 100644 (file)
@@ -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"
index 8e8f6e73c2523e41697b2a1f319979acb7745f07..6756d1ca941f217780727e3026f288b75d44af52 100644 (file)
@@ -20,7 +20,6 @@
 #include "llvm/ADT/StringSet.h"
 #include "llvm/System/Path.h"
 
-#include <string>
 #include <vector>
 
 namespace llvmc {
index 321cec121d973d69d487afaf9558f0425cc8de57..9990507ef07808eb5a4c55707b15716b808288bd 100644 (file)
@@ -47,4 +47,3 @@
 #endif
 
 #endif
-
index a775d89153e08aa2a423afbece6f96a111c9932d..71d138b10984d10f52d0baf1d065ebb2379b45c1 100644 (file)
@@ -135,4 +135,3 @@ namespace llvm {
 }  // end namespace llvm
 
 #endif
-
index 327e9c6aa9290403ec6ff32b4b26b5bb0aa43ef9..a26c755ee76a6434e5ed487da54401096739c118 100644 (file)
@@ -17,7 +17,6 @@
 
 #include <vector>
 #include <map>
-#include <cassert>
 #include <string>
 #include "llvm/System/Mutex.h"
 #include "llvm/ADT/SmallVector.h"
index d689ad756540226bccc53c813e69065e0bd1950d..b106116f375062812d7713ffc506f7572c26fea4 100644 (file)
@@ -23,7 +23,6 @@ namespace llvm {
 
 class Module;
 class Constant;
-class PointerType;
 template<typename ValueSubClass, typename ItemParentClass>
   class SymbolTableListTraits;
 
index 1f9bfd4f5080fd2c003d6d71cdb92aaa76d0b8db..bcbf3213462732c7689e49a60ddea2040d3fb9ac 100644 (file)
@@ -28,7 +28,6 @@ namespace llvm {
 
 class Module;
 class Constant;
-class PointerType;
 template<typename ValueSubClass, typename ItemParentClass>
   class SymbolTableListTraits;
 
index b833c672ba7eae494bd4453bf5592417c96b1d60..237c1a80981db49a303f8e52958ed525857f7563 100644 (file)
 #ifndef LLVM_INSTRUCTIONS_H
 #define LLVM_INSTRUCTIONS_H
 
-#include <iterator>
-
 #include "llvm/InstrTypes.h"
 #include "llvm/DerivedTypes.h"
 #include "llvm/Attributes.h"
 #include "llvm/BasicBlock.h"
 #include "llvm/ADT/SmallVector.h"
+#include <iterator>
 
 namespace llvm {
 
 class ConstantInt;
-class PointerType;
-class VectorType;
 class ConstantRange;
 class APInt;
 
index 66cb189409f1b83cabc38777aec4a5fe9968a5b3..dd012da93cfa6ffa679c98a2db639a5e666e786b 100644 (file)
@@ -38,7 +38,6 @@
 
 namespace llvm {
 
-class Value;
 class BasicBlock;
 class Function;
 class Module;
index e0c1bf2de511c5577adee19a573a6ee79a33595e..22d5062b6b1676e2e1a1b645945858ab14379c3f 100644 (file)
@@ -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
-
index dcdcf2245453c2ceeb2b24c435a50122a7430206..ffc92965e602e95ca1f61d21d5775cb4d081490a 100644 (file)
@@ -22,7 +22,6 @@
 #ifndef LLVM_SUPPORT_ANNOTATION_H
 #define LLVM_SUPPORT_ANNOTATION_H
 
-#include <string>
 #include <cassert>
 
 namespace llvm {
index 8d0ae0c70c5829dadc2e27e7c56b7b0500224c2c..110e0e11a559875dbb5b640dc58ebf4cf19a80a0 100644 (file)
@@ -15,7 +15,6 @@
 #define LLVM_SUPPORT_DATAFLOW_H
 
 #include "llvm/User.h"
-#include "llvm/Value.h"
 #include "llvm/ADT/GraphTraits.h"
 
 namespace llvm {
index 875ae4180f859e66ff9dbe2b7ca15db04215715e..4c12ca46aec4b6ac9ea142ca1bb963923d84235e 100644 (file)
@@ -15,7 +15,7 @@
 #ifndef LLVM_SUPPORT_DEBUGINFOBUILDER_H
 #define LLVM_SUPPORT_DEBUGINFOBUILDER_H
 
-#include <llvm/Module.h>
+#include "llvm/Module.h"
 #include <string>
 
 namespace llvm {
index 3a9c9703215f6566dff8f03401fe1c698820b90d..3552c872eeb2ea36cb3101113523001e47a6c376 100644 (file)
@@ -23,7 +23,6 @@
 
 #include "llvm/Support/DataTypes.h"
 #include <cstring>
-#include <cstdlib>
 
 namespace llvm {
 
index 5496a541c05f185fb5ed441904e581504ad0d195..719e4832dac3213cc33ec6faf050849c0d32539c 100644 (file)
@@ -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"
index 932e7fbb7f7edb0d4ce0a9572a6b39340b17a3c1..0b8a9bdead49ea176bfba4d5a08d0e59f4171133 100644 (file)
@@ -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<SubClass*>(this)-> \
                visit##CLASS_TO_VISIT(static_cast<CLASS_TO_VISIT&>(I))
index 723794177c3075573ae43c4d4bcee181fd4615b7..9958b97a3e6472964bb4bd5634b84d4b82200d4c 100644 (file)
@@ -15,7 +15,7 @@
 #ifndef LLVM_SUPPORT_MUTEXGUARD_H
 #define LLVM_SUPPORT_MUTEXGUARD_H
 
-#include <llvm/System/Mutex.h>
+#include "llvm/System/Mutex.h"
 
 namespace llvm {
   /// Instances of this class acquire a given Mutex Lock when constructed and
index 961638c43f49a3ecbffaf6cef297b02b463c49e1..e489e0a6f0b5625fc3c135e4f971307cb5017b68 100644 (file)
@@ -129,4 +129,5 @@ public:
 };
 
 } // End llvm namespace
+
 #endif
index 2de2a02461dedfb3f5649801277a292adcfca395..9eb7a7704465acb6056a80c16a5ef5706e13788f 100644 (file)
@@ -59,4 +59,3 @@ namespace llvm {
 } // end namespace llvm
 
 #endif
-
index 5813ce35057076bc1525f882cc9505e4f296982e..6241ffe29b8f2a9ad8a08645f30c28e6718eb155 100644 (file)
@@ -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;
index d065df3cc332c82936ba75712be4117975c2abcb..2eeff85d66ec16c99626d31f86b154219277d845 100644 (file)
@@ -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;
index f08e2e957c9da2d9e4ff5365f106c437c3df9c3c..548cc077a94621fb053db8b1e6feb7a821bb0c6e 100644 (file)
@@ -16,8 +16,6 @@
 
 namespace llvm {
 
-  class MachineBasicBlock;
-
   //===--------------------------------------------------------------------===//
   //                          TargetELFWriterInfo
   //===--------------------------------------------------------------------===//
index 836d8721d601eb62b6653eff850d3d1ce033f061..3e26b9dd01bea6112c778d529388b30fdd4a1263 100644 (file)
@@ -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.
index 8378206bf1b7a3e10718b5445845b9523c37f702..2f6e00c01ac5ea028203d7bb7c6f13e8066957e6 100644 (file)
@@ -15,8 +15,6 @@
 #ifndef LLVM_TARGET_TARGETINSTRDESC_H
 #define LLVM_TARGET_TARGETINSTRDESC_H
 
-#include <cassert>
-
 namespace llvm {
 
 class TargetRegisterClass;
index e60933799ede071adad5f006a78d883df9674061..1d06cd790d2be33118465a2089ebd2d18ed581c0 100644 (file)
@@ -23,7 +23,6 @@
 namespace llvm {
   class Function;
   class GlobalValue;
-  class MachineBasicBlock;
   class MachineCodeEmitter;
   class MachineRelocation;
 
index fbc933d5d5d68c2f0ed2774f8f29352b3ae3fbe6..cbcfc53bf34bffb9abdc6cad2d33f78806fc396c 100644 (file)
@@ -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
index 38e377d1002e897e9c416055c33da5efa0d070ad..b8bfc83aad495c9dc5d1bbc0602e6a7447a30c42 100644 (file)
@@ -16,7 +16,6 @@
 
 #include "llvm/Target/TargetInstrItineraries.h"
 #include <cassert>
-#include <iosfwd>
 
 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();
index 105baef2bcd1ab9f6d8dbae02916bd2c540fcfec..fbc0bbc6f4049f8b45fece1574926e7871b276d5 100644 (file)
@@ -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 <cassert>
@@ -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
index 3ccc61280f7267e8e7eebae20fe9304116bd3242..35d2c0ce7e033cf74b095781dc34f15a394290ae 100644 (file)
 #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<typename T> 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
 
index f4e641002825f43a11b677d6ac6ecf08bce8ff5d..0ed44ba96abbfd16ac6a1e3cb07b3cfd02bf37b8 100644 (file)
@@ -134,4 +134,3 @@ private:
 } // End llvm namespace
 
 #endif
-
index 67cc6009e39767d416ea66c345c6d0fb5f38d918..c621c9f9abc2cfdccaebec3e0dab5e7619740b90 100644 (file)
 #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 <vector>
 using namespace llvm;
@@ -25,6 +28,12 @@ static RegisterPass<EscapeAnalysis> X("escape-analysis",
                                       "Pointer Escape Analysis", true, true);
 
 
+void EscapeAnalysis::getAnalysisUsage(AnalysisUsage &AU) const {
+  AU.addRequiredTransitive<TargetData>();
+  AU.addRequiredTransitive<AliasAnalysis>();
+  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.  
index 732829887e91391587fcccd0c2e95861f3ab3f07..3a0a740f0035dac54044516398947360793bf367 100644 (file)
@@ -18,6 +18,7 @@
 #include "llvm/InstrTypes.h"
 #include "llvm/Support/Streams.h"
 #include <cstdio>
+#include <cstdlib>
 #include <map>
 using namespace llvm;
 
index 8d607f0df7f8d672320f8f4725d6ec16812e60d2..b07e884b654796f0e01c72104eabaf917193d15d 100644 (file)
@@ -15,6 +15,7 @@
 #include "llvm/Bitcode/ReaderWriter.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Module.h"
+#include <cstdlib>
 #include <memory>
 using namespace llvm;
 
index 5e9843ccec85b884f6d816deb94ff0d2999eb5f8..adf053cf9b0c8a4ad3facddd88a6790b0a08bf77 100644 (file)
@@ -17,9 +17,7 @@
 #include "LLToken.h"
 #include "llvm/ADT/APSInt.h"
 #include "llvm/ADT/APFloat.h"
-#include <iosfwd>
 #include <string>
-#include <vector>
 
 namespace llvm {
   class MemoryBuffer;
index 8f6799362090e9a49d21c314b1b0a4d2af960a84..f7820484376c0eb3c6855bf17375e0b3d5f7821b 100644 (file)
@@ -26,3 +26,28 @@ static RegisterPass<MachineDominatorTree>
 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<MachineBasicBlock>(false);
+}
+
+MachineDominatorTree::~MachineDominatorTree() {
+  DT->releaseMemory();
+  delete DT;
+}
+
+void MachineDominatorTree::releaseMemory() {
+  DT->releaseMemory();
+}
index d0baaa87ae1beed2d477d98721c803d098e9af08..10f52a6195533f83cd4e4f7d235f0bbaa1b9d334 100644 (file)
@@ -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"
index 0f608d637c537a7fd4c1afab8e111c33ff441393..87114396f9e5fcb8c8f12fa6327ee6a3fe7a685f 100644 (file)
@@ -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"
index dc11400094cc4ca1ef9e779bc5455901c7d3247d..1e72b1201b0d7178d29f83c828049b4d07369835 100644 (file)
 #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 <map>
-#include <climits>
 using namespace llvm;
 
 STATISTIC(NumStalls, "Number of pipeline stalls");
index 919b94c5577b6ed1a5a0e2d52cc7f4844b947f1c..1e7d0a89c1de3fedd85ff74ff02983bfb51fd001 100644 (file)
@@ -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"
index ff593c156dd9c612d7097994da81245c75d9d23e..9447ff2c4107feb72db3320c38dae88052ae2816 100644 (file)
@@ -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;
 
index 7635c7e269947ceac1778d9fec6dc2bde091a4e3..436056c64456dc300fb7b8c400f5bb49784580b1 100644 (file)
@@ -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"
index c2b7d3f1db40aaa49fa0908ecfc52fff56557342..3221de064e3f5583bf5690b55a0d0075fd7b14e3 100644 (file)
@@ -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"
index abe392990d1ce2299dcb48092e9eb5219d6e712f..71a64a20385ef7464c9e3c3aa0fbdc1cfa45625e 100644 (file)
 #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 <queue>
 
 namespace llvm {
index 52a54eb5bd86876a418700207816dfb11edfa874..1d97f679822832c83fb1f723703ec661cc6dc68c 100644 (file)
@@ -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;
index 52c4486392e058c8b2c5eb0fb2a292edf80ffd33..8b494a7c617bc3de183a0b0bc31716b9b59b77dd 100644 (file)
@@ -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 <map>
 
index 78f48f6f731adba759d59d7d194f2525c1bf3b41..b12d90ac9db025b843385937f1f67514eb6ef6c7 100644 (file)
@@ -18,6 +18,7 @@
 #include "llvm/Debugger/InferiorProcess.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/ADT/StringExtras.h"
+#include <cstdlib>
 #include <memory>
 using namespace llvm;
 
index fc7da18fd0529ff4625ce358c4585aac7705f97c..f9555b7b0948bb36d89b3d737f1e1c62554babc3 100644 (file)
@@ -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"
index 4b26b2409ce3ff706b6ad818d0a9181f3d8c48d4..0358230c66a85d1442d274297f774a08888aebe6 100644 (file)
@@ -15,7 +15,6 @@
 #ifndef TARGET_ARM_H
 #define TARGET_ARM_H
 
-#include <iosfwd>
 #include <cassert>
 
 namespace llvm {
index 7b10565ba3a4caef2a33817f09a5e75dd00bd403..d2b9066dcc97cd777bc31e87f8c7eb8ec2cf2c1f 100644 (file)
@@ -15,7 +15,7 @@
 #define LLVM_TARGET_ARM_CONSTANTPOOLVALUE_H
 
 #include "llvm/CodeGen/MachineConstantPool.h"
-#include <ostream>
+#include <iosfwd>
 
 namespace llvm {
 
index f62270dd88f2d8269c5806d610f7494d4909d8f5..9af46d0c70f0a273c6ef1f8c446f8973b41e275b 100644 (file)
@@ -15,8 +15,6 @@
 #ifndef TARGET_ALPHA_H
 #define TARGET_ALPHA_H
 
-#include <iosfwd>
-
 namespace llvm {
 
   class AlphaTargetMachine;
index bd6f2cf3e37bbe52d715803a94779f2f4971e6cf..fa8224f113ffe39f780363bb84020b6b1b2807c9 100644 (file)
@@ -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;
 
index 776b9bfb0832214cde0633027b731be0b399897d..a6a911067fd836946b91f580a0463cbaea9d00b3 100644 (file)
@@ -16,7 +16,6 @@
 #define LLVM_TARGET_IBMCELLSPU_H
 
 #include "llvm/Support/DataTypes.h"
-#include <iosfwd>
 
 namespace llvm {
   class SPUTargetMachine;
index 1fe148813109594e03a9880b7acdb40b85baf2d9..030a23382f7fa0e95f4685575d1448e68e738b76 100644 (file)
@@ -14,8 +14,6 @@
 #ifndef TARGET_IA64_H
 #define TARGET_IA64_H
 
-#include <iosfwd>
-
 namespace llvm {
 
 class IA64TargetMachine;
index a9dce854521e6ac0ed7584566053da4981a48bfb..0a13c68abf892bff16be778bbdf85311b5032792 100644 (file)
@@ -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;
 
index c64ceeeff5945648c794ac42b09ebe19247f5a1a..45f5579bfb3411066225ab6dcec9192be3c9d8ef 100644 (file)
@@ -27,7 +27,6 @@
 #include "llvm/Target/TargetMachine.h"
 #include "llvm/Target/TargetMachineRegistry.h"
 #include "llvm/Support/Mangler.h"
-#include <algorithm>
 #include <ios>
 using namespace llvm;
 
index 1dc53ca342f7b4bc9ab1ac4da1e5c168c2c79a62..03f5a525ba61ee796341e5a287d7b1f1624dcebc 100644 (file)
@@ -15,8 +15,6 @@
 #ifndef TARGET_MIPS_H
 #define TARGET_MIPS_H
 
-#include <iosfwd>
-
 namespace llvm {
   class MipsTargetMachine;
   class FunctionPass;
index fd5658c721adacea9bd2592c8c72ab9d0196794c..b95394ec81cea41d4bcf77a982c0057b6e8fa69a 100644 (file)
@@ -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"
index f35acd573158a01574ec2f05da9841de53705033..6850bd664bcf1eea5d6b1ab6867f570150ef36a4 100644 (file)
@@ -15,8 +15,6 @@
 #ifndef LLVM_TARGET_PIC16_H
 #define LLVM_TARGET_PIC16_H
 
-#include <iosfwd>
-
 namespace llvm {
   class PIC16TargetMachine;
   class FunctionPass;
index 9a8e22e88debf3960a1463fd9deed2cf8cafbbcf..773b9c169b46b041a2586e1ab63c3872e21f6559 100644 (file)
@@ -15,9 +15,6 @@
 #ifndef LLVM_TARGET_POWERPC_H
 #define LLVM_TARGET_POWERPC_H
 
-#include <iosfwd>
-
-
 // GCC #defines PPC on Linux but we use it as our namespace name
 #undef PPC
 
index e63368bd6599253690a17568db486c941a1cdfc3..425d8e6195c6a5cd7491ba481d7d96bb7ad8b712 100644 (file)
@@ -16,6 +16,7 @@
 #include "llvm/Module.h"
 #include "llvm/Target/TargetMachine.h"
 #include "PPCGenSubtarget.inc"
+#include <cstdlib>
 using namespace llvm;
 
 #if defined(__APPLE__)
index 1096144e87b7cdb7d7af77107cb9baaeddc915e0..baac8f0159afc8c0b92546ad2c24b2ebf77f185a 100644 (file)
@@ -15,7 +15,6 @@
 #ifndef TARGET_SPARC_H
 #define TARGET_SPARC_H
 
-#include <iosfwd>
 #include <cassert>
 
 namespace llvm {
index 8b07bcbabc58f3e48672377997acdbfd452263fc..8601cbe4df7b99280d35f13a4c37a39c80eba2dd 100644 (file)
@@ -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;
index 0c2d3b36a2f77377e2337fcd5cde7f26aab1b2f5..135787b98a958a39fe2238d1ef4be4984b76d2a0 100644 (file)
@@ -15,8 +15,6 @@
 #ifndef TARGET_X86_H
 #define TARGET_X86_H
 
-#include <iosfwd>
-
 namespace llvm {
 
 class X86TargetMachine;
index cb12a9d53c958f5a3a86a5444394f0e8d561e009..9170c24ddbcaf6f2f8c31cc2bd30f334cb0dbaa2 100644 (file)
@@ -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<MachineOperand,4> &MOs,
+                                     const SmallVectorImpl<MachineOperand> &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<MachineOperand,4> &MOs,
+                              const SmallVectorImpl<MachineOperand> &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<MachineOperand,4> &MOs,
+                                const SmallVectorImpl<MachineOperand> &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<MachineOperand,4> &MOs) const{
+                                    const SmallVectorImpl<MachineOperand> &MOs) const{
   const DenseMap<unsigned*, unsigned> *OpcodeTablePtr = NULL;
   bool isTwoAddrFold = false;
   unsigned NumOps = MI->getDesc().getNumOperands();
index 21c9a1f0179be3a4229041bd747519e9f157f9b1..a75c5e64d15df16f91182e81d998c385334693dd 100644 (file)
@@ -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<MachineOperand,4> &MOs) const;
+                                      const SmallVectorImpl<MachineOperand> &MOs) const;
 };
 
 } // End llvm namespace
index 25d7b07bad14db8b36a88c37358a85788fc85fef..b51a53327f5b69f5e514dbe492ceb4699ff7a706 100644 (file)
@@ -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"
 
index 646a953370fe77d7ec8108943b32e48dcf700391..ded26e891e16c62e8f39eef0ff72b398a7c6d83b 100644 (file)
@@ -15,7 +15,6 @@
 #define X86SUBTARGET_H
 
 #include "llvm/Target/TargetSubtarget.h"
-
 #include <string>
 
 namespace llvm {
index ba58fbd987a66824590bcc55677af6f8680a7f17..848f2b87c4eed2e2ec8c5e9661dafa9fac2992cc 100644 (file)
@@ -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;
 
index 8210350d71544f863e0f920b6b36a20b9ffdc2bc..8eaff880ee40613451609298b049af7692cfefa7 100644 (file)
@@ -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;