[PATCH] D17162: [AArch64] Add support for Qualcomm Kryo CPU.

Chad Rosier via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 11 12:18:23 PST 2016


mcrosier created this revision.
mcrosier added reviewers: t.p.northover, rengolin.
mcrosier added subscribers: llvm-commits, gberry, mssimpso, bmakam, haicheng, junbuml.
Herald added subscribers: rengolin, aemerson.

Adds core tuning support for new Qualcomm Kryo core.

 Chad

http://reviews.llvm.org/D17162

Files:
  lib/Target/AArch64/AArch64.td
  lib/Target/AArch64/AArch64Subtarget.h
  test/CodeGen/AArch64/cpus.ll
  test/CodeGen/AArch64/remat.ll

Index: test/CodeGen/AArch64/remat.ll
===================================================================
--- test/CodeGen/AArch64/remat.ll
+++ test/CodeGen/AArch64/remat.ll
@@ -3,6 +3,7 @@
 ; RUN: llc -mtriple=aarch64-linux-gnuabi -mcpu=cortex-a53 -o - %s | FileCheck %s
 ; RUN: llc -mtriple=aarch64-linux-gnuabi -mcpu=cortex-a72 -o - %s | FileCheck %s
 ; RUN: llc -mtriple=aarch64-linux-gnuabi -mcpu=exynos-m1 -o - %s | FileCheck %s
+; RUN: llc -mtriple=aarch64-linux-gnuabi -mcpu=kryo -o - %s | FileCheck %s
 
 %X = type { i64, i64, i64 }
 declare void @f(%X*)
Index: test/CodeGen/AArch64/cpus.ll
===================================================================
--- test/CodeGen/AArch64/cpus.ll
+++ test/CodeGen/AArch64/cpus.ll
@@ -7,6 +7,7 @@
 ; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=cortex-a57 2>&1 | FileCheck %s
 ; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=cortex-a72 2>&1 | FileCheck %s
 ; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=exynos-m1 2>&1 | FileCheck %s
+; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=kryo 2>&1 | FileCheck %s
 ; RUN: llc < %s -mtriple=arm64-unknown-unknown -mcpu=invalidcpu 2>&1 | FileCheck %s --check-prefix=INVALID
 
 ; CHECK-NOT: {{.*}}  is not a recognized processor for this target
Index: lib/Target/AArch64/AArch64Subtarget.h
===================================================================
--- lib/Target/AArch64/AArch64Subtarget.h
+++ lib/Target/AArch64/AArch64Subtarget.h
@@ -39,7 +39,8 @@
     CortexA53,
     CortexA57,
     Cyclone,
-    ExynosM1
+    ExynosM1,
+    Kryo
   };
 
   /// ARMProcFamily - ARM processor family: Cortex-A53, Cortex-A57, and others.
@@ -151,6 +152,7 @@
   bool isCortexA57() const { return CPUString == "cortex-a57"; }
   bool isCortexA53() const { return CPUString == "cortex-a53"; }
   bool isExynosM1() const { return CPUString == "exynos-m1"; }
+  bool isKryo() const { return CPUString == "kryo"; }
 
   bool useAA() const override { return isCortexA53(); }
 
Index: lib/Target/AArch64/AArch64.td
===================================================================
--- lib/Target/AArch64/AArch64.td
+++ lib/Target/AArch64/AArch64.td
@@ -133,6 +133,14 @@
                                     FeatureCRC,
                                     FeaturePerfMon]>;
 
+def ProcKryo    : SubtargetFeature<"kryo", "ARMProcFamily", "Kryo",
+                                   "Qualcomm Kryo processors",
+                                   [FeatureFPARMv8,
+                                   FeatureNEON,
+                                   FeatureCrypto,
+                                   FeatureCRC,
+                                   FeaturePerfMon]>;
+
 def : ProcessorModel<"generic", NoSchedModel, [FeatureFPARMv8,
                                               FeatureNEON,
                                               FeatureCRC,
@@ -146,6 +154,8 @@
 def : ProcessorModel<"cortex-a72", CortexA57Model, [ProcA57]>;
 def : ProcessorModel<"cyclone", CycloneModel, [ProcCyclone]>;
 def : ProcessorModel<"exynos-m1", ExynosM1Model, [ProcExynosM1]>;
+// FIXME: Kryo is currently modelled without a specific SchedModel.
+def : ProcessorModel<"kryo", NoSchedModel, [ProcKryo]>;
 
 //===----------------------------------------------------------------------===//
 // Assembly parser


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17162.47699.patch
Type: text/x-patch
Size: 3298 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160211/e4f09a04/attachment.bin>


More information about the llvm-commits mailing list