[PATCH] D68151: [GlobalISel] Add an operand to memory intrinsics to denote the "tail" marker.

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 27 11:22:56 PDT 2019


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

We need to propagate this information from the IR in order to be able to safely do tail call optimizations on the intrinsics during legalization. Assuming it's safe to do tail call opt without checking for the marker isn't safe because the mem libcall may use allocas from the caller.

This adds an extra immediate operand to the end of the intrinsics and fixes the legalizer to handle it.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D68151

Files:
  llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
  llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
  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/Mips/GlobalISel/legalizer/dyn_stackalloc.mir
  llvm/test/CodeGen/X86/GlobalISel/x86_64-irtranslator-struct-return.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68151.222215.patch
Type: text/x-patch
Size: 19499 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190927/95c833b3/attachment.bin>


More information about the llvm-commits mailing list