================ @@ -845,6 +845,12 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy, if (SanOpts.has(SanitizerKind::ShadowCallStack)) Fn->addFnAttr(llvm::Attribute::ShadowCallStack); + if (SanOpts.has(SanitizerKind::Realtime)) { + for (const FunctionEffectWithCondition &Fe : FD->getFunctionEffects()) + if (Fe.Effect.kind() == FunctionEffect::Kind::NonBlocking) + Fn->addFnAttr(llvm::Attribute::SanitizeRealtime); + } ---------------- dougsonos wrote:
`getFunctionEffects()` is cheap, but when investigating the performance regression introduced by effects, it turned out to be worthwhile to test `Context.hasAnyFunctionEffects()` first, to optimize for the case of no effects ever having been seen. https://github.com/llvm/llvm-project/pull/102622 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits