SuperWord::unrolling_analysis() question

John Rose john.r.rose at
Wed Apr 27 21:55:09 UTC 2016

It is reasonable to look ahead into the loop to find the largest applicable vector size, before choosing an unroll factor.
A loop which works on bytes and doubles at the same time will want to unroll only up to vector-of-double.
But a loop which works only on bytes will want to unroll more.
Is that what we are talking about here?
— John

> On Apr 27, 2016, at 8:53 AM, Roland Westrelin <rwestrel at> wrote:
> Hi Michael,
> Thanks for the answer.
>> 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.
> Would two passes like sketched here:
> would do the job?
> Roland.

More information about the hotspot-compiler-dev mailing list