[PATCH] D64895: [GlobalISel] Translate calls to memcpy et al to G_INTRINSIC_W_SIDE_EFFECTs and legalize later.

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 17 15:43:32 PDT 2019


aemerson created this revision.
aemerson added reviewers: dsanders, qcolombet, arsenm, paquette, volkan.
Herald added subscribers: Petar.Avramovic, atanasyan, jrtc27, hiraditya, javed.absar, rovka, wdng, sdardis.
Herald added a project: LLVM.

I plan on adding memcpy optimizations in the GlobalISel pipeline, but we can't do that unless we delay lowering to actual function calls. This patch changes the translator to generate G_INTRINSIC_W_SIDE_EFFECTS for these functions, and then have each target specify that using the new custom legalizer for intrinsics hook that they want it expanded it a libcall.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D64895

Files:
  llvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h
  llvm/include/llvm/CodeGen/GlobalISel/LegalizerHelper.h
  llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
  llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
  llvm/lib/Target/AArch64/AArch64LegalizerInfo.cpp
  llvm/lib/Target/AArch64/AArch64LegalizerInfo.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
  llvm/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll
  llvm/test/CodeGen/AArch64/GlobalISel/legalize-memcpy-et-al.mir
  llvm/test/CodeGen/Mips/GlobalISel/irtranslator/call.ll
  llvm/test/CodeGen/X86/GlobalISel/x86_64-irtranslator-struct-return.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64895.210444.patch
Type: text/x-patch
Size: 32115 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190717/d04f79e1/attachment.bin>


More information about the llvm-commits mailing list