Hi, Can a gatekeeper please review the attached vectorizer patch? This change is a kludge in an attempt to reduce the overhead of auto-vectorization. The overhead we are trying to reduce is the cost of computing lower bound (LB) and upper bound (UB) of vectorized loop and remainder loop.
Suppose the original loop is:
for (i = 0; i < n; i++) and the unrolling factor (i.e. vector length) is f.
After SIMD, the vectorized loop and the remainder loop were the following:
vectorized loop: for (i = 0; i <= (n/f)*f - 1; i+=f) {}
remainder loop : for (i =(n/f)/f; i < n; i++) {}
The cost of computing LB/UB is high if :
- the loop being vectorized is in a deep nest, and
- the trip-count is small and it is not known at compile time
With this change, the vectorized loop and remainder loop are now:
vectorized loop: for (i = 0; i <= n-f; i+=f) {}
remainder loop : for (i'= i; i < n; i++) {}
The change to lnopt_hoistif.cxx is the prevent the LB of the remainder loop
back to what it was. The "hoist if" phase blindly change the code in order to
not let index variable live out of loop. The change to this file is to prevent
loops being modified if they are not amenable for hoist-if optimization.
Also, this change keeps index variable private to the loop being vectorized
if the loop is flagged Do_Loop_Is_MP().
Thanks.
Pallavi
vectorizer.p
Description: vectorizer.p
------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________ Open64-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/open64-devel
