[PATCH] D123656: [NFC][CodeGen] Use ArrayRef in TargetLowering functions

LiqinWeng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 13 00:06:30 PDT 2022


Miss_Grape created this revision.
Miss_Grape added reviewers: sunshaoce, benshi001.
Herald added a project: All.
Miss_Grape requested review of this revision.
Herald added subscribers: llvm-commits, jacquesguan.
Herald added a project: LLVM.

This patch is similar to D122557 <https://reviews.llvm.org/D122557>,  D123467 <https://reviews.llvm.org/D123467>,adding an `ArrayRef` version for `setLoadExtAction`


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
@@ -2266,6 +2266,12 @@
     LoadExtActions[ValVT.SimpleTy][MemVT.SimpleTy] |= (uint16_t)Action << Shift;
   }
 
+  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) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123656.422407.patch
Type: text/x-patch
Size: 762 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220413/83e4e254/attachment.bin>


More information about the llvm-commits mailing list