aeubanks added inline comments.

================
Comment at: llvm/lib/Passes/PassBuilder.cpp:2365
+      // Don't do anything for (thin)lto backend compiles at O0.
+      if (Matches[1] != "thinlto" && Matches[1] != "lto")
+        MPM.addPass(buildO0DefaultPipeline(L, Matches[1] != "default"));
----------------
tejohnson wrote:
> This seems to change behavior. For one, previously we were only suppressing 
> adding the PGO Instr passes for ThinLTO. Now this will suppress adding the 
> coroutines passes and whatever else runRegisteredEPCallbacks was doing. Also, 
> it's now doing the same for regular LTO but it didn't seem to do any special 
> handling in that case before. Are these changes intended?
The callbacks are generally for two purposes. One is to lower certain 
constructs, which only needs to be done once. It should already have been done 
in the pre-link step. The other is for optimization purposes at specific points 
in the pipeline. Since this is -O0, that doesn't matter.

So I think this makes sense.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91585

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to