Page MenuHomePhabricator

[StackMaps] Avoid crash when a call follows a patchpoint
Needs ReviewPublic

Authored by jmolloy on Nov 20 2019, 7:15 AM.

Details

Summary

A call after a patchpoint will cause the patchpoint to implicitly have SSP as liveout. SSP doesn't have a DWARF regnum or a register class, so we blow up in getDwarfRegNum().

Guard this by only trying to emit stackmap information for allocatable registers.

Event Timeline

jmolloy created this revision.Nov 20 2019, 7:15 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 20 2019, 7:15 AM
aprantl added inline comments.Nov 21 2019, 3:10 PM
llvm/lib/CodeGen/StackMaps.cpp
264

Disclaimer: I know nothing about LLVM's StackMap implementation.

Is it safe to just ignore it here? In CodeGen/AsmPrinter/DwarfExpression.cpp we have code to compose a register without a Dwarf number out of sub- or super-registers.