[PATCH] D29856: [X86]: Add imp-uses of live regs when creating conditional tail calls (PR31257)

Hans Wennborg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 10 15:54:33 PST 2017


hans created this revision.

This is a second stab at fixing PR31257 (the previous one was https://reviews.llvm.org/D29511). The patch is intended to be applied on top of a revert of r294348.

The idea is to mark registers which are live before the call, but potentially clobbered by it, as imp-used, as a way of keeping them alive. In reality, the registers are not clobbered unless the call is made, in which case it doesn't matter as control leaves the function.

This is the same technique that's used when creating predicated variants of instructions in IfConverter::CopyAndPredicateBlock.


https://reviews.llvm.org/D29856

Files:
  lib/Target/X86/X86InstrInfo.cpp
  test/CodeGen/X86/conditional-tailcall.ll
  test/CodeGen/X86/tail-call-conditional.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29856.88069.patch
Type: text/x-patch
Size: 6295 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170210/1b3c04f1/attachment.bin>


More information about the llvm-commits mailing list