From: Dan Gohman Date: Mon, 24 Oct 2011 23:48:52 +0000 (+0000) Subject: Remove the SystemZ backend. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0986eb5c59c43809df95bac10138edd44c1ebb69;p=clang Remove the SystemZ backend. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142879 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index e8380f0d93..d852f4c0fc 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -2932,66 +2932,6 @@ namespace { } } - -namespace { - class SystemZTargetInfo : public TargetInfo { - static const char * const GCCRegNames[]; - public: - SystemZTargetInfo(const std::string& triple) : TargetInfo(triple) { - TLSSupported = false; - IntWidth = IntAlign = 32; - LongWidth = LongLongWidth = LongAlign = LongLongAlign = 64; - PointerWidth = PointerAlign = 64; - DescriptionString = "E-p:64:64:64-i8:8:16-i16:16:16-i32:32:32-" - "i64:64:64-f32:32:32-f64:64:64-f128:128:128-a0:16:16-n32:64"; - } - virtual void getTargetDefines(const LangOptions &Opts, - MacroBuilder &Builder) const { - Builder.defineMacro("__s390__"); - Builder.defineMacro("__s390x__"); - } - virtual void getTargetBuiltins(const Builtin::Info *&Records, - unsigned &NumRecords) const { - // FIXME: Implement. - Records = 0; - NumRecords = 0; - } - - virtual void getGCCRegNames(const char * const *&Names, - unsigned &NumNames) const; - virtual void getGCCRegAliases(const GCCRegAlias *&Aliases, - unsigned &NumAliases) const { - // No aliases. - Aliases = 0; - NumAliases = 0; - } - virtual bool validateAsmConstraint(const char *&Name, - TargetInfo::ConstraintInfo &info) const { - // FIXME: implement - return true; - } - virtual const char *getClobbers() const { - // FIXME: Is this really right? - return ""; - } - virtual const char *getVAListDeclaration() const { - // FIXME: implement - return "typedef char* __builtin_va_list;"; - } - }; - - const char * const SystemZTargetInfo::GCCRegNames[] = { - "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", - "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15" - }; - - void SystemZTargetInfo::getGCCRegNames(const char * const *&Names, - unsigned &NumNames) const { - Names = GCCRegNames; - NumNames = llvm::array_lengthof(GCCRegNames); - } -} - namespace { class BlackfinTargetInfo : public TargetInfo { static const char * const GCCRegNames[]; @@ -3677,9 +3617,6 @@ static TargetInfo *AllocateTarget(const std::string &T) { case llvm::Triple::cellspu: return new PS3SPUTargetInfo(T); - case llvm::Triple::systemz: - return new SystemZTargetInfo(T); - case llvm::Triple::tce: return new TCETargetInfo(T); diff --git a/lib/CodeGen/TargetInfo.cpp b/lib/CodeGen/TargetInfo.cpp index e1dc8f7ffd..3744a29b3e 100644 --- a/lib/CodeGen/TargetInfo.cpp +++ b/lib/CodeGen/TargetInfo.cpp @@ -2828,85 +2828,6 @@ void PTXTargetCodeGenInfo::SetTargetAttributes(const Decl *D, } -//===----------------------------------------------------------------------===// -// SystemZ ABI Implementation -//===----------------------------------------------------------------------===// - -namespace { - -class SystemZABIInfo : public ABIInfo { -public: - SystemZABIInfo(CodeGenTypes &CGT) : ABIInfo(CGT) {} - - bool isPromotableIntegerType(QualType Ty) const; - - ABIArgInfo classifyReturnType(QualType RetTy) const; - ABIArgInfo classifyArgumentType(QualType RetTy) const; - - virtual void computeInfo(CGFunctionInfo &FI) const { - FI.getReturnInfo() = classifyReturnType(FI.getReturnType()); - for (CGFunctionInfo::arg_iterator it = FI.arg_begin(), ie = FI.arg_end(); - it != ie; ++it) - it->info = classifyArgumentType(it->type); - } - - virtual llvm::Value *EmitVAArg(llvm::Value *VAListAddr, QualType Ty, - CodeGenFunction &CGF) const; -}; - -class SystemZTargetCodeGenInfo : public TargetCodeGenInfo { -public: - SystemZTargetCodeGenInfo(CodeGenTypes &CGT) - : TargetCodeGenInfo(new SystemZABIInfo(CGT)) {} -}; - -} - -bool SystemZABIInfo::isPromotableIntegerType(QualType Ty) const { - // SystemZ ABI requires all 8, 16 and 32 bit quantities to be extended. - if (const BuiltinType *BT = Ty->getAs()) - switch (BT->getKind()) { - case BuiltinType::Bool: - case BuiltinType::Char_S: - case BuiltinType::Char_U: - case BuiltinType::SChar: - case BuiltinType::UChar: - case BuiltinType::Short: - case BuiltinType::UShort: - case BuiltinType::Int: - case BuiltinType::UInt: - return true; - default: - return false; - } - return false; -} - -llvm::Value *SystemZABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty, - CodeGenFunction &CGF) const { - // FIXME: Implement - return 0; -} - - -ABIArgInfo SystemZABIInfo::classifyReturnType(QualType RetTy) const { - if (RetTy->isVoidType()) - return ABIArgInfo::getIgnore(); - if (isAggregateTypeForABI(RetTy)) - return ABIArgInfo::getIndirect(0); - - return (isPromotableIntegerType(RetTy) ? - ABIArgInfo::getExtend() : ABIArgInfo::getDirect()); -} - -ABIArgInfo SystemZABIInfo::classifyArgumentType(QualType Ty) const { - if (isAggregateTypeForABI(Ty)) - return ABIArgInfo::getIndirect(0); - - return (isPromotableIntegerType(Ty) ? - ABIArgInfo::getExtend() : ABIArgInfo::getDirect()); -} - //===----------------------------------------------------------------------===// // MBlaze ABI Implementation //===----------------------------------------------------------------------===// @@ -3317,9 +3238,6 @@ const TargetCodeGenInfo &CodeGenModule::getTargetCodeGenInfo() { case llvm::Triple::ptx64: return *(TheTargetCodeGenInfo = new PTXTargetCodeGenInfo(Types)); - case llvm::Triple::systemz: - return *(TheTargetCodeGenInfo = new SystemZTargetCodeGenInfo(Types)); - case llvm::Triple::mblaze: return *(TheTargetCodeGenInfo = new MBlazeTargetCodeGenInfo(Types)); diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 42041d6566..11af01c651 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -507,9 +507,6 @@ static bool isSignedCharDefault(const llvm::Triple &Triple) { if (Triple.isOSDarwin()) return true; return false; - - case llvm::Triple::systemz: - return false; } } diff --git a/utils/C++Tests/LLVM-Code-Compile/lit.local.cfg b/utils/C++Tests/LLVM-Code-Compile/lit.local.cfg index 6676e311e3..64ddb88c7e 100644 --- a/utils/C++Tests/LLVM-Code-Compile/lit.local.cfg +++ b/utils/C++Tests/LLVM-Code-Compile/lit.local.cfg @@ -28,7 +28,6 @@ cxxflags = ['-D__STDC_LIMIT_MACROS', '-I%s/lib/Target/PIC16' % root.llvm_src_root, '-I%s/lib/Target/PowerPC' % root.llvm_src_root, '-I%s/lib/Target/Sparc' % root.llvm_src_root, - '-I%s/lib/Target/SystemZ' % root.llvm_src_root, '-I%s/lib/Target/X86' % root.llvm_src_root, '-I%s/lib/Target/XCore' % root.llvm_src_root, '-I%s/lib/Target/Alpha' % target_obj_root, @@ -43,7 +42,6 @@ cxxflags = ['-D__STDC_LIMIT_MACROS', '-I%s/lib/Target/PIC16' % target_obj_root, '-I%s/lib/Target/PowerPC' % target_obj_root, '-I%s/lib/Target/Sparc' % target_obj_root, - '-I%s/lib/Target/SystemZ' % target_obj_root, '-I%s/lib/Target/X86' % target_obj_root, '-I%s/lib/Target/XCore' % target_obj_root]; diff --git a/utils/C++Tests/LLVM-Code-Symbols/lit.local.cfg b/utils/C++Tests/LLVM-Code-Symbols/lit.local.cfg index c328a25127..4269b903a1 100644 --- a/utils/C++Tests/LLVM-Code-Symbols/lit.local.cfg +++ b/utils/C++Tests/LLVM-Code-Symbols/lit.local.cfg @@ -28,7 +28,6 @@ cxxflags = ['-D__STDC_LIMIT_MACROS', '-I%s/lib/Target/PIC16' % root.llvm_src_root, '-I%s/lib/Target/PowerPC' % root.llvm_src_root, '-I%s/lib/Target/Sparc' % root.llvm_src_root, - '-I%s/lib/Target/SystemZ' % root.llvm_src_root, '-I%s/lib/Target/X86' % root.llvm_src_root, '-I%s/lib/Target/XCore' % root.llvm_src_root, '-I%s/lib/Target/Alpha' % target_obj_root, @@ -43,7 +42,6 @@ cxxflags = ['-D__STDC_LIMIT_MACROS', '-I%s/lib/Target/PIC16' % target_obj_root, '-I%s/lib/Target/PowerPC' % target_obj_root, '-I%s/lib/Target/Sparc' % target_obj_root, - '-I%s/lib/Target/SystemZ' % target_obj_root, '-I%s/lib/Target/X86' % target_obj_root, '-I%s/lib/Target/XCore' % target_obj_root]; diff --git a/utils/C++Tests/LLVM-Code-Syntax/lit.local.cfg b/utils/C++Tests/LLVM-Code-Syntax/lit.local.cfg index 6e679659c4..d9263e6ffc 100644 --- a/utils/C++Tests/LLVM-Code-Syntax/lit.local.cfg +++ b/utils/C++Tests/LLVM-Code-Syntax/lit.local.cfg @@ -27,7 +27,6 @@ cxxflags = ['-D__STDC_LIMIT_MACROS', '-I%s/lib/Target/PIC16' % root.llvm_src_root, '-I%s/lib/Target/PowerPC' % root.llvm_src_root, '-I%s/lib/Target/Sparc' % root.llvm_src_root, - '-I%s/lib/Target/SystemZ' % root.llvm_src_root, '-I%s/lib/Target/X86' % root.llvm_src_root, '-I%s/lib/Target/XCore' % root.llvm_src_root, '-I%s/lib/Target/Alpha' % target_obj_root, @@ -42,7 +41,6 @@ cxxflags = ['-D__STDC_LIMIT_MACROS', '-I%s/lib/Target/PIC16' % target_obj_root, '-I%s/lib/Target/PowerPC' % target_obj_root, '-I%s/lib/Target/Sparc' % target_obj_root, - '-I%s/lib/Target/SystemZ' % target_obj_root, '-I%s/lib/Target/X86' % target_obj_root, '-I%s/lib/Target/XCore' % target_obj_root];