diff options
author | Xinliang David Li <davidxl@google.com> | 2013-09-27 16:48:15 +0000 |
---|---|---|
committer | Xinliang David Li <davidxl@gcc.gnu.org> | 2013-09-27 16:48:15 +0000 |
commit | d6d1127249564146429009e0682f25bd58d7a791 (patch) | |
tree | f6309abb88289dcaa19aca96778e0ef0659d91a6 /gcc/config | |
parent | ac1857a3ef390df0c1b8faf745f855e8c5346b10 (diff) | |
download | gcc-d6d1127249564146429009e0682f25bd58d7a791.zip gcc-d6d1127249564146429009e0682f25bd58d7a791.tar.gz gcc-d6d1127249564146429009e0682f25bd58d7a791.tar.bz2 |
vectorizer cost model enhancement
From-SVN: r202980
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/i386/i386.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index f10113f..21fc531 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -42782,20 +42782,17 @@ ix86_add_stmt_cost (void *data, int count, enum vect_cost_for_stmt kind, unsigned *cost = (unsigned *) data; unsigned retval = 0; - if (flag_vect_cost_model) - { - tree vectype = stmt_info ? stmt_vectype (stmt_info) : NULL_TREE; - int stmt_cost = ix86_builtin_vectorization_cost (kind, vectype, misalign); + tree vectype = stmt_info ? stmt_vectype (stmt_info) : NULL_TREE; + int stmt_cost = ix86_builtin_vectorization_cost (kind, vectype, misalign); - /* Statements in an inner loop relative to the loop being - vectorized are weighted more heavily. The value here is - arbitrary and could potentially be improved with analysis. */ - if (where == vect_body && stmt_info && stmt_in_inner_loop_p (stmt_info)) - count *= 50; /* FIXME. */ + /* Statements in an inner loop relative to the loop being + vectorized are weighted more heavily. The value here is + arbitrary and could potentially be improved with analysis. */ + if (where == vect_body && stmt_info && stmt_in_inner_loop_p (stmt_info)) + count *= 50; /* FIXME. */ - retval = (unsigned) (count * stmt_cost); - cost[where] += retval; - } + retval = (unsigned) (count * stmt_cost); + cost[where] += retval; return retval; } |