[llvm] ff3f498 - [CodeGen] Use ArrayRef in TargetLowering functions
via llvm-commits
llvm-commits at lists.llvm.org
Mon May 16 06:31:10 PDT 2022
Author: Liqin.Weng
Date: 2022-05-16T13:30:58Z
New Revision: ff3f4988ed5837d1a99b3dd6bb10acc0aefab60a
URL: https://github.com/llvm/llvm-project/commit/ff3f4988ed5837d1a99b3dd6bb10acc0aefab60a
DIFF: https://github.com/llvm/llvm-project/commit/ff3f4988ed5837d1a99b3dd6bb10acc0aefab60a.diff
LOG: [CodeGen] Use ArrayRef in TargetLowering functions
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D123656
Added:
Modified:
llvm/include/llvm/CodeGen/TargetLowering.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/CodeGen/TargetLowering.h b/llvm/include/llvm/CodeGen/TargetLowering.h
index 3c8dd39fd6b97..9bcecad2973bd 100644
--- a/llvm/include/llvm/CodeGen/TargetLowering.h
+++ b/llvm/include/llvm/CodeGen/TargetLowering.h
@@ -2282,6 +2282,12 @@ class TargetLoweringBase {
}
}
+ 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) {
@@ -2294,8 +2300,16 @@ class TargetLoweringBase {
///
/// 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
@@ -2303,8 +2317,16 @@ class TargetLoweringBase {
///
/// 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
More information about the llvm-commits
mailing list