[PATCH] D123656: [CodeGen] Use ArrayRef in TargetLowering functions
LiqinWeng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 13 03:58:25 PDT 2022
Miss_Grape updated this revision to Diff 422462.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123656/new/
https://reviews.llvm.org/D123656
Files:
llvm/include/llvm/CodeGen/TargetLowering.h
Index: llvm/include/llvm/CodeGen/TargetLowering.h
===================================================================
--- llvm/include/llvm/CodeGen/TargetLowering.h
+++ llvm/include/llvm/CodeGen/TargetLowering.h
@@ -2256,6 +2256,7 @@
OpActions[(unsigned)VT.SimpleTy][Op] = Action;
}
}
+
void setOperationAction(ArrayRef<unsigned> Ops, ArrayRef<MVT> VTs,
LegalizeAction Action) {
for (auto VT : VTs)
@@ -2290,10 +2291,28 @@
///
/// NOTE: All indexed mode loads are initialized to Expand in
/// TargetLowering.cpp
+
void setIndexedLoadAction(unsigned IdxMode, MVT VT, LegalizeAction Action) {
setIndexedModeAction(IdxMode, VT, IMAB_Load, Action);
}
+ void setIndexedLoadAction(ArrayRef<unsigned> IdxModes, MVT VT,
+ LegalizeAction Action) {
+ for (auto IdxMode : IdxModes)
+ setIndexedModeAction(IdxMode, VT, IMAB_Load, Action);
+ }
+
+ void setIndexedLoadAction(unsigned IdxMode, ArrayRef<MVT> VTs,
+ LegalizeAction Action) {
+ for (auto VT : VTs)
+ setIndexedModeAction(IdxMode, VT, IMAB_Load, Action);
+ }
+
+ void setIndexedLoadAction(ArrayRef<unsigned> IdxModes, ArrayRef<MVT> VTs,
+ LegalizeAction Action) {
+ for (auto VT : VTs)
+ setIndexedLoadAction(IdxModes, VT, Action);
+ }
/// Indicate that the specified indexed store does or does not work with the
/// specified type and indicate what to do about it.
///
@@ -2303,6 +2322,24 @@
setIndexedModeAction(IdxMode, VT, IMAB_Store, Action);
}
+ void setIndexedStoreAction(ArrayRef<unsigned> IdxModes, MVT VT,
+ LegalizeAction Action) {
+ for (auto IdxMode : IdxModes)
+ setIndexedModeAction(IdxMode, VT, IMAB_Store, Action);
+ }
+
+ void setIndexedStoreAction(unsigned IdxMode, ArrayRef<MVT> VTs,
+ LegalizeAction Action) {
+ for (auto VT : VTs)
+ setIndexedModeAction(IdxMode, VT, IMAB_Store, Action);
+ }
+
+ void setIndexedStoreAction(ArrayRef<unsigned> IdxModes, ArrayRef<MVT> VTs,
+ LegalizeAction Action) {
+ for (auto VT : VTs)
+ setIndexedStoreAction(IdxModes, VT, Action);
+ }
+
/// Indicate that the specified indexed masked load does or does not work with
/// the specified type and indicate what to do about it.
///
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123656.422462.patch
Type: text/x-patch
Size: 2408 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220413/014d8408/attachment.bin>
More information about the llvm-commits
mailing list