[patch] Merge to trunk from Graphite branch
Ira Rosen
IRAR@il.ibm.com
Tue Mar 16 13:32:00 GMT 2010
dominiq@lps.ens.fr (Dominique Dhumieres) wrote on 16/03/2010 12:07:42 AM:
> The missed vectorization seems related to the loop index being unknown:
> if I replace 'do i = 1, n' with 'do i = 1, nl' with nl set to
> some given value (say 100) the loop vectorize with -fgraphite-identity.
>
In gas_dyn vectorization fails because Graphite inserts statements in latch
blocks, e.g. (line 409),
<bb 12>:
# ivtmp.2047_274 = PHI <ivtmp.2047_275(13), 0(11)>
D.7535_276 = (integer(kind=8)) ivtmp.2047_274;
S.26_217 = D.7535_276 + 1;
D.4310_112 = S.26_217 + -1;
(*gamma_113(D))[D.4310_112] = D.4292_73;
if (ivtmp.2047_274 < D.7533_233)
goto <bb 13>;
else
goto <bb 14>;
<bb 13>:
ivtmp.2047_275 = ivtmp.2047_274 + 1; <============= this statement
goto <bb 12>;
In Toon's testcase from
http://gcc.gnu.org/ml/gcc-patches/2010-03/msg00515.html vectorization fails
because scev analysis failure: "evolution of offset is not affine." It
probably gets confused by
# graphite_IV.22_66 = PHI <0(4), graphite_IV.22_67(6)>
var.23_77 = (character(kind=4)) graphite_IV.22_66;
D.1214_68 = (integer(kind=4)) var.23_77;
i_69 = D.1214_68 + 1;
D.1192_70 = (integer(kind=8)) i_69;
D.1193_71 = D.1192_70 + -1;
D.1194_72 = (*a_39(D))[D.1193_71];
instead (without Graphite)
# i_1 = PHI <1(3), i_48(5)>
D.1192_37 = (integer(kind=8)) i_1;
D.1193_38 = D.1192_37 + -1;
D.1194_40 = (*a_39(D))[D.1193_38];
Ira
> Dominique
More information about the Gcc-patches
mailing list