summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorgganesh <gganesh@138bc75d-0d04-0410-961f-82ee72b054a4>2013-12-02 07:27:14 +0000
committergganesh <gganesh@138bc75d-0d04-0410-961f-82ee72b054a4>2013-12-02 07:27:14 +0000
commite7f33cf8732a7f747fed494759cd315aef32f388 (patch)
tree720beca2ca5500b525897a7cc83a37f03710acb5 /gcc
parent7201732947bc65274ea5bd26311a86e5e5ad0f45 (diff)
downloadgcc-e7f33cf8732a7f747fed494759cd315aef32f388.tar.gz
Check TARGET_LOOP_UNROLL_ADJUST while deciding unroll factor
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205580 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/loop-unroll.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d4fc7ebc376..0e5112eb22a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/loop-unroll.c b/gcc/loop-unroll.c
index 9c871678f6b..557915fafbc 100644
--- a/gcc/loop-unroll.c
+++ b/gcc/loop-unroll.c
@@ -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)
{