SuperWord::unrolling_analysis() question
Berg, Michael C
michael.c.berg at intel.com
Tue Apr 26 18:27:42 UTC 2016
Roland,
The answer could be conditional if we had a machines with enough byte or short components to make vectors with, I chose INT as it is the current consistent minimum configuration for complete vector mapping. The best answer would be to create some code which mines the common type used in the current loops expressions, but I think we would be stuck with two passes over the code, the first to bind the common type, the second for finding the optimal sub vector mapping. Or possibly moving the question to the machine layer as a query, where compiler writers choose the minimum consistent configuration based on current info on the machine we compile on.
-Michael
-----Original Message-----
From: hotspot-compiler-dev [mailto:hotspot-compiler-dev-bounces at openjdk.java.net] On Behalf Of Roland Westrelin
Sent: Tuesday, April 26, 2016 7:30 AM
To: hotspot-compiler-dev at openjdk.java.net
Subject: SuperWord::unrolling_analysis() question
Why does SuperWord::unrolling_analysis() use:
int max_vector = Matcher::max_vector_size(T_INT);
instead of:
int max_vector = Matcher::max_vector_size(T_BYTE);
?
For a loop like this:
static void test_byte(byte[] src, byte[] dst) {
for (int i = 0; i < src.length; i++) {
dst[i] = src[i];
}
}
It limits the size of the vectors that are used below what the hardware
can support.
Roland.
More information about the hotspot-compiler-dev
mailing list