From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1666) id EAA843858002; Mon, 16 Oct 2023 12:49:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EAA843858002 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1697460580; bh=P+PUDkvh1Xf5LzIlnCPrhTQ6w0yaCIuTi/Ufji04HRE=; h=From:To:Subject:Date:From; b=S3M3dpB8MUiGbPAVcwxN6Mp5N9W47tUwvbFFbIcVGVNLAww9DExs2Oxl/G9OyGrfk 0tyedjRRucccAG4bLAxqlbh3+4Jac1g4U+Kmp5+V2h0eLWR89cRf2aSFTAGTUsgxuX Bn1vE0J2FFO2AMeVHCmZK8j9066Pq9uL5jTsIqYQ= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Richard Biener To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/rguenth/heads/vect-force-slp)] Allow bigger SLP graphs X-Act-Checkin: gcc X-Git-Author: Richard Biener X-Git-Refname: refs/users/rguenth/heads/vect-force-slp X-Git-Oldrev: 9552241ae15096a0fd9076b04f717bda45cc37a8 X-Git-Newrev: 64a5842cd8c64508c96e33d9f97118d64e096740 Message-Id: <20231016124940.EAA843858002@sourceware.org> Date: Mon, 16 Oct 2023 12:49:40 +0000 (GMT) List-Id: https://gcc.gnu.org/g:64a5842cd8c64508c96e33d9f97118d64e096740 commit 64a5842cd8c64508c96e33d9f97118d64e096740 Author: Richard Biener Date: Fri Sep 29 13:05:01 2023 +0200 Allow bigger SLP graphs When doing single-lane SLP discovery only we're easily running into the SLP graph size limit when patterns are involved. The following ups the limit from the number of scalar stmts to the number of scalar or pattern stmts by using the number of stmt_vec_infos created. * tree-vect-loop.cc (vect_analyze_loop_2): Use the number of stmt_vec_infos created to limit the SLP graph size. Diff: --- gcc/tree-vect-loop.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc index 89bdcaa09104..7a912716c2d1 100644 --- a/gcc/tree-vect-loop.cc +++ b/gcc/tree-vect-loop.cc @@ -2723,8 +2723,10 @@ vect_analyze_loop_2 (loop_vec_info loop_vinfo, bool &fatal, if (slp) { /* Check the SLP opportunities in the loop, analyze and build - SLP trees. */ - ok = vect_analyze_slp (loop_vinfo, LOOP_VINFO_N_STMTS (loop_vinfo)); + SLP trees. Use the number of stmt_vec_infos as graph limit + since that also includes pattern stmts which LOOP_VINFO_N_STMTS + does not. */ + ok = vect_analyze_slp (loop_vinfo, loop_vinfo->stmt_vec_infos.length ()); if (!ok) return ok;