} // End of namespace llvm.
-
#endif
-
#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 {
#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
#include "llvm/ADT/iterator.h"
#include <cassert>
-#include <cstdlib>
namespace llvm {
}
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);
}
#define LLVM_ANALYSIS_CONSTANTSSCANNER_H
#include "llvm/Support/InstIterator.h"
-#include "llvm/Instruction.h"
#include "llvm/ADT/iterator.h"
namespace llvm {
#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
#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"
#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.
EscapePoints.clear();
}
- void getAnalysisUsage(AnalysisUsage &AU) const {
- AU.addRequiredTransitive<TargetData>();
- AU.addRequiredTransitive<AliasAnalysis>();
- AU.setPreservesAll();
- }
+ void getAnalysisUsage(AnalysisUsage &AU) const;
//===---------------------------------------------------------------------
// Client API
namespace llvm {
class Type;
+class Value;
class FindUsedTypes : public ModulePass {
std::set<const Type *> UsedTypes;
class DominatorTree;
class LoopInfo;
-class PHINode;
-class Instruction;
template<class N> class LoopInfoBase;
template<class N> class LoopBase;
#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"
}
#endif
-
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallPtrSet.h"
-#include "llvm/ADT/SmallVector.h"
+#include <iosfwd>
#include <vector>
#include <set>
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.
#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;
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
class ConstantVector;
class GCMetadataPrinter;
class GlobalVariable;
- class GlobalAlias;
class MachineConstantPoolEntry;
class MachineConstantPoolValue;
class MachineModuleInfo;
-//===--------- BreakCriticalMachineEdges.h - Break critical edges ---------===//
+//===--------- BreakCriticalMachineEdge.h - Break critical edges ---------===//
//
// The LLVM Compiler Infrastructure
//
//
//===---------------------------------------------------------------------===//
-#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"
#ifndef LLVM_CODEGEN_DWARFWRITER_H
#define LLVM_CODEGEN_DWARFWRITER_H
-#include <iosfwd>
-
namespace llvm {
class AsmPrinter;
DwarfException *DE;
public:
-
DwarfWriter(raw_ostream &OS, AsmPrinter *A, const TargetAsmInfo *T);
virtual ~DwarfWriter();
} // end llvm namespace
#endif // LLVM_CODEGEN_ELF_RELOCATION_H
-
#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"
#ifndef LLVM_CODEGEN_FILEWRITERS_H
#define LLVM_CODEGEN_FILEWRITERS_H
-#include <iosfwd>
-
namespace llvm {
class PassManagerBase;
#include "llvm/CodeGen/GCMetadata.h"
#include "llvm/CodeGen/GCStrategy.h"
#include "llvm/Support/Registry.h"
-#include <iosfwd>
-#include <string>
namespace llvm {
#include "llvm/CodeGen/GCMetadata.h"
#include "llvm/Support/Registry.h"
-#include <iosfwd>
#include <string>
namespace llvm {
}
#endif // LLVM_CODEGEN_LINKALLASMWRITERCOMPONENTS_H
-
#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>
#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 {
namespace llvm {
-class AsmPrinter;
class Constant;
class FoldingSetNodeID;
class TargetData;
#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"
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
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);
}
- virtual void releaseMemory() {
- DT->releaseMemory();
- }
+ virtual void releaseMemory();
virtual void print(std::ostream &OS, const Module* M= 0) const {
DT->print(OS, M);
#ifndef LLVM_CODEGEN_MACHINEINSTRBUILDER_H
#define LLVM_CODEGEN_MACHINEINSTRBUILDER_H
-#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineFunction.h"
namespace llvm {
#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 {
//===----------------------------------------------------------------------===//
#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
#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"
#include "llvm/ADT/StringSet.h"
#include "llvm/System/Path.h"
-#include <string>
#include <vector>
namespace llvmc {
} // end namespace llvm
#endif
-
#include <vector>
#include <map>
-#include <cassert>
#include <string>
#include "llvm/System/Mutex.h"
#include "llvm/ADT/SmallVector.h"
class Module;
class Constant;
-class PointerType;
template<typename ValueSubClass, typename ItemParentClass>
class SymbolTableListTraits;
class Module;
class Constant;
-class PointerType;
template<typename ValueSubClass, typename ItemParentClass>
class SymbolTableListTraits;
#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;
namespace llvm {
-class Value;
class BasicBlock;
class Function;
class Module;
-//===- llvm/PassManager.h - Pass Inftrastructre classes --------*- C++ -*-===//
+//===- llvm/PassManagers.h - Pass Infrastructure classes -------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
//
//===----------------------------------------------------------------------===//
-#ifndef PASSMANAGERS_H
-#define PASSMANAGERS_H
+#ifndef LLVM_PASSMANAGERS_H
+#define LLVM_PASSMANAGERS_H
#include "llvm/PassManager.h"
#include "llvm/ADT/SmallVector.h"
extern void StopPassTimer(llvm::Pass *);
#endif
-
#ifndef LLVM_SUPPORT_ANNOTATION_H
#define LLVM_SUPPORT_ANNOTATION_H
-#include <string>
#include <cassert>
namespace llvm {
#define LLVM_SUPPORT_DATAFLOW_H
#include "llvm/User.h"
-#include "llvm/Value.h"
#include "llvm/ADT/GraphTraits.h"
namespace llvm {
#ifndef LLVM_SUPPORT_DEBUGINFOBUILDER_H
#define LLVM_SUPPORT_DEBUGINFOBUILDER_H
-#include <llvm/Module.h>
+#include "llvm/Module.h"
#include <string>
namespace llvm {
#include "llvm/Support/DataTypes.h"
#include <cstring>
-#include <cstdlib>
namespace llvm {
#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"
#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))
#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
};
} // End llvm namespace
+
#endif
} // end namespace llvm
#endif
-
#define LLVM_DARWIN_TARGET_ASM_INFO_H
#include "llvm/Target/TargetAsmInfo.h"
-#include "llvm/Target/TargetMachine.h"
namespace llvm {
class GlobalValue;
#define LLVM_ELF_TARGET_ASM_INFO_H
#include "llvm/Target/TargetAsmInfo.h"
-#include "llvm/Target/TargetMachine.h"
namespace llvm {
class GlobalValue;
namespace llvm {
- class MachineBasicBlock;
-
//===--------------------------------------------------------------------===//
// TargetELFWriterInfo
//===--------------------------------------------------------------------===//
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.
#ifndef LLVM_TARGET_TARGETINSTRDESC_H
#define LLVM_TARGET_TARGETINSTRDESC_H
-#include <cassert>
-
namespace llvm {
class TargetRegisterClass;
namespace llvm {
class Function;
class GlobalValue;
- class MachineBasicBlock;
class MachineCodeEmitter;
class MachineRelocation;
#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"
namespace llvm {
class AllocaInst;
+ class CallInst;
class Function;
class FastISel;
class MachineBasicBlock;
class TargetRegisterClass;
class TargetSubtarget;
class Value;
- class VectorType;
//===----------------------------------------------------------------------===//
/// TargetLowering - This class defines information used to lower LLVM code to
#include "llvm/Target/TargetInstrItineraries.h"
#include <cassert>
-#include <iosfwd>
namespace llvm {
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.
/// 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();
#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>
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
#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.
/// 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
} // End llvm namespace
#endif
-
#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;
"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.
#include "llvm/InstrTypes.h"
#include "llvm/Support/Streams.h"
#include <cstdio>
+#include <cstdlib>
#include <map>
using namespace llvm;
#include "llvm/Bitcode/ReaderWriter.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Module.h"
+#include <cstdlib>
#include <memory>
using namespace llvm;
#include "LLToken.h"
#include "llvm/ADT/APSInt.h"
#include "llvm/ADT/APFloat.h"
-#include <iosfwd>
#include <string>
-#include <vector>
namespace llvm {
class MemoryBuffer;
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();
+}
#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"
#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"
#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");
#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"
#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;
#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"
#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"
#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 {
#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;
#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>
#include "llvm/Debugger/InferiorProcess.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/ADT/StringExtras.h"
+#include <cstdlib>
#include <memory>
using namespace llvm;
#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"
#ifndef TARGET_ARM_H
#define TARGET_ARM_H
-#include <iosfwd>
#include <cassert>
namespace llvm {
#define LLVM_TARGET_ARM_CONSTANTPOOLVALUE_H
#include "llvm/CodeGen/MachineConstantPool.h"
-#include <ostream>
+#include <iosfwd>
namespace llvm {
#ifndef TARGET_ALPHA_H
#define TARGET_ALPHA_H
-#include <iosfwd>
-
namespace llvm {
class AlphaTargetMachine;
#include "AlphaInstrInfo.h"
#include "AlphaGenInstrInfo.inc"
#include "llvm/ADT/STLExtras.h"
+#include "llvm/ADT/SmallVector.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
using namespace llvm;
#define LLVM_TARGET_IBMCELLSPU_H
#include "llvm/Support/DataTypes.h"
-#include <iosfwd>
namespace llvm {
class SPUTargetMachine;
#ifndef TARGET_IA64_H
#define TARGET_IA64_H
-#include <iosfwd>
-
namespace llvm {
class IA64TargetMachine;
#include "IA64.h"
#include "IA64InstrBuilder.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
+#include "llvm/ADT/SmallVector.h"
#include "IA64GenInstrInfo.inc"
using namespace llvm;
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetMachineRegistry.h"
#include "llvm/Support/Mangler.h"
-#include <algorithm>
#include <ios>
using namespace llvm;
#ifndef TARGET_MIPS_H
#define TARGET_MIPS_H
-#include <iosfwd>
-
namespace llvm {
class MipsTargetMachine;
class FunctionPass;
#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"
#ifndef LLVM_TARGET_PIC16_H
#define LLVM_TARGET_PIC16_H
-#include <iosfwd>
-
namespace llvm {
class PIC16TargetMachine;
class FunctionPass;
#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
#include "llvm/Module.h"
#include "llvm/Target/TargetMachine.h"
#include "PPCGenSubtarget.inc"
+#include <cstdlib>
using namespace llvm;
#if defined(__APPLE__)
#ifndef TARGET_SPARC_H
#define TARGET_SPARC_H
-#include <iosfwd>
#include <cassert>
namespace llvm {
#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;
#ifndef TARGET_X86_H
#define TARGET_X86_H
-#include <iosfwd>
-
namespace llvm {
class X86TargetMachine;
#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"
}
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);
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);
}
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));
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();
#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 {
MachineInstr* foldMemoryOperandImpl(MachineFunction &MF,
MachineInstr* MI,
unsigned OpNum,
- const SmallVector<MachineOperand,4> &MOs) const;
+ const SmallVectorImpl<MachineOperand> &MOs) const;
};
} // End llvm namespace
#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"
#define X86SUBTARGET_H
#include "llvm/Target/TargetSubtarget.h"
-
#include <string>
namespace llvm {
#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;
#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;