r366315 - [AArch64] Consistent types and naming for AArch64 target features (NFC)
Momchil Velikov via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 17 04:24:37 PDT 2019
Author: chill
Date: Wed Jul 17 04:24:37 2019
New Revision: 366315
URL: http://llvm.org/viewvc/llvm-project?rev=366315&view=rev
Log:
[AArch64] Consistent types and naming for AArch64 target features (NFC)
Differential Revision: https://reviews.llvm.org/D64415
Committed as obvious.
Modified:
cfe/trunk/lib/Basic/Targets/AArch64.cpp
cfe/trunk/lib/Basic/Targets/AArch64.h
Modified: cfe/trunk/lib/Basic/Targets/AArch64.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets/AArch64.cpp?rev=366315&r1=366314&r2=366315&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets/AArch64.cpp (original)
+++ cfe/trunk/lib/Basic/Targets/AArch64.cpp Wed Jul 17 04:24:37 2019
@@ -199,13 +199,13 @@ void AArch64TargetInfo::getTargetDefines
if (FPU & SveMode)
Builder.defineMacro("__ARM_FEATURE_SVE", "1");
- if (CRC)
+ if (HasCRC)
Builder.defineMacro("__ARM_FEATURE_CRC32", "1");
- if (Crypto)
+ if (HasCrypto)
Builder.defineMacro("__ARM_FEATURE_CRYPTO", "1");
- if (Unaligned)
+ if (HasUnaligned)
Builder.defineMacro("__ARM_FEATURE_UNALIGNED", "1");
if ((FPU & NeonMode) && HasFullFP16)
@@ -263,13 +263,13 @@ bool AArch64TargetInfo::hasFeature(Strin
bool AArch64TargetInfo::handleTargetFeatures(std::vector<std::string> &Features,
DiagnosticsEngine &Diags) {
FPU = FPUMode;
- CRC = 0;
- Crypto = 0;
- Unaligned = 1;
- HasFullFP16 = 0;
- HasDotProd = 0;
- HasFP16FML = 0;
- HasMTE = 0;
+ HasCRC = false;
+ HasCrypto = false;
+ HasUnaligned = true;
+ HasFullFP16 = false;
+ HasDotProd = false;
+ HasFP16FML = false;
+ HasMTE = false;
ArchKind = llvm::AArch64::ArchKind::ARMV8A;
for (const auto &Feature : Features) {
@@ -278,11 +278,11 @@ bool AArch64TargetInfo::handleTargetFeat
if (Feature == "+sve")
FPU |= SveMode;
if (Feature == "+crc")
- CRC = 1;
+ HasCRC = true;
if (Feature == "+crypto")
- Crypto = 1;
+ HasCrypto = true;
if (Feature == "+strict-align")
- Unaligned = 0;
+ HasUnaligned = false;
if (Feature == "+v8.1a")
ArchKind = llvm::AArch64::ArchKind::ARMV8_1A;
if (Feature == "+v8.2a")
@@ -294,13 +294,13 @@ bool AArch64TargetInfo::handleTargetFeat
if (Feature == "+v8.5a")
ArchKind = llvm::AArch64::ArchKind::ARMV8_5A;
if (Feature == "+fullfp16")
- HasFullFP16 = 1;
+ HasFullFP16 = true;
if (Feature == "+dotprod")
- HasDotProd = 1;
+ HasDotProd = true;
if (Feature == "+fp16fml")
- HasFP16FML = 1;
+ HasFP16FML = true;
if (Feature == "+mte")
- HasMTE = 1;
+ HasMTE = true;
}
setDataLayout();
Modified: cfe/trunk/lib/Basic/Targets/AArch64.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets/AArch64.h?rev=366315&r1=366314&r2=366315&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets/AArch64.h (original)
+++ cfe/trunk/lib/Basic/Targets/AArch64.h Wed Jul 17 04:24:37 2019
@@ -28,13 +28,14 @@ class LLVM_LIBRARY_VISIBILITY AArch64Tar
enum FPUModeEnum { FPUMode, NeonMode = (1 << 0), SveMode = (1 << 1) };
unsigned FPU;
- unsigned CRC;
- unsigned Crypto;
- unsigned Unaligned;
- unsigned HasFullFP16;
- unsigned HasDotProd;
- unsigned HasFP16FML;
- unsigned HasMTE;
+ bool HasCRC;
+ bool HasCrypto;
+ bool HasUnaligned;
+ bool HasFullFP16;
+ bool HasDotProd;
+ bool HasFP16FML;
+ bool HasMTE;
+
llvm::AArch64::ArchKind ArchKind;
static const Builtin::Info BuiltinInfo[];
More information about the cfe-commits
mailing list