[PATCH] D117509: [PartialInline] Bail out on asm-goto/callbr
Hongtao Yu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 18 11:12:16 PST 2022
hoy added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/PartialInlining.cpp:974
+ // Don't bother with BlockAddress used by CallBr for asm goto.
+ if (isa<BlockAddress>(User))
+ continue;
----------------
Moving the check into `getSupportedCallBase`? The assertion `llvm_unreachable("All uses must be calls");` there seems too strong.
================
Comment at: llvm/lib/Transforms/IPO/PartialInlining.cpp:1420
+ // Don't bother with BlockAddress used by CallBr for asm goto.
+ if (isa<BlockAddress>(User))
+ continue;
----------------
davidxl wrote:
> Is it legal to partial inline in case when the function's block address is taken?
I think so. The non-inlined callsites will still call the original version, while the inlined callsites will pull in the new version. The new version has some context-irrelevant code outlined, but both versions should be semantically equal. Please correct me if I'm missing anything?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117509/new/
https://reviews.llvm.org/D117509
More information about the llvm-commits
mailing list