This is the mail archive of the
mailing list for the GCC project.
vectorization cost macro TARGET_VECTORIZE_ADD_STMT_COST
- From: Ajit Kumar Agarwal <ajit dot kumar dot agarwal at xilinx dot com>
- To: Jeff Law <law at redhat dot com>, Richard Biener <richard dot guenther at gmail dot com>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Cc: Vinod Kathail <vinodk at xilinx dot com>, Shail Aditya Gupta <shailadi at xilinx dot com>, Vidhumouli Hunsigida <vidhum at xilinx dot com>, "Nagaraju Mekala" <nmekala at xilinx dot com>
- Date: Sun, 2 Aug 2015 14:13:11 +0000
- Subject: vectorization cost macro TARGET_VECTORIZE_ADD_STMT_COST
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=pass (sender IP is 18.104.22.168) smtp.mailfrom=xilinx.com; gcc.gnu.org; dkim=none (message not signed) header.d=none;
The definition of the following macro that determine the statement cost that adds to vectorization cost.
In the implementation of the above macro the following is done for many vectorization supported architectures like i386, ARM.
if (where == vect_body && stmt_info && stmt_in_inner_loop_p (stmt_info))
count *= 50; /* FIXME. */
I have the following questions.
1. Why the multiplication factor of 50 is choosen?
2. The comment mentions that the inner loop relative to the loop being vectorized is added more weight. If more weight is added to
the inner loop for the loop being vectorized, the chances of vectorizing the inner loop decreases. Why the inner loop cost is increased
with relative to the loop being vectorized?
Thanks & Regards