[PATCH] D83923: [MachineOutliner][AArch64] Fix for noreturn functions
Puyan Lotfi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 15 18:42:04 PDT 2020
plotfi created this revision.
plotfi added reviewers: kyulee, paquette, tellenbach, AndrewLitteken.
Herald added subscribers: llvm-commits, danielkiss, hiraditya, kristof.beyls.
Herald added a project: LLVM.
My take on https://reviews.llvm.org/D83464
Basically it appears that in cases where we have noreturns or calls in an outliner candidate that has no LR, no available free regs, or any use of SP that we end up hitting stack fixup code with the MachineOutlinerDefault set as the FrameID. This triggers an assert of `OF.FrameConstructionID != MachineOutlinerDefault && "Can only fix up stack references once"` at llvm/lib/Target/AArch64/AArch64InstrInfo.cpp:6595 because a lot of the fixup code is not tested to handle fixing up more than once and needs some better checks for possible illegal code generated.
I have created a new diff instead of appending to D83464 <https://reviews.llvm.org/D83464> because Phab wont let me.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D83923
Files:
llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
llvm/test/CodeGen/AArch64/machine-outliner-noreturn-no-stack.mir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83923.278348.patch
Type: text/x-patch
Size: 4275 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200716/64d1bf0a/attachment.bin>
More information about the llvm-commits
mailing list