tejohnson added inline comments.

================
Comment at: clang/lib/CodeGen/BackendUtil.cpp:689
   // Set up the per-function pass manager.
-  FPM.add(new TargetLibraryInfoWrapperPass(*TLII));
+  FPM.add(new TargetLibraryInfoWrapperPass(TargetTriple));
   if (CodeGenOpts.VerifyModule)
----------------
wenlei wrote:
> tejohnson wrote:
> > These changes mean we now construct a new TLII multiple times (e.g. both 
> > when we add the TargetLibraryInfoWrapperPass to the MPM earlier and to the 
> > FPM here, rather that just copying. Is this actually faster? It seems like 
> > it would be slower overall.
> Oops, this one isn't intentional... changed it back. Though for other 
> instances where TLII isn't reused, similar change turns extra copy into move.
I suppose you could std::move the TLII here to avoid this second copy.

Do you know how much difference this patch makes on the compile time 
instruction count regressions seen with the original patch? It seems like it 
shouldn't be huge given that this is just during the pipeline setup for the 
module. But if it does explain the instruction count increases that's probably 
why it didn't regress the actual wall time measurements.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77952



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

Reply via email to