================ @@ -995,6 +996,13 @@ void EmitAssemblyHelper::RunOptimizationPipeline( FPM.addPass(BoundsCheckingPass()); }); + if (LangOpts.Sanitize.has(SanitizerKind::Realtime)) + PB.registerScalarOptimizerLateEPCallback( ---------------- vitalybuka wrote:
This location looks OK to me. For other sanitizers, the earlier pass is inserted, the more precise is bug detection, but binary will be slower. If we insert late, like this one, optimization passes may optimize out a bug. It would be nice to detect those bugs present in source code, but the cost is too high. For RTSan, I think, users even will not even care about non-rt-friendly source code, if compiler is able to optimize it out. So late, like here, is appropriate. 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