On Thu, Mar 18, 2021 at 3:48 PM Tobias Burnus <tob...@codesourcery.com> wrote: > > Richard, > > On 18.03.21 13:35, Richard Biener via Fortran wrote: > > [...] > > Since the libgfortran MATMUL should be vectorized > > I think it's not reasonable to inline any but _very_ small > > MATMUL at optimization levels that do not enable vectorization. > > Besides the obvious if (!flag_external_blas) which should always prevent > inlining (possibly except for tiny N like N=1), your idea is 'if (N > small || flag_tree_loop_vectorize)'? > > Or are you thinking of a different or additional flag_... than > flag_tree_loop_vectorize for making this choice?
Yes, I was thinking of flag_tree_loop_vectorize. Of course libgfortran is far from having micro-optimized matmul for various architectures but IIRC it uses attribute(target) to provide several overloads. So maybe only ever inlining tiny matmul makes sense as well (does the runtime have specializations for small sizes?) Richard. > Tobias > > ----------------- > Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 München > Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Frank > Thürauf