[PATCH] D96456: [ThinLTO, NewPM] Register sanitizers with OptimizerLastPassBuilderHook

Vitaly Buka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 11 18:35:20 PST 2021


vitalybuka added inline comments.


================
Comment at: clang/lib/CodeGen/BackendUtil.cpp:1328
+        CodeGenOpts.ThinLTOIndexFile.empty()) {
+      // This is testing distributed ThinLTO PostLink. O0 called optimized in
+      // PreLink.
----------------
vitalybuka wrote:
> tejohnson wrote:
> > I don't understand what you mean by "O0 called optimized"?
> > Also maybe make it clear that the first sentence goes with the second check?
> > 
> > Also, it isn't clear to me how this is preventing the sanitizers from being added in the ThinLTO pre-link compiles for optimized compiles, as shown in your tests. Unlike regular LTO pre-link optimized builds, which are still getting the sanitizers.
> Reworded:
> OptimizerLastEPCallbacks is good for anything that not SkipThinLTOPostLink
> We need protection only for OptimizerLastEPCallbacks+O0
> Reworded:
> OptimizerLastEPCallbacks is good for anything that not SkipThinLTOPostLink
> We need protection only for OptimizerLastEPCallbacks+O0
We need special protection only against (SkipThinLTOPostLink && O0)



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96456/new/

https://reviews.llvm.org/D96456



More information about the cfe-commits mailing list