[llvm] [Coroutines] Inline the `.noalloc` ramp function marked coro_safe_elide (PR #114004)
Chuanqi Xu via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 3 17:45:47 PST 2024
================
@@ -92,61 +94,86 @@ static void processCall(CallBase *CB, Function *Caller, Function *NewCallee,
NewCB->removeFnAttr(llvm::Attribute::CoroElideSafe);
CB->replaceAllUsesWith(NewCB);
- CB->eraseFromParent();
+
+ InlineFunctionInfo IFI;
+ InlineResult IR = InlineFunction(*NewCB, IFI);
+ if (IR.isSuccess()) {
+ CB->eraseFromParent();
+ } else {
----------------
ChuanqiXu9 wrote:
Can we add a test for the failed to inline case?
https://github.com/llvm/llvm-project/pull/114004
More information about the llvm-commits
mailing list