================
@@ -1544,8 +1544,12 @@ void CodeGenFunction::GenerateCode(GlobalDecl GD,
llvm::Function *Fn,
ShouldEmitLifetimeMarkers = true;
// Initialize helper which will detect jumps which can cause invalid
- // lifetime markers.
- if (ShouldEmitLifetimeMarkers)
+ // lifetime markers or bypass trivial auto var init.
+ bool NeedsBypassDetection =
+ ShouldEmitLifetimeMarkers ||
+ (CGM.getLangOpts().getTrivialAutoVarInit() !=
+ LangOptions::TrivialAutoVarInitKind::Uninitialized);
+ if (NeedsBypassDetection)
Bypasses.Init(CGM, Body);
----------------
efriedma-quic wrote:
How expensive is just turning on bypass detection on its own, for code that
rarely uses goto? Maybe get an estimate from llvm-compile-time-tracker.com .
(This change will turn it on at -O0, which means it will basically always be
on.)
https://github.com/llvm/llvm-project/pull/181937
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits