[PATCH] D106891: [Remarks] Emit optimization remarks for atomics generating CAS loop
Anshil Gandhi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 16 10:31:03 PDT 2021
gandhi21299 added inline comments.
================
Comment at: llvm/lib/CodeGen/AtomicExpandPass.cpp:175
+ ORE = std::make_unique<OptimizationRemarkEmitter>(&F);
auto &TM = TPC->getTM<TargetMachine>();
----------------
rampitec wrote:
> Is there a reason to construct it upfront and not just use a local variable only when needed? Like in StackProtector.cpp for example.
We can certainly implement it as a local variable as long as we have access to the function this pass is operating on. I was thinking of its potential use throughout this pass in the future.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106891/new/
https://reviews.llvm.org/D106891
More information about the llvm-commits
mailing list