This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Unrolling addressing optimization


Hello,

> CSE then optimizes this into the same code you describe below:

> while (...)
> {
>   i1 = i0 + 1
>   load a[i0 + 1]
>   ....
>   i2 = i0 + 2
>   load a[i0 + 2]
>   ....
>   i3 = i0 + 3
>   load a[i0 + 3]
>   ....
>   i0 = i0 + k
>   load a[i0 + k]
>}


It is not what our optimization does. In some architectures 
(like PowerPC), load a[i0 + k] requires two assembly instructions, 
so the above transformation is not useful. 
This is probably the reason for which such cse is not done on PowerPC.

Revital


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]