[PATCH] D84849: GlobalISel: Handle llvm.localescape

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 29 07:55:13 PDT 2020


arsenm created this revision.
arsenm added reviewers: paquette, aemerson, aditya_nandakumar, dsanders, rnk, majnemer.
Herald added subscribers: hiraditya, rovka.
Herald added a project: LLVM.
arsenm requested review of this revision.
Herald added a subscriber: wdng.

This one is pretty easy and shrinks the list of unhandled
intrinsics. I'm not sure how relevant the insert point is. Using the
insert position of EntryBuilder will place this after
constants. SelectionDAG seems to end up emitting these after argument
copies and before anything else, but I don't think it really
matters. This also ends up emitting these in the opposite order from
SelectionDAG, but I don't think that matters either.

      

This also needs a fix to stop the later passes dropping this as a dead
instruction. DeadMachineInstructionElim's version of isDead special
cases LOCAL_ESCAPE for some reason, and I'm not sure why it's excluded
from MachineInstr::isLabel (or why isDead doesn't check it).

      

I also noticed DeadMachineInstructionElim never considers inline asm
as dead, but GlobalISel will drop asm with no constraints.


https://reviews.llvm.org/D84849

Files:
  llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
  llvm/lib/CodeGen/GlobalISel/Utils.cpp
  llvm/test/CodeGen/AArch64/GlobalISel/irtranslator-localescape.ll
  llvm/test/CodeGen/AArch64/GlobalISel/labels-are-not-dead.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84849.281587.patch
Type: text/x-patch
Size: 7531 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200729/fa880e05/attachment.bin>


More information about the llvm-commits mailing list