[PATCH] D106891: [Remarks] Emit optimization remarks for atomics generating CAS loop

Matt Arsenault via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Aug 14 15:53:32 PDT 2021


arsenm added a comment.

I don’t think constructing in the pass is the solution. Why exactly is this introducing such a big slowdown?



================
Comment at: llvm/lib/CodeGen/AtomicExpandPass.cpp:180
 
+  ORE = std::make_shared<OptimizationRemarkEmitter>(&F);
   auto &TM = TPC->getTM<TargetMachine>();
----------------
There’s basically never a reason to use shared_ptr over unique_ptr


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106891



More information about the cfe-commits mailing list