[PATCH] D53245: Teach the DominatorTree fallback to recalculation when applying updates to speedup JT (PR37929)

Jakub Kuderski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 24 08:18:40 PDT 2018


kuhar added a comment.

In https://reviews.llvm.org/D53245#1274293, @kuhar wrote:

> In https://reviews.llvm.org/D53245#1274287, @brzycki wrote:
>
> > I'd still like to see the constant as a hidden command line argument `cl::opt()`. Otherwise I think this is an excellent patch with considerable compile-time speedups. Nice work @NutshellySima .
>
>
> The issue I find with cl::opt here is that this is a generic class that may not necessarily have a corresponding cpp file -- there can be multiple clients to GenericDomTreeConstruction, each with different requirements. Because of that, it's not clear to me in which translation unit one would put cl::opt for the constant in.
>  Is that a solved problem somewhere else in LLVM? I'm not familiar with using cl::opt in header files.


One reasonable alternative I can think of would be adding an extra template or function parameter to applyUpdated, that can be defaulted to some reasonable constant. This would also allow us to adjust the constant in optimizations that are known to be sensitive to the length of the final legalized batch.


https://reviews.llvm.org/D53245





More information about the llvm-commits mailing list