From c62ab611732099180ae3e5d3774ed43747b40051 Mon Sep 17 00:00:00 2001 From: Evandro Menezes Date: Wed, 19 Sep 2018 19:43:23 +0000 Subject: [PATCH] [ARM] Refactor Exynos feature set (NFC) Since all Exynos processors share the same feature set, fold them in the implied fatures list for the subtarget. llvm-svn: 342583 --- llvm/lib/Target/ARM/ARM.td | 90 +++++++++--------------------------- llvm/lib/Target/ARM/ARMSubtarget.cpp | 2 +- llvm/lib/Target/ARM/ARMSubtarget.h | 2 +- 3 files changed, 23 insertions(+), 71 deletions(-) diff --git a/llvm/lib/Target/ARM/ARM.td b/llvm/lib/Target/ARM/ARM.td index 2d0f270..c42a4eb 100644 --- a/llvm/lib/Target/ARM/ARM.td +++ b/llvm/lib/Target/ARM/ARM.td @@ -494,8 +494,23 @@ def ProcKryo : SubtargetFeature<"kryo", "ARMProcFamily", "Kryo", def ProcSwift : SubtargetFeature<"swift", "ARMProcFamily", "Swift", "Swift ARM processors", []>; -def ProcExynosM1 : SubtargetFeature<"exynosm1", "ARMProcFamily", "ExynosM1", - "Samsung Exynos-Mx processors", []>; +def ProcExynos : SubtargetFeature<"exynos", "ARMProcFamily", "Exynos", + "Samsung Exynos processors", + [FeatureZCZeroing, + FeatureUseWideStrideVFP, + FeatureUseAA, + FeatureSplatVFPToNeon, + FeatureSlowVGETLNi32, + FeatureSlowVDUP32, + FeatureSlowFPBrcc, + FeatureProfUnpredicate, + FeatureHWDivThumb, + FeatureHWDivARM, + FeatureHasSlowFPVMLx, + FeatureHasRetAddrStack, + FeatureExpandMLx, + FeatureCrypto, + FeatureCRC]>; def ProcR4 : SubtargetFeature<"r4", "ARMProcFamily", "CortexR4", "Cortex-R4 ARM processors", []>; @@ -1033,73 +1048,10 @@ def : ProcessorModel<"cyclone", SwiftModel, [ARMv8a, ProcSwift, FeatureZCZeroing, FeatureNoPostRASched]>; -def : ProcNoItin<"exynos-m1", [ARMv8a, ProcExynosM1, - FeatureZCZeroing, - FeatureUseWideStrideVFP, - FeatureUseAA, - FeatureSplatVFPToNeon, - FeatureSlowVGETLNi32, - FeatureSlowVDUP32, - FeatureSlowFPBrcc, - FeatureProfUnpredicate, - FeatureHWDivThumb, - FeatureHWDivARM, - FeatureHasSlowFPVMLx, - FeatureHasRetAddrStack, - FeatureExpandMLx, - FeatureCrypto, - FeatureCRC]>; - -def : ProcNoItin<"exynos-m2", [ARMv8a, ProcExynosM1, - FeatureZCZeroing, - FeatureUseWideStrideVFP, - FeatureUseAA, - FeatureSplatVFPToNeon, - FeatureSlowVGETLNi32, - FeatureSlowVDUP32, - FeatureSlowFPBrcc, - FeatureProfUnpredicate, - FeatureHWDivThumb, - FeatureHWDivARM, - FeatureHasSlowFPVMLx, - FeatureHasRetAddrStack, - FeatureExpandMLx, - FeatureCrypto, - FeatureCRC]>; - -def : ProcNoItin<"exynos-m3", [ARMv8a, ProcExynosM1, - FeatureZCZeroing, - FeatureUseWideStrideVFP, - FeatureUseAA, - FeatureSplatVFPToNeon, - FeatureSlowVGETLNi32, - FeatureSlowVDUP32, - FeatureSlowFPBrcc, - FeatureProfUnpredicate, - FeatureHWDivThumb, - FeatureHWDivARM, - FeatureHasSlowFPVMLx, - FeatureHasRetAddrStack, - FeatureExpandMLx, - FeatureCrypto, - FeatureCRC]>; - -def : ProcNoItin<"exynos-m4", [ARMv8a, ProcExynosM1, - FeatureZCZeroing, - FeatureUseWideStrideVFP, - FeatureUseAA, - FeatureSplatVFPToNeon, - FeatureSlowVGETLNi32, - FeatureSlowVDUP32, - FeatureSlowFPBrcc, - FeatureProfUnpredicate, - FeatureHWDivThumb, - FeatureHWDivARM, - FeatureHasSlowFPVMLx, - FeatureHasRetAddrStack, - FeatureExpandMLx, - FeatureCrypto, - FeatureCRC]>; +def : ProcNoItin<"exynos-m1", [ARMv8a, ProcExynos]>; +def : ProcNoItin<"exynos-m2", [ARMv8a, ProcExynos]>; +def : ProcNoItin<"exynos-m3", [ARMv8a, ProcExynos]>; +def : ProcNoItin<"exynos-m4", [ARMv8a, ProcExynos]>; def : ProcNoItin<"kryo", [ARMv8a, ProcKryo, FeatureHWDivThumb, diff --git a/llvm/lib/Target/ARM/ARMSubtarget.cpp b/llvm/lib/Target/ARM/ARMSubtarget.cpp index 07dfce9..36701af 100644 --- a/llvm/lib/Target/ARM/ARMSubtarget.cpp +++ b/llvm/lib/Target/ARM/ARMSubtarget.cpp @@ -287,7 +287,7 @@ void ARMSubtarget::initSubtargetFeatures(StringRef CPU, StringRef FS) { case CortexR7: case CortexM3: case CortexR52: - case ExynosM1: + case Exynos: case Kryo: break; case Krait: diff --git a/llvm/lib/Target/ARM/ARMSubtarget.h b/llvm/lib/Target/ARM/ARMSubtarget.h index 34938c3..3ac2545 100644 --- a/llvm/lib/Target/ARM/ARMSubtarget.h +++ b/llvm/lib/Target/ARM/ARMSubtarget.h @@ -68,7 +68,7 @@ protected: CortexR5, CortexR52, CortexR7, - ExynosM1, + Exynos, Krait, Kryo, Swift -- 2.7.4