[PATCH] D128629: CodeGen: allow a `musttail` call to be followed by `unreachable`
Tim Northover via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 27 02:34:39 PDT 2022
t.p.northover created this revision.
Herald added subscribers: jsji, pengfei, hiraditya, mcrosier.
Herald added a project: All.
t.p.northover requested review of this revision.
Herald added a project: LLVM.
If the function being called is `noreturn` it's functionally correct to have a tail call followed by `unreachable`. It appears to be avoided for normal tail calls for performance reasons, but it's allowed in other guaranteed TCO cases, so I don't think there's any reason to restrict `musttail`.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D128629
Files:
llvm/lib/CodeGen/Analysis.cpp
llvm/lib/IR/Verifier.cpp
llvm/test/CodeGen/AArch64/musttail-noreturn.ll
llvm/test/CodeGen/ARM/musttail-noreturn.ll
llvm/test/CodeGen/X86/musttail-noreturn.ll
llvm/test/Verifier/musttail-invalid.ll
llvm/test/Verifier/musttail-valid.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128629.440138.patch
Type: text/x-patch
Size: 3687 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220627/0169b047/attachment.bin>
More information about the llvm-commits
mailing list