calixte marked an inline comment as done.
calixte added inline comments.

================
Comment at: llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp:635
 void GCOVProfiler::AddFlushBeforeForkAndExec() {
-  SmallVector<Instruction *, 2> ForkAndExecs;
+  SmallVector<std::pair<bool, CallInst *>, 2> ForkAndExecs;
   for (auto &F : M->functions()) {
----------------
marco-c wrote:
> calixte wrote:
> > marco-c wrote:
> > > Since we are now mostly doing different things on forks and execs, we 
> > > could remove this vector and just do the operations directly instead of 
> > > adding to the vec.
> > If we make the insertions of new code in the second for loop, we'll 
> > invalidate the iterator used in this loop. 
> M->getOrInsertFunction is what would invalidate the iterator?
> 
> You could clean things up a bit by having two vectors then, one for forks and 
> one for execs.
Builder.Create** will invalidate the iterator 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74953



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

Reply via email to