[all-commits] [llvm/llvm-project] 3e16e2: GlobalISel: Handle llvm.localescape

Matt Arsenault via All-commits all-commits at lists.llvm.org
Tue Aug 4 12:19:21 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 3e16e2152cd1fb3914d4da47d83d5e023dd3f2cb
      https://github.com/llvm/llvm-project/commit/3e16e2152cd1fb3914d4da47d83d5e023dd3f2cb
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2020-08-04 (Tue, 04 Aug 2020)

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

  Log Message:
  -----------
  GlobalISel: Handle llvm.localescape

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.




More information about the All-commits mailing list