Author: zhijian lin Date: 2025-03-14T09:24:44-04:00 New Revision: 737a0aeb6b4ec5bee87af6b5b1cb987427aef5f8
URL: https://github.com/llvm/llvm-project/commit/737a0aeb6b4ec5bee87af6b5b1cb987427aef5f8 DIFF: https://github.com/llvm/llvm-project/commit/737a0aeb6b4ec5bee87af6b5b1cb987427aef5f8.diff LOG: [NFC][PowerPC] cleaned dead code of PPC.cpp and PPC.h (#130994) There are some variables in the PPC.h which are defined and assigned a value to them, but never be used, remove the code related to the variables. Added: Modified: clang/lib/Basic/Targets/PPC.cpp clang/lib/Basic/Targets/PPC.h Removed: ################################################################################ diff --git a/clang/lib/Basic/Targets/PPC.cpp b/clang/lib/Basic/Targets/PPC.cpp index facf095d7fcf1..425ad68bb9098 100644 --- a/clang/lib/Basic/Targets/PPC.cpp +++ b/clang/lib/Basic/Targets/PPC.cpp @@ -46,18 +46,10 @@ bool PPCTargetInfo::handleTargetFeatures(std::vector<std::string> &Features, HasAltivec = true; } else if (Feature == "+vsx") { HasVSX = true; - } else if (Feature == "+crbits") { - UseCRBits = true; - } else if (Feature == "+bpermd") { - HasBPERMD = true; - } else if (Feature == "+extdiv") { - HasExtDiv = true; } else if (Feature == "+power8-vector") { HasP8Vector = true; } else if (Feature == "+crypto") { HasP8Crypto = true; - } else if (Feature == "+direct-move") { - HasDirectMove = true; } else if (Feature == "+htm") { HasHTM = true; } else if (Feature == "+float128") { @@ -68,8 +60,6 @@ bool PPCTargetInfo::handleTargetFeatures(std::vector<std::string> &Features, HasP10Vector = true; } else if (Feature == "+pcrelative-memops") { HasPCRelativeMemops = true; - } else if (Feature == "+prefix-instrs") { - HasPrefixInstrs = true; } else if (Feature == "+spe" || Feature == "+efpu2") { HasStrictFP = false; HasSPE = true; @@ -81,30 +71,12 @@ bool PPCTargetInfo::handleTargetFeatures(std::vector<std::string> &Features, HasFrsqrtes = true; } else if (Feature == "-hard-float") { FloatABI = SoftFloat; - } else if (Feature == "+paired-vector-memops") { - PairedVectorMemops = true; } else if (Feature == "+mma") { HasMMA = true; } else if (Feature == "+rop-protect") { HasROPProtect = true; - } else if (Feature == "+privileged") { - HasPrivileged = true; - } else if (Feature == "+aix-small-local-exec-tls") { - HasAIXSmallLocalExecTLS = true; - } else if (Feature == "+aix-small-local-dynamic-tls") { - HasAIXSmallLocalDynamicTLS = true; - } else if (Feature == "+isa-v206-instructions") { - IsISA2_06 = true; - } else if (Feature == "+isa-v207-instructions") { - IsISA2_07 = true; - } else if (Feature == "+isa-v30-instructions") { - IsISA3_0 = true; - } else if (Feature == "+isa-v31-instructions") { - IsISA3_1 = true; } else if (Feature == "+quadword-atomics") { HasQuadwordAtomics = true; - } else if (Feature == "+aix-shared-lib-tls-model-opt") { - HasAIXShLibTLSModelOpt = true; } else if (Feature == "+longcall") { UseLongCalls = true; } @@ -747,31 +719,17 @@ bool PPCTargetInfo::hasFeature(StringRef Feature) const { .Case("powerpc", true) .Case("altivec", HasAltivec) .Case("vsx", HasVSX) - .Case("crbits", UseCRBits) .Case("power8-vector", HasP8Vector) .Case("crypto", HasP8Crypto) - .Case("direct-move", HasDirectMove) .Case("htm", HasHTM) - .Case("bpermd", HasBPERMD) - .Case("extdiv", HasExtDiv) .Case("float128", HasFloat128) .Case("power9-vector", HasP9Vector) - .Case("paired-vector-memops", PairedVectorMemops) .Case("power10-vector", HasP10Vector) .Case("pcrelative-memops", HasPCRelativeMemops) - .Case("prefix-instrs", HasPrefixInstrs) .Case("spe", HasSPE) .Case("mma", HasMMA) .Case("rop-protect", HasROPProtect) - .Case("privileged", HasPrivileged) - .Case("aix-small-local-exec-tls", HasAIXSmallLocalExecTLS) - .Case("aix-small-local-dynamic-tls", HasAIXSmallLocalDynamicTLS) - .Case("isa-v206-instructions", IsISA2_06) - .Case("isa-v207-instructions", IsISA2_07) - .Case("isa-v30-instructions", IsISA3_0) - .Case("isa-v31-instructions", IsISA3_1) .Case("quadword-atomics", HasQuadwordAtomics) - .Case("aix-shared-lib-tls-model-opt", HasAIXShLibTLSModelOpt) .Case("longcall", UseLongCalls) .Default(false); } diff --git a/clang/lib/Basic/Targets/PPC.h b/clang/lib/Basic/Targets/PPC.h index db6ac6f0bd338..17057cef97a57 100644 --- a/clang/lib/Basic/Targets/PPC.h +++ b/clang/lib/Basic/Targets/PPC.h @@ -60,31 +60,17 @@ class LLVM_LIBRARY_VISIBILITY PPCTargetInfo : public TargetInfo { bool HasAltivec = false; bool HasMMA = false; bool HasROPProtect = false; - bool HasPrivileged = false; - bool HasAIXSmallLocalExecTLS = false; - bool HasAIXSmallLocalDynamicTLS = false; bool HasVSX = false; - bool UseCRBits = false; bool HasP8Vector = false; bool HasP8Crypto = false; - bool HasDirectMove = false; bool HasHTM = false; - bool HasBPERMD = false; - bool HasExtDiv = false; bool HasP9Vector = false; bool HasSPE = false; bool HasFrsqrte = false; bool HasFrsqrtes = false; - bool PairedVectorMemops = false; bool HasP10Vector = false; bool HasPCRelativeMemops = false; - bool HasPrefixInstrs = false; - bool IsISA2_06 = false; - bool IsISA2_07 = false; - bool IsISA3_0 = false; - bool IsISA3_1 = false; bool HasQuadwordAtomics = false; - bool HasAIXShLibTLSModelOpt = false; bool UseLongCalls = false; protected: _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits