[PATCH] D152081: [Attributor] Add lightweight version for attribute deduction only. (WIP)

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 4 09:22:15 PDT 2023


fhahn marked 3 inline comments as done.
fhahn added inline comments.


================
Comment at: llvm/lib/Passes/PassBuilderPipelines.cpp:908
   // function.
-  MainCGPipeline.addPass(PostOrderFunctionAttrsPass());
+  MainCGPipeline.addPass(PostOrderFunctionAttrsPass(/*SkipNonRecursive*/ true));
 
----------------
nikic wrote:
> This doesn't look right. You're effectively disabling most attribute inference here.
Thanks, something went wrong when squashing various changes.


================
Comment at: llvm/lib/Passes/PassBuilderPipelines.cpp:1297
+  else
+    MPM.addPass(ReversePostOrderFunctionAttrsPass());
 
----------------
goldstein.w.n wrote:
> nikic wrote:
> > Note that what you're replacing here is the late module RPO inference pass, which only infers `norecurse`. All other attributes are inferred by the CGSCC pass. Doing the inference here is too late (at least for non-LTO scenarios), we need this to happen as part of the CGSCC pipeline.
> We also want to make sure we do callsite inference before inlining, otherwise a lot of the attribute information will be lost.
I evaluated compile-time for various combinations, and that would be the one with the least amount of impact.

Compile-time impact with CGSCC only is in my latest comment.  Pipeline code has been split off from the patch to D152104


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D152081



More information about the llvm-commits mailing list