================ @@ -1599,9 +1599,14 @@ CodeGenFunction::EmitAutoVarAlloca(const VarDecl &D) { bool IsMSCatchParam = D.isExceptionVariable() && getTarget().getCXXABI().isMicrosoft(); + // No lifetime intrinsics on coroutine promise alloca, or middle end + // passes will assume promise dead after lifetime.end, leading to + // mis-optimization + bool IsCoroPromise = D.getName() == "__promise"; ---------------- ChuanqiXu9 wrote:
We should avoid comparing string as much as possible. And also it is not good to insert coroutines logic to `CGDecl.cpp`. We'd either doing this in CGCoroutine or CoroEarly. https://github.com/llvm/llvm-project/pull/140548 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits