[Bug tree-optimization/84037] [8 Regression] Speed regression of polyhedron benchmark since r256644
amker at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Feb 8 17:56:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84037
--- Comment #26 from amker at gcc dot gnu.org ---
(In reply to amker from comment #25)
> I tend to believe this is an register pressure based strength-reduction +
> lim problem than ivopts.
>
> So given class of memory references like:
>
> reg = ...
> Loop:
> MEM[iv_base + reg * 0];
> MEM[iv_base + reg * 1];
> MEM[iv_base + reg * 2];
> MEM[iv_base + reg * 3];
> MEM[iv_base + reg * 4];
> MEM[iv_base + reg * 5];
> MEM[iv_base + reg * 6];
> MEM[iv_base + reg * 7];
>
> The best arrangement probably would be:
>
> reg = ...
> regX = reg * 3;
> Loop:
> MEM[iv_base + reg * 0];
> MEM[iv_base + reg * 1];
> MEM[iv_base + reg * 2];
> t = iv_base + regX;
> MEM[t];
> MEM[iv_base + reg * 4];
> MEM[t + reg * 2];
> MEM[iv_base + regX * 2];
> MEM[t + reg * 4];
>
> Depending on the register pressure, regX should be re-materialized in loop
> or hoisted as invariant.
Of course supported scales in addressing modes should be considered, but I
guess most targets only (if) support [base + reg * 2^x]?
More information about the Gcc-bugs
mailing list