[PATCH] D123656: [CodeGen] Use ArrayRef in TargetLowering functions
LiqinWeng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 13 19:00:16 PDT 2022
Miss_Grape updated this revision to Diff 422713.
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
@@ -2278,6 +2278,12 @@
}
}
+ void setLoadExtAction(ArrayRef<unsigned> ExtTypes, MVT ValVT,
+ ArrayRef<MVT> MemVTs, LegalizeAction Action) {
+ for (auto MemVT : MemVTs)
+ setLoadExtAction(ExtTypes, ValVT, MemVT, Action);
+ }
+
/// Indicate that the specified truncating store does not work with the
/// specified type and indicate what to do about it.
void setTruncStoreAction(MVT ValVT, MVT MemVT, LegalizeAction Action) {
@@ -2290,8 +2296,16 @@
///
/// 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(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
@@ -2299,8 +2313,16 @@
///
/// NOTE: All indexed mode stores are initialized to Expand in
/// TargetLowering.cpp
- void setIndexedStoreAction(unsigned IdxMode, MVT VT, LegalizeAction Action) {
- 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(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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123656.422713.patch
Type: text/x-patch
Size: 2252 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220414/70411c00/attachment.bin>
More information about the llvm-commits
mailing list