PRE (sometimes) confuses ivopts/scev?
Richard Guenther
rguenth@tat.physik.uni-tuebingen.de
Mon Jan 24 16:59:00 GMT 2005
Daniel Berlin wrote:
>
>
> On Mon, 24 Jan 2005, Daniel Berlin wrote:
>
>>
>>
>> On Mon, 24 Jan 2005, Richard Guenther wrote:
>>
>>> Hi!
>>>
>>> Are there known bad interaction PRs wrt PRE and loop optimizations?
>>> I found only PR18848 for PRE problems. Sometimes a lot better code
>>> is created with -fno-tree-pre -- SCEV seems to be confused
>>> and produces (for only extra IVs?) scev_not_known with PRE, but not
>>> without, i.e. some uses are not detected?
>>
>>
>> Yes
>> This is the wraparound variable problem.
>> I have fixes for PRE to stop it from creating induction variables.
>> Sebastian has improvements to SCEV that let it handle the type of
>> induction variables PRE was creating (wraparound variables).
>>
>> Both patches are queued for 4.1
>>
>
> Just as a followup, sebastian's patch is at (the actual patch is ta the
> end of the message. You sahouldn't need the other two parts he's pasted
> in front of it anymore, i believe)
> http://gcc.gnu.org/ml/gcc-patches/2004-11/msg02444.html
This patch applied, but didn't help, I'll try to get more details and
hopefully a reduced testcase.
> it should be applied because it helps us detect more simple evolutions
> properly.
> " during a bootstrap
> there are about 7000 cases that are in fact just simple affine
> evolution functions, but that are mishandled for the moment because
> the scalar evolution analyzer was not enough smart to transform them."
>
> In addition, the patch to teach PRE to stop creating *more* wraparounds
> is also in the mail archives, see
> http://gcc.gnu.org/ml/gcc-patches/2004-11/msg02222.html
This patch doesn't apply any more.
Richard.
> If this problem is causing some performance regression or something with
> regards to 3.x, please file a bug and i'll commit the PRE fix for 4.0.
> --Dan
>
More information about the Gcc
mailing list