diff options
Diffstat (limited to 'llvm')
21 files changed, 28 insertions, 45 deletions
diff --git a/llvm/include/llvm/CodeGen/InstrSelection.h b/llvm/include/llvm/CodeGen/InstrSelection.h index 0a8a92706d0..e07ebd7a333 100644 --- a/llvm/include/llvm/CodeGen/InstrSelection.h +++ b/llvm/include/llvm/CodeGen/InstrSelection.h @@ -13,7 +13,6 @@ #define LLVM_CODEGEN_INSTR_SELECTION_H #include "llvm/Instruction.h" -#include <vector> class Method; class InstrForest; class MachineInstr; diff --git a/llvm/include/llvm/CodeGen/MachineInstr.h b/llvm/include/llvm/CodeGen/MachineInstr.h index 9903f09c01d..29e832dd585 100644 --- a/llvm/include/llvm/CodeGen/MachineInstr.h +++ b/llvm/include/llvm/CodeGen/MachineInstr.h @@ -19,7 +19,7 @@ #include "llvm/CodeGen/InstrForest.h" #include "llvm/Support/DataTypes.h" #include "llvm/Support/NonCopyable.h" -#include "llvm/Target/Machine.h" +#include "llvm/Target/InstInfo.h" template<class _MI, class _V> class ValOpIterator; diff --git a/llvm/include/llvm/ConstPoolVals.h b/llvm/include/llvm/ConstPoolVals.h index 09260b5cea7..71ca6a7a96d 100644 --- a/llvm/include/llvm/ConstPoolVals.h +++ b/llvm/include/llvm/ConstPoolVals.h @@ -10,7 +10,6 @@ #include "llvm/User.h" #include "llvm/Support/DataTypes.h" -#include <vector> class ArrayType; class StructType; diff --git a/llvm/include/llvm/DerivedTypes.h b/llvm/include/llvm/DerivedTypes.h index e024ed3edc4..3f93459b232 100644 --- a/llvm/include/llvm/DerivedTypes.h +++ b/llvm/include/llvm/DerivedTypes.h @@ -12,7 +12,6 @@ #define LLVM_DERIVED_TYPES_H #include "llvm/Type.h" -#include <vector> class DerivedType : public Type { // AbstractTypeUsers - Implement a list of the users that need to be notified diff --git a/llvm/include/llvm/InstrTypes.h b/llvm/include/llvm/InstrTypes.h index 1f771e63501..75c4943e445 100644 --- a/llvm/include/llvm/InstrTypes.h +++ b/llvm/include/llvm/InstrTypes.h @@ -10,8 +10,6 @@ #define LLVM_INSTRUCTION_TYPES_H #include "llvm/Instruction.h" -#include <list> -#include <vector> class Method; class SymTabValue; diff --git a/llvm/include/llvm/Instruction.h b/llvm/include/llvm/Instruction.h index 2bb590bc5e5..3bbb8e7031e 100644 --- a/llvm/include/llvm/Instruction.h +++ b/llvm/include/llvm/Instruction.h @@ -13,7 +13,7 @@ class Type; class BasicBlock; class Method; -class MachineInstr; // do not include header file MachineInstr.h +class MachineInstr; class MachineCodeForVMInstr; class Instruction : public User { diff --git a/llvm/include/llvm/SymbolTable.h b/llvm/include/llvm/SymbolTable.h index a53608f1d95..18ccf136c0c 100644 --- a/llvm/include/llvm/SymbolTable.h +++ b/llvm/include/llvm/SymbolTable.h @@ -17,7 +17,6 @@ #define LLVM_SYMBOL_TABLE_H #include "llvm/Value.h" -#include <vector> #include <map> class Value; diff --git a/llvm/include/llvm/Target/Data.h b/llvm/include/llvm/Target/Data.h index 55739503e72..aa0afbcb7d6 100644 --- a/llvm/include/llvm/Target/Data.h +++ b/llvm/include/llvm/Target/Data.h @@ -14,7 +14,6 @@ #define LLVM_TARGET_DATA_H #include "llvm/Type.h" -#include <vector> class StructType; class StructLayout; diff --git a/llvm/include/llvm/Target/RegInfo.h b/llvm/include/llvm/Target/RegInfo.h index 726baabf24f..bb1b029b28c 100644 --- a/llvm/include/llvm/Target/RegInfo.h +++ b/llvm/include/llvm/Target/RegInfo.h @@ -8,9 +8,14 @@ #ifndef LLVM_TARGET_REGINFO_H #define LLVM_TARGET_REGINFO_H -class LiveRangeInfo; -class Method; +#include "llvm/Support/NonCopyable.h" +#include <hash_map> +#include <string> + +class Value; class Instruction; +class Method; +class LiveRangeInfo; class LiveRange; class AddedInstrns; class MachineInstr; diff --git a/llvm/include/llvm/User.h b/llvm/include/llvm/User.h index d914b1fc1d8..535dd1e88af 100644 --- a/llvm/include/llvm/User.h +++ b/llvm/include/llvm/User.h @@ -13,7 +13,6 @@ #define LLVM_USER_H #include "llvm/Value.h" -#include <vector> class User : public Value { User(const User &); // Do not implement diff --git a/llvm/include/llvm/Value.h b/llvm/include/llvm/Value.h index dd97d3577d7..d2bf4cd5f19 100644 --- a/llvm/include/llvm/Value.h +++ b/llvm/include/llvm/Value.h @@ -8,7 +8,7 @@ #ifndef LLVM_VALUE_H #define LLVM_VALUE_H -#include <list> +#include <vector> #include "llvm/Annotation.h" #include "llvm/AbstractTypeUser.h" @@ -44,7 +44,7 @@ public: }; private: - list<User *> Uses; + vector<User *> Uses; string Name; PATypeHandle<Type> Ty; ValueTy VTy; @@ -130,10 +130,10 @@ public: virtual void refineAbstractType(const DerivedType *OldTy, const Type *NewTy); //---------------------------------------------------------------------- - // Methods for handling the list of uses of this DEF. + // Methods for handling the vector of uses of this Value. // - typedef list<User*>::iterator use_iterator; - typedef list<User*>::const_iterator use_const_iterator; + typedef vector<User*>::iterator use_iterator; + typedef vector<User*>::const_iterator use_const_iterator; inline unsigned use_size() const { return Uses.size(); } inline bool use_empty() const { return Uses.empty(); } diff --git a/llvm/include/llvm/iOther.h b/llvm/include/llvm/iOther.h index 97f32625810..e723d4e9751 100644 --- a/llvm/include/llvm/iOther.h +++ b/llvm/include/llvm/iOther.h @@ -10,7 +10,6 @@ #include "llvm/InstrTypes.h" #include "llvm/Method.h" -#include <vector> //===----------------------------------------------------------------------===// // PHINode Class diff --git a/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp b/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp index 494da31cf5b..382dc3b60bd 100644 --- a/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp +++ b/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp @@ -9,7 +9,7 @@ //*************************************************************************** #include "llvm/CodeGen/InstrScheduling.h" -#include "llvm/CodeGen/SchedPriorities.h" +#include "SchedPriorities.h" #include "llvm/Analysis/LiveVar/BBLiveVar.h" #include "llvm/CodeGen/MachineInstr.h" #include "llvm/Support/CommandLine.h" diff --git a/llvm/lib/CodeGen/InstrSched/SchedGraph.cpp b/llvm/lib/CodeGen/InstrSched/SchedGraph.cpp index 1ad2b0fb453..5f0de8b9322 100644 --- a/llvm/lib/CodeGen/InstrSched/SchedGraph.cpp +++ b/llvm/lib/CodeGen/InstrSched/SchedGraph.cpp @@ -11,11 +11,11 @@ * 7/20/01 - Vikram Adve - Created ***************************************************************************/ +#include "SchedGraph.h" #include "llvm/InstrTypes.h" #include "llvm/Instruction.h" #include "llvm/BasicBlock.h" #include "llvm/Method.h" -#include "llvm/CodeGen/SchedGraph.h" #include "llvm/CodeGen/MachineInstr.h" #include "llvm/Target/InstInfo.h" #include "llvm/Support/StringExtras.h" diff --git a/llvm/include/llvm/CodeGen/SchedGraph.h b/llvm/lib/CodeGen/InstrSched/SchedGraph.h index e12d90ffcdd..e12d90ffcdd 100644 --- a/llvm/include/llvm/CodeGen/SchedGraph.h +++ b/llvm/lib/CodeGen/InstrSched/SchedGraph.h diff --git a/llvm/lib/CodeGen/InstrSched/SchedPriorities.cpp b/llvm/lib/CodeGen/InstrSched/SchedPriorities.cpp index c09f9fc24e5..a4396c2d256 100644 --- a/llvm/lib/CodeGen/InstrSched/SchedPriorities.cpp +++ b/llvm/lib/CodeGen/InstrSched/SchedPriorities.cpp @@ -18,7 +18,7 @@ * 7/30/01 - Vikram Adve - Created ***************************************************************************/ -#include "llvm/CodeGen/SchedPriorities.h" +#include "SchedPriorities.h" SchedPriorities::SchedPriorities(const Method* method, diff --git a/llvm/include/llvm/CodeGen/SchedPriorities.h b/llvm/lib/CodeGen/InstrSched/SchedPriorities.h index 45f19b46544..1765dba5b83 100644 --- a/llvm/include/llvm/CodeGen/SchedPriorities.h +++ b/llvm/lib/CodeGen/InstrSched/SchedPriorities.h @@ -21,9 +21,9 @@ #ifndef LLVM_CODEGEN_SCHEDPRIORITIES_H #define LLVM_CODEGEN_SCHEDPRIORITIES_H +#include "SchedGraph.h" #include "llvm/CodeGen/InstrScheduling.h" #include "llvm/Analysis/LiveVar/MethodLiveVarInfo.h" -#include "llvm/CodeGen/SchedGraph.h" #include "llvm/Target/SchedInfo.h" class Method; diff --git a/llvm/lib/Target/Sparc/Sparc.cpp b/llvm/lib/Target/Sparc/Sparc.cpp index cf09734e81b..f1be4060be1 100644 --- a/llvm/lib/Target/Sparc/Sparc.cpp +++ b/llvm/lib/Target/Sparc/Sparc.cpp @@ -8,12 +8,16 @@ // 7/15/01 - Vikram Adve - Created //**************************************************************************/ -#include "llvm/CodeGen/Sparc.h" +#include "llvm/Target/Sparc.h" #include "SparcInternals.h" #include "llvm/Method.h" #include "llvm/CodeGen/InstrScheduling.h" #include "llvm/CodeGen/InstrSelection.h" +// allocateSparcTargetMachine - Allocate and return a subclass of TargetMachine +// that implements the Sparc backend. (the llvm/CodeGen/Sparc.h interface) +// +TargetMachine *allocateSparcTargetMachine() { return new UltraSparc(); } //--------------------------------------------------------------------------- @@ -115,7 +119,3 @@ bool UltraSparc::compileMethod(Method *M) { return false; } -// allocateSparcTargetMachine - Allocate and return a subclass of TargetMachine -// that implements the Sparc backend. -// -TargetMachine *allocateSparcTargetMachine() { return new UltraSparc(); } diff --git a/llvm/lib/Target/Sparc/SparcInternals.h b/llvm/lib/Target/Sparc/SparcInternals.h index f9a344b37af..e4f0a8bd10a 100644 --- a/llvm/lib/Target/Sparc/SparcInternals.h +++ b/llvm/lib/Target/Sparc/SparcInternals.h @@ -8,11 +8,10 @@ #ifndef SPARC_INTERNALS_H #define SPARC_INTERNALS_H -#include "llvm/Target/Machine.h" #include "SparcRegInfo.h" - -#include <sys/types.h> +#include "llvm/Target/SchedInfo.h" #include "llvm/Type.h" +#include <sys/types.h> class UltraSparc; @@ -39,17 +38,6 @@ enum SparcInstrSchedClass { SPARC_NUM_SCHED_CLASSES = SPARC_INV }; -// inline operator int (const SparcInstrSchedClass& si) { -// return (int) si; -// } -// -// inline operator SparcInstrSchedClass (int i) { -// return (SparcInstrSchedClass) si; -// } -// -// inline operator const SparcInstrSchedClass (int i) { -// return (const SparcInstrSchedClass) si; -// } //--------------------------------------------------------------------------- // enum SparcMachineOpCode. @@ -60,7 +48,6 @@ enum SparcInstrSchedClass { // //--------------------------------------------------------------------------- - enum SparcMachineOpCode { NOP, diff --git a/llvm/lib/Target/Sparc/SparcV9RegInfo.h b/llvm/lib/Target/Sparc/SparcV9RegInfo.h index 3ebef550f08..67aa3a62ea3 100644 --- a/llvm/lib/Target/Sparc/SparcV9RegInfo.h +++ b/llvm/lib/Target/Sparc/SparcV9RegInfo.h @@ -7,7 +7,7 @@ #ifndef SPARC_INT_REG_CLASS_H #define SPARC_INT_REG_CLASS_H -#include "llvm/Target/Machine.h" +#include "llvm/Target/RegInfo.h" //----------------------------------------------------------------------------- // Integer Register Class diff --git a/llvm/lib/VMCore/Value.cpp b/llvm/lib/VMCore/Value.cpp index e48341ef51a..a41262d0c64 100644 --- a/llvm/lib/VMCore/Value.cpp +++ b/llvm/lib/VMCore/Value.cpp @@ -1,6 +1,6 @@ //===-- Value.cpp - Implement the Value class -----------------------------===// // -// This file implements the Value class. +// This file implements the Value, User, and SymTabValue classes. // //===----------------------------------------------------------------------===// @@ -44,7 +44,7 @@ void Value::replaceAllUsesWith(Value *D) { assert(D && "Value::replaceAllUsesWith(<null>) is invalid!"); assert(D != this && "V->replaceAllUsesWith(V) is NOT valid!"); while (!Uses.empty()) { - User *Use = Uses.front(); + User *Use = Uses.back(); #ifndef NDEBUG unsigned NumUses = Uses.size(); #endif |

