nikic added a comment.

In D106891#2945342 <https://reviews.llvm.org/D106891#2945342>, @arsenm wrote:

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

The reason are the additional DominatorTree and LoopInfo calculations. These 
have a big impact at `O0`. These analysis calculations are caused by a 
deficiency in the legacy pass manager, which is still used for the codegen 
pipeline: Even though these analyses are only needed if diagnostic hotness is 
used, the pass manager requires them to be scheduled unconditionally.

The way to avoid this is to construct ORE without going through the pass 
manager. Grep for `OptimizationRemarkEmitter ORE` for various passes that 
already do this (though the reason is different in some cases -- there are some 
analysis preservation concerns with loop passes).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106891

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

Reply via email to