[PATCH] D114789: Use initializer list in the constructor of M68kLegalizerInfo
Sheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 30 03:42:41 PST 2021
0x59616e created this revision.
0x59616e added reviewers: myhsu, sushmaunnibhavi.
Herald added a subscriber: hiraditya.
0x59616e requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Using initializer list is cleaner. And also this paves the way for extending the functionality of M68k GISel. NFC.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D114789
Files:
llvm/lib/Target/M68k/GISel/M68kLegalizerInfo.cpp
Index: llvm/lib/Target/M68k/GISel/M68kLegalizerInfo.cpp
===================================================================
--- llvm/lib/Target/M68k/GISel/M68kLegalizerInfo.cpp
+++ llvm/lib/Target/M68k/GISel/M68kLegalizerInfo.cpp
@@ -23,11 +23,8 @@
using namespace TargetOpcode;
const LLT S32 = LLT::scalar(32);
const LLT P0 = LLT::pointer(0, 32);
- getActionDefinitionsBuilder(G_LOAD).legalFor({S32});
+ getActionDefinitionsBuilder({G_ADD, G_SUB, G_MUL, G_UDIV, G_LOAD})
+ .legalFor({S32});
getActionDefinitionsBuilder(G_FRAME_INDEX).legalFor({P0});
- getActionDefinitionsBuilder(G_ADD).legalFor({S32});
- getActionDefinitionsBuilder(G_SUB).legalFor({S32});
- getActionDefinitionsBuilder(G_MUL).legalFor({S32});
- getActionDefinitionsBuilder(G_UDIV).legalFor({S32});
getLegacyLegalizerInfo().computeTables();
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114789.390657.patch
Type: text/x-patch
Size: 839 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211130/e11408fc/attachment.bin>
More information about the llvm-commits
mailing list