[PATCH] D126075: [PowerPC][Future] Add an ISA Future to go with mcpu=future.
Stefan Pintilie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 20 09:03:15 PDT 2022
stefanp created this revision.
stefanp added reviewers: lei, nemanjai.
Herald added subscribers: shchenz, kbarton, hiraditya.
Herald added a project: All.
stefanp requested review of this revision.
Herald added a project: LLVM.
On Power PC we have ISA3.0 for Power 9, ISA3.1 for Power 10.
This patchs adds an ISA for mcpu=future. The idea is to have a placeholder ISA
for work that is experimental and may not be supported by existing ISAs.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D126075
Files:
llvm/lib/Target/PowerPC/PPC.td
llvm/lib/Target/PowerPC/PPCInstrInfo.td
llvm/lib/Target/PowerPC/PPCScheduleP10.td
llvm/lib/Target/PowerPC/PPCScheduleP9.td
llvm/lib/Target/PowerPC/PPCSubtarget.cpp
llvm/lib/Target/PowerPC/PPCSubtarget.h
Index: llvm/lib/Target/PowerPC/PPCSubtarget.h
===================================================================
--- llvm/lib/Target/PowerPC/PPCSubtarget.h
+++ llvm/lib/Target/PowerPC/PPCSubtarget.h
@@ -160,6 +160,7 @@
bool IsISA2_07;
bool IsISA3_0;
bool IsISA3_1;
+ bool IsISAFuture;
bool UseLongCalls;
bool SecurePlt;
bool VectorsUseTwoUnits;
@@ -336,6 +337,7 @@
bool isISA2_07() const { return IsISA2_07; }
bool isISA3_0() const { return IsISA3_0; }
bool isISA3_1() const { return IsISA3_1; }
+ bool isISAFuture() const { return IsISAFuture; }
bool useLongCalls() const { return UseLongCalls; }
bool hasFusion() const { return HasFusion; }
bool hasStoreFusion() const { return HasStoreFusion; }
Index: llvm/lib/Target/PowerPC/PPCSubtarget.cpp
===================================================================
--- llvm/lib/Target/PowerPC/PPCSubtarget.cpp
+++ llvm/lib/Target/PowerPC/PPCSubtarget.cpp
@@ -141,6 +141,7 @@
IsISA2_07 = false;
IsISA3_0 = false;
IsISA3_1 = false;
+ IsISAFuture = false;
UseLongCalls = false;
SecurePlt = false;
VectorsUseTwoUnits = false;
Index: llvm/lib/Target/PowerPC/PPCScheduleP9.td
===================================================================
--- llvm/lib/Target/PowerPC/PPCScheduleP9.td
+++ llvm/lib/Target/PowerPC/PPCScheduleP9.td
@@ -42,7 +42,7 @@
// Power 9, paired vector mem ops, MMA, PC relative mem ops, or instructions
// introduced in ISA 3.1.
let UnsupportedFeatures = [HasSPE, PrefixInstrs, PairedVectorMemops, MMA,
- PCRelativeMemops, IsISA3_1];
+ PCRelativeMemops, IsISA3_1, IsISAFuture];
}
let SchedModel = P9Model in {
Index: llvm/lib/Target/PowerPC/PPCScheduleP10.td
===================================================================
--- llvm/lib/Target/PowerPC/PPCScheduleP10.td
+++ llvm/lib/Target/PowerPC/PPCScheduleP10.td
@@ -36,7 +36,7 @@
let CompleteModel = 1;
// Do not support SPE (Signal Procesing Engine) on Power 10.
- let UnsupportedFeatures = [HasSPE, IsE500, IsBookE];
+ let UnsupportedFeatures = [HasSPE, IsE500, IsBookE, IsISAFuture];
}
let SchedModel = P10Model in {
Index: llvm/lib/Target/PowerPC/PPCInstrInfo.td
===================================================================
--- llvm/lib/Target/PowerPC/PPCInstrInfo.td
+++ llvm/lib/Target/PowerPC/PPCInstrInfo.td
@@ -704,6 +704,7 @@
AssemblerPredicate<(any_of (not AIXOS), FeatureModernAIXAs)>;
def IsAIX : Predicate<"Subtarget->isAIXABI()">;
def NotAIX : Predicate<"!Subtarget->isAIXABI()">;
+def IsISAFuture : Predicate<"Subtarget->isISAFuture()">;
//===----------------------------------------------------------------------===//
// PowerPC Multiclass Definitions.
Index: llvm/lib/Target/PowerPC/PPC.td
===================================================================
--- llvm/lib/Target/PowerPC/PPC.td
+++ llvm/lib/Target/PowerPC/PPC.td
@@ -263,6 +263,10 @@
"true",
"Enable instructions in ISA 3.1.",
[FeatureISA3_0]>;
+def FeatureISAFuture : SubtargetFeature<"isa-future-instructions",
+ "IsISAFuture", "true",
+ "Enable instructions for Future ISA.",
+ [FeatureISA3_1]>;
def FeatureP9Altivec : SubtargetFeature<"power9-altivec", "HasP9Altivec", "true",
"Enable POWER9 Altivec instructions",
[FeatureISA3_0, FeatureP8Altivec]>;
@@ -430,7 +434,7 @@
// Future
// For future CPU we assume that all of the existing features from Power10
// still exist with the exception of those we know are Power10 specific.
- list<SubtargetFeature> FutureAdditionalFeatures = [];
+ list<SubtargetFeature> FutureAdditionalFeatures = [FeatureISAFuture];
list<SubtargetFeature> FutureSpecificFeatures = [];
list<SubtargetFeature> FutureInheritableFeatures =
!listconcat(P10InheritableFeatures, FutureAdditionalFeatures);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126075.430992.patch
Type: text/x-patch
Size: 4144 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220520/ab9795e4/attachment.bin>
More information about the llvm-commits
mailing list