Index: llvm/trunk/include/llvm/CodeGen/PseudoSourceValue.h =================================================================== --- llvm/trunk/include/llvm/CodeGen/PseudoSourceValue.h +++ llvm/trunk/include/llvm/CodeGen/PseudoSourceValue.h @@ -36,7 +36,7 @@ /// below the stack frame (e.g., argument space), or constant pool. class PseudoSourceValue { public: - enum PSVKind { + enum PSVKind : unsigned { Stack, GOT, JumpTable, @@ -48,7 +48,7 @@ }; private: - PSVKind Kind; + unsigned Kind; unsigned AddressSpace; friend raw_ostream &llvm::operator<<(raw_ostream &OS, const PseudoSourceValue* PSV); @@ -60,11 +60,11 @@ virtual void printCustom(raw_ostream &O) const; public: - explicit PseudoSourceValue(PSVKind Kind, const TargetInstrInfo &TII); + explicit PseudoSourceValue(unsigned Kind, const TargetInstrInfo &TII); virtual ~PseudoSourceValue(); - PSVKind kind() const { return Kind; } + unsigned kind() const { return Kind; } bool isStack() const { return Kind == Stack; } bool isGOT() const { return Kind == GOT; } @@ -116,7 +116,7 @@ class CallEntryPseudoSourceValue : public PseudoSourceValue { protected: - CallEntryPseudoSourceValue(PSVKind Kind, const TargetInstrInfo &TII); + CallEntryPseudoSourceValue(unsigned Kind, const TargetInstrInfo &TII); public: bool isConstant(const MachineFrameInfo *) const override; Index: llvm/trunk/include/llvm/CodeGen/TargetInstrInfo.h =================================================================== --- llvm/trunk/include/llvm/CodeGen/TargetInstrInfo.h +++ llvm/trunk/include/llvm/CodeGen/TargetInstrInfo.h @@ -1063,7 +1063,7 @@ /// getAddressSpaceForPseudoSourceKind - Given the kind of memory /// (e.g. stack) the target returns the corresponding address space. virtual unsigned - getAddressSpaceForPseudoSourceKind(PseudoSourceValue::PSVKind Kind) const { + getAddressSpaceForPseudoSourceKind(unsigned Kind) const { return 0; } Index: llvm/trunk/lib/CodeGen/PseudoSourceValue.cpp =================================================================== --- llvm/trunk/lib/CodeGen/PseudoSourceValue.cpp +++ llvm/trunk/lib/CodeGen/PseudoSourceValue.cpp @@ -25,7 +25,7 @@ "Stack", "GOT", "JumpTable", "ConstantPool", "FixedStack", "GlobalValueCallEntry", "ExternalSymbolCallEntry"}; -PseudoSourceValue::PseudoSourceValue(PSVKind Kind, const TargetInstrInfo &TII) +PseudoSourceValue::PseudoSourceValue(unsigned Kind, const TargetInstrInfo &TII) : Kind(Kind) { AddressSpace = TII.getAddressSpaceForPseudoSourceKind(Kind); } @@ -81,7 +81,7 @@ } CallEntryPseudoSourceValue::CallEntryPseudoSourceValue( - PSVKind Kind, const TargetInstrInfo &TII) + unsigned Kind, const TargetInstrInfo &TII) : PseudoSourceValue(Kind, TII) {} bool CallEntryPseudoSourceValue::isConstant(const MachineFrameInfo *) const { Index: llvm/trunk/lib/Target/AMDGPU/R600InstrInfo.h =================================================================== --- llvm/trunk/lib/Target/AMDGPU/R600InstrInfo.h +++ llvm/trunk/lib/Target/AMDGPU/R600InstrInfo.h @@ -324,7 +324,7 @@ } unsigned getAddressSpaceForPseudoSourceKind( - PseudoSourceValue::PSVKind Kind) const override; + unsigned Kind) const override; }; namespace R600 { Index: llvm/trunk/lib/Target/AMDGPU/R600InstrInfo.cpp =================================================================== --- llvm/trunk/lib/Target/AMDGPU/R600InstrInfo.cpp +++ llvm/trunk/lib/Target/AMDGPU/R600InstrInfo.cpp @@ -1500,7 +1500,7 @@ } unsigned R600InstrInfo::getAddressSpaceForPseudoSourceKind( - PseudoSourceValue::PSVKind Kind) const { + unsigned Kind) const { switch (Kind) { case PseudoSourceValue::Stack: case PseudoSourceValue::FixedStack: Index: llvm/trunk/lib/Target/AMDGPU/SIInstrInfo.h =================================================================== --- llvm/trunk/lib/Target/AMDGPU/SIInstrInfo.h +++ llvm/trunk/lib/Target/AMDGPU/SIInstrInfo.h @@ -276,7 +276,7 @@ unsigned TrueReg, unsigned FalseReg) const; unsigned getAddressSpaceForPseudoSourceKind( - PseudoSourceValue::PSVKind Kind) const override; + unsigned Kind) const override; bool areMemAccessesTriviallyDisjoint(MachineInstr &MIa, MachineInstr &MIb, Index: llvm/trunk/lib/Target/AMDGPU/SIInstrInfo.cpp =================================================================== --- llvm/trunk/lib/Target/AMDGPU/SIInstrInfo.cpp +++ llvm/trunk/lib/Target/AMDGPU/SIInstrInfo.cpp @@ -1933,7 +1933,7 @@ } unsigned SIInstrInfo::getAddressSpaceForPseudoSourceKind( - PseudoSourceValue::PSVKind Kind) const { + unsigned Kind) const { switch(Kind) { case PseudoSourceValue::Stack: case PseudoSourceValue::FixedStack: