[PATCH] D81510: GlobalISel: Pass LegalizerHelper to custom legalize callbacks

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 9 15:31:33 PDT 2020


arsenm created this revision.
arsenm added reviewers: dsanders, aemerson, paquette, aditya_nandakumar.
Herald added subscribers: kerbowa, atanasyan, hiraditya, tpr, rovka, nhaehnle, wdng, jvesely, sdardis.
Herald added a project: LLVM.

This was passing in all the parameters needed to construct a
LegalizerHelper in the custom legalization, when it's simpler to just
pass in the existing helper.

      

This is slightly more annoying to use in the common case where you
don't need the legalizer helper, but we could add back the common
parameters back in addition to the helper.

      

I didn't propagate this to all the internal target changes that this
logically implies, but did update a sample one for
legalizeMinNumMaxNum.

      

This is in preparation for moving AMDGPU load/store legalization
entirely into custom lowering. The current set of legalization actions
is really constraining and not really capable of expressing all the
actions needed to legalize loads/stores. In particular there's no way
to express when the memory access itself needs to change size vs. the
result type. There's also a lot of redundancy since the same
split/widen actions need to be applied in both vector and scalar
cases. All of the sub-cases logically belong as steps in the legalizer
helper, but it will be easier to consider everything at once in custom
lowering.


https://reviews.llvm.org/D81510

Files:
  llvm/include/llvm/CodeGen/GlobalISel/LegalizerHelper.h
  llvm/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h
  llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
  llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
  llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.h
  llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
  llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.h
  llvm/lib/Target/ARM/ARMLegalizerInfo.cpp
  llvm/lib/Target/ARM/ARMLegalizerInfo.h
  llvm/lib/Target/Mips/MipsLegalizerInfo.cpp
  llvm/lib/Target/Mips/MipsLegalizerInfo.h
  llvm/lib/Target/X86/X86LegalizerInfo.cpp
  llvm/lib/Target/X86/X86LegalizerInfo.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81510.269688.patch
Type: text/x-patch
Size: 16797 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200609/df31e961/attachment.bin>


More information about the llvm-commits mailing list