Skip to content

Commit 737a0ae

Browse files
authored
[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.
1 parent a0b175c commit 737a0ae

File tree

2 files changed

+0
-56
lines changed

2 files changed

+0
-56
lines changed

clang/lib/Basic/Targets/PPC.cpp

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,10 @@ bool PPCTargetInfo::handleTargetFeatures(std::vector<std::string> &Features,
4646
HasAltivec = true;
4747
} else if (Feature == "+vsx") {
4848
HasVSX = true;
49-
} else if (Feature == "+crbits") {
50-
UseCRBits = true;
51-
} else if (Feature == "+bpermd") {
52-
HasBPERMD = true;
53-
} else if (Feature == "+extdiv") {
54-
HasExtDiv = true;
5549
} else if (Feature == "+power8-vector") {
5650
HasP8Vector = true;
5751
} else if (Feature == "+crypto") {
5852
HasP8Crypto = true;
59-
} else if (Feature == "+direct-move") {
60-
HasDirectMove = true;
6153
} else if (Feature == "+htm") {
6254
HasHTM = true;
6355
} else if (Feature == "+float128") {
@@ -68,8 +60,6 @@ bool PPCTargetInfo::handleTargetFeatures(std::vector<std::string> &Features,
6860
HasP10Vector = true;
6961
} else if (Feature == "+pcrelative-memops") {
7062
HasPCRelativeMemops = true;
71-
} else if (Feature == "+prefix-instrs") {
72-
HasPrefixInstrs = true;
7363
} else if (Feature == "+spe" || Feature == "+efpu2") {
7464
HasStrictFP = false;
7565
HasSPE = true;
@@ -81,30 +71,12 @@ bool PPCTargetInfo::handleTargetFeatures(std::vector<std::string> &Features,
8171
HasFrsqrtes = true;
8272
} else if (Feature == "-hard-float") {
8373
FloatABI = SoftFloat;
84-
} else if (Feature == "+paired-vector-memops") {
85-
PairedVectorMemops = true;
8674
} else if (Feature == "+mma") {
8775
HasMMA = true;
8876
} else if (Feature == "+rop-protect") {
8977
HasROPProtect = true;
90-
} else if (Feature == "+privileged") {
91-
HasPrivileged = true;
92-
} else if (Feature == "+aix-small-local-exec-tls") {
93-
HasAIXSmallLocalExecTLS = true;
94-
} else if (Feature == "+aix-small-local-dynamic-tls") {
95-
HasAIXSmallLocalDynamicTLS = true;
96-
} else if (Feature == "+isa-v206-instructions") {
97-
IsISA2_06 = true;
98-
} else if (Feature == "+isa-v207-instructions") {
99-
IsISA2_07 = true;
100-
} else if (Feature == "+isa-v30-instructions") {
101-
IsISA3_0 = true;
102-
} else if (Feature == "+isa-v31-instructions") {
103-
IsISA3_1 = true;
10478
} else if (Feature == "+quadword-atomics") {
10579
HasQuadwordAtomics = true;
106-
} else if (Feature == "+aix-shared-lib-tls-model-opt") {
107-
HasAIXShLibTLSModelOpt = true;
10880
} else if (Feature == "+longcall") {
10981
UseLongCalls = true;
11082
}
@@ -747,31 +719,17 @@ bool PPCTargetInfo::hasFeature(StringRef Feature) const {
747719
.Case("powerpc", true)
748720
.Case("altivec", HasAltivec)
749721
.Case("vsx", HasVSX)
750-
.Case("crbits", UseCRBits)
751722
.Case("power8-vector", HasP8Vector)
752723
.Case("crypto", HasP8Crypto)
753-
.Case("direct-move", HasDirectMove)
754724
.Case("htm", HasHTM)
755-
.Case("bpermd", HasBPERMD)
756-
.Case("extdiv", HasExtDiv)
757725
.Case("float128", HasFloat128)
758726
.Case("power9-vector", HasP9Vector)
759-
.Case("paired-vector-memops", PairedVectorMemops)
760727
.Case("power10-vector", HasP10Vector)
761728
.Case("pcrelative-memops", HasPCRelativeMemops)
762-
.Case("prefix-instrs", HasPrefixInstrs)
763729
.Case("spe", HasSPE)
764730
.Case("mma", HasMMA)
765731
.Case("rop-protect", HasROPProtect)
766-
.Case("privileged", HasPrivileged)
767-
.Case("aix-small-local-exec-tls", HasAIXSmallLocalExecTLS)
768-
.Case("aix-small-local-dynamic-tls", HasAIXSmallLocalDynamicTLS)
769-
.Case("isa-v206-instructions", IsISA2_06)
770-
.Case("isa-v207-instructions", IsISA2_07)
771-
.Case("isa-v30-instructions", IsISA3_0)
772-
.Case("isa-v31-instructions", IsISA3_1)
773732
.Case("quadword-atomics", HasQuadwordAtomics)
774-
.Case("aix-shared-lib-tls-model-opt", HasAIXShLibTLSModelOpt)
775733
.Case("longcall", UseLongCalls)
776734
.Default(false);
777735
}

clang/lib/Basic/Targets/PPC.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -60,31 +60,17 @@ class LLVM_LIBRARY_VISIBILITY PPCTargetInfo : public TargetInfo {
6060
bool HasAltivec = false;
6161
bool HasMMA = false;
6262
bool HasROPProtect = false;
63-
bool HasPrivileged = false;
64-
bool HasAIXSmallLocalExecTLS = false;
65-
bool HasAIXSmallLocalDynamicTLS = false;
6663
bool HasVSX = false;
67-
bool UseCRBits = false;
6864
bool HasP8Vector = false;
6965
bool HasP8Crypto = false;
70-
bool HasDirectMove = false;
7166
bool HasHTM = false;
72-
bool HasBPERMD = false;
73-
bool HasExtDiv = false;
7467
bool HasP9Vector = false;
7568
bool HasSPE = false;
7669
bool HasFrsqrte = false;
7770
bool HasFrsqrtes = false;
78-
bool PairedVectorMemops = false;
7971
bool HasP10Vector = false;
8072
bool HasPCRelativeMemops = false;
81-
bool HasPrefixInstrs = false;
82-
bool IsISA2_06 = false;
83-
bool IsISA2_07 = false;
84-
bool IsISA3_0 = false;
85-
bool IsISA3_1 = false;
8673
bool HasQuadwordAtomics = false;
87-
bool HasAIXShLibTLSModelOpt = false;
8874
bool UseLongCalls = false;
8975

9076
protected:

0 commit comments

Comments
 (0)