[PATCH] D103684: [AMDGPU] Stop using LegacyLegalizerInfo. NFCI.
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 4 04:26:45 PDT 2021
foad created this revision.
foad added reviewers: arsenm, bogner, dsanders.
Herald added subscribers: kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl.
foad requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D103684
Files:
llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
Index: llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
+++ llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
@@ -501,11 +501,8 @@
const LLT MinScalarFPTy = ST.has16BitInsts() ? S16 : S32;
- auto &LegacyInfo = getLegacyLegalizerInfo();
- LegacyInfo.setAction({G_BRCOND, S1},
- LegacyLegalizeActions::Legal); // VCC branches
- LegacyInfo.setAction({G_BRCOND, S32},
- LegacyLegalizeActions::Legal); // SCC branches
+ // s1 for VCC branches, s32 for SCC branches.
+ getActionDefinitionsBuilder(G_BRCOND).legalFor({S1, S32});
// TODO: All multiples of 32, vectors of pointers, all v2s16 pairs, more
// elements for v3s16
@@ -653,8 +650,7 @@
.widenScalarToNextPow2(0, 32)
.clampMaxNumElements(0, S32, 16);
- LegacyInfo.setAction({G_FRAME_INDEX, PrivatePtr},
- LegacyLegalizeActions::Legal);
+ getActionDefinitionsBuilder(G_FRAME_INDEX).legalFor({PrivatePtr});
// If the amount is divergent, we have to do a wave reduction to get the
// maximum value, so this is expanded during RegBankSelect.
@@ -664,7 +660,7 @@
getActionDefinitionsBuilder(G_GLOBAL_VALUE)
.customIf(typeIsNot(0, PrivatePtr));
- LegacyInfo.setAction({G_BLOCK_ADDR, CodePtr}, LegacyLegalizeActions::Legal);
+ getActionDefinitionsBuilder(G_BLOCK_ADDR).legalFor({CodePtr});
auto &FPOpActions = getActionDefinitionsBuilder(
{ G_FADD, G_FMUL, G_FMA, G_FCANONICALIZE})
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103684.349816.patch
Type: text/x-patch
Size: 1573 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210604/6e490531/attachment.bin>
More information about the llvm-commits
mailing list