================ @@ -1664,6 +1710,17 @@ CodeGenFunction::EmitAutoVarAlloca(const VarDecl &D) { emission.getOriginalAllocatedAddress(), emission.getSizeForLifetimeMarkers()); + // Analogous to lifetime markers, we use a 'cleanup' to emit fake.use + // calls for local variables. We are exempting volatile variables and + // non-scalars larger than 4 times the size of an unsigned int (32 bytes). + // Larger non-scalars are often allocated in memory and may create unnecessary + // overhead. + if (CGM.getCodeGenOpts().ExtendLifetimes) { + if (extendLifetime(getContext(), CurCodeDecl, D, CXXABIThisDecl)) + EHStack.pushCleanup<FakeUse>(NormalFakeUse, + emission.getAllocatedAddress()); ---------------- SLTozer wrote:
I'll look into it - I'm not familiar enough to know, and a quick test indicates it's nothing obviously wrong, but I'll try to verify if it should change or not. https://github.com/llvm/llvm-project/pull/110102 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits