]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Check TARGET_LOOP_UNROLL_ADJUST while deciding unroll factor
authorGanesh Gopalasubramanian <Ganesh.Gopalasubramanian@amd.com>
Mon, 2 Dec 2013 07:27:14 +0000 (07:27 +0000)
committerGanesh Gopalasubramanian <gganesh@gcc.gnu.org>
Mon, 2 Dec 2013 07:27:14 +0000 (07:27 +0000)
From-SVN: r205580

gcc/ChangeLog
gcc/loop-unroll.c

index d4fc7ebc3768d0d1e65ffa5a1e9ab96010e956cc..0e5112eb22a928e7c2dadd9156ea89770948602c 100644 (file)
@@ -1,3 +1,8 @@
+2013-12-02 Ganesh Gopalasubramanian  <Ganesh.Gopalasubramanian@amd.com>
+
+       * loop-unroll.c (decide_unroll_constant_iterations): Check macro 
+       TARGET_LOOP_UNROLL_ADJUST while deciding unroll factor.
+
 2013-12-01  Eric Botcazou  <ebotcazou@adacore.com>
 
        * config/i386/winnt.c (i386_pe_asm_named_section): Be prepared for an
index 9c871678f6b74dc7b958d9ae8a5119e3f159bc5a..557915fafbc16c6eb12d15f34bcb77e9e9b56c07 100644 (file)
@@ -664,6 +664,9 @@ decide_unroll_constant_iterations (struct loop *loop, int flags)
   if (nunroll > (unsigned) PARAM_VALUE (PARAM_MAX_UNROLL_TIMES))
     nunroll = PARAM_VALUE (PARAM_MAX_UNROLL_TIMES);
 
+  if (targetm.loop_unroll_adjust)
+    nunroll = targetm.loop_unroll_adjust (nunroll, loop);
+
   /* Skip big loops.  */
   if (nunroll <= 1)
     {