aboutsummaryrefslogtreecommitdiff
path: root/gcc/loop-unroll.c
diff options
context:
space:
mode:
authorGanesh Gopalasubramanian <Ganesh.Gopalasubramanian@amd.com>2013-12-02 07:27:14 +0000
committerGanesh Gopalasubramanian <gganesh@gcc.gnu.org>2013-12-02 07:27:14 +0000
commitdf0f33923567d9ab3ab3e34893b4e4ad8282c6f1 (patch)
tree720beca2ca5500b525897a7cc83a37f03710acb5 /gcc/loop-unroll.c
parent62ca1b143cc57a654c658dc0be5685e6455416d7 (diff)
downloadgcc-df0f33923567d9ab3ab3e34893b4e4ad8282c6f1.zip
gcc-df0f33923567d9ab3ab3e34893b4e4ad8282c6f1.tar.gz
gcc-df0f33923567d9ab3ab3e34893b4e4ad8282c6f1.tar.bz2
Check TARGET_LOOP_UNROLL_ADJUST while deciding unroll factor
From-SVN: r205580
Diffstat (limited to 'gcc/loop-unroll.c')
-rw-r--r--gcc/loop-unroll.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/loop-unroll.c b/gcc/loop-unroll.c
index 9c87167..557915f 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)
{