From 145449b1e420787bb99721a429341fa6be3adfb6 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 3 Jul 2022 16:10:23 +0200 Subject: Vendor import of llvm-project main llvmorg-15-init-15358-g53dc0f107877. --- llvm/lib/Target/SystemZ/SystemZSubtarget.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'llvm/lib/Target/SystemZ/SystemZSubtarget.cpp') diff --git a/llvm/lib/Target/SystemZ/SystemZSubtarget.cpp b/llvm/lib/Target/SystemZ/SystemZSubtarget.cpp index 75c0d454d904..f6889035b654 100644 --- a/llvm/lib/Target/SystemZ/SystemZSubtarget.cpp +++ b/llvm/lib/Target/SystemZ/SystemZSubtarget.cpp @@ -27,13 +27,14 @@ static cl::opt UseSubRegLiveness( // Pin the vtable to this file. void SystemZSubtarget::anchor() {} -SystemZSubtarget & -SystemZSubtarget::initializeSubtargetDependencies(StringRef CPU, StringRef FS) { - StringRef CPUName = CPU; - if (CPUName.empty()) - CPUName = "generic"; +SystemZSubtarget &SystemZSubtarget::initializeSubtargetDependencies( + StringRef CPU, StringRef TuneCPU, StringRef FS) { + if (CPU.empty()) + CPU = "generic"; + if (TuneCPU.empty()) + TuneCPU = CPU; // Parse features string. - ParseSubtargetFeatures(CPUName, /*TuneCPU*/ CPUName, FS); + ParseSubtargetFeatures(CPU, TuneCPU, FS); // -msoft-float implies -mno-vx. if (HasSoftFloat) @@ -64,9 +65,10 @@ SystemZSubtarget::initializeSpecialRegisters() { } SystemZSubtarget::SystemZSubtarget(const Triple &TT, const std::string &CPU, + const std::string &TuneCPU, const std::string &FS, const TargetMachine &TM) - : SystemZGenSubtargetInfo(TT, CPU, /*TuneCPU*/ CPU, FS), + : SystemZGenSubtargetInfo(TT, CPU, TuneCPU, FS), HasDistinctOps(false), HasLoadStoreOnCond(false), HasHighWord(false), HasFPExtension(false), HasPopulationCount(false), HasMessageSecurityAssist3(false), HasMessageSecurityAssist4(false), @@ -88,8 +90,8 @@ SystemZSubtarget::SystemZSubtarget(const Triple &TT, const std::string &CPU, HasResetDATProtection(false), HasProcessorActivityInstrumentation(false), HasSoftFloat(false), TargetTriple(TT), SpecialRegisters(initializeSpecialRegisters()), - InstrInfo(initializeSubtargetDependencies(CPU, FS)), TLInfo(TM, *this), - FrameLowering(SystemZFrameLowering::create(*this)) {} + InstrInfo(initializeSubtargetDependencies(CPU, TuneCPU, FS)), + TLInfo(TM, *this), FrameLowering(SystemZFrameLowering::create(*this)) {} bool SystemZSubtarget::enableSubRegLiveness() const { return UseSubRegLiveness; -- cgit v1.3