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.
Loading
Please sign in to comment