From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2066) id B608F3861019; Wed, 8 Jul 2020 09:08:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B608F3861019 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1594199315; bh=NASdqnjr2ITx4eQ+QkOOAHS4LkLJ+fIIrqyt1JWxoPQ=; h=From:To:Subject:Date:From; b=HIxTmXt86N46+LyvMbz0qK3pn8QglV3kM1cMOz8uO5Y302H2Mlk7uAewxAaJjuqav x8Q/3Fc/kfXYMR2iJHl36L/WvaMfsfn9Pc0BxucTwL4BsM2/pJS57eWe5x1a3rpgIQ ZugN7BdmIkeEUuMGgJMpIT0qMsr/LV79B2JVn8bU= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Jiu Fu Guo To: gcc-cvs@gcc.gnu.org Subject: [gcc/guojiufu/heads/guojiufu-branch] Daily bump. X-Act-Checkin: gcc X-Git-Author: Jiu Fu Guo X-Git-Refname: refs/users/guojiufu/heads/guojiufu-branch X-Git-Oldrev: 85a0fd39ef8df6b76df70110d096f22cfa8456c4 X-Git-Newrev: 8e3b453e0877288685695ca3e927a2da3b5f5b78 Message-Id: <20200708090835.B608F3861019@sourceware.org> Date: Wed, 8 Jul 2020 09:08:35 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2020 09:08:35 -0000 The branch 'guojiufu/heads/guojiufu-branch' was updated to point to: 8e3b453e087... Daily bump. It previously pointed to: 85a0fd39ef8... rs6000: Refine RTL unroll adjust hook for small loops Diff: !!! WARNING: THE FOLLOWING COMMITS ARE NO LONGER ACCESSIBLE (LOST): ------------------------------------------------------------------- 85a0fd3... rs6000: Refine RTL unroll adjust hook for small loops a352793... rs6000: Refine RTL unroll adjust hook commit 85a0fd39ef8df6b76df70110d096f22cfa8456c4 Author: guojiufu Date: Wed Jul 8 16:49:40 2020 +0800 rs6000: Refine RTL unroll adjust hook for small loops commit a3527937da17089b1bb95097726285fbdfff4b17 Author: guojiufu Date: Fri Jun 19 09:24:19 2020 +0800 rs6000: Refine RTL unroll adjust hook For very small loops (< 6 insns), it would be fine to unroll 4 times to use cache line better. Like below loops: `while (i) a[--i] = NULL; while (p < e) *d++ = *p++;` And for very complex loops which may cause negative impact: branch-miss or cache-miss. Like below loop: there are calls, early exits and branches in loop. ``` for (int i = 0; i < n; i++) { int e = a[I]; .... if (function_call(e)) break; .... } ``` This patch enhance RTL unroll for small loops and prevent to unroll complex loops. gcc/ChangeLog 2020-07-03 Jiufu Guo * config/rs6000/rs6000.c (rs6000_loop_unroll_adjust): Refine hook. (rs6000_complex_loop_p): New function. (num_loop_calls): New function.