Redundant Load Elimination in GCSE
Ayal Zaks
ZAKS@il.ibm.com
Tue Jul 29 12:02:00 GMT 2003
In (late) response to: http://gcc.gnu.org/ml/gcc/2003-06/msg00380.html
>> Recent changes that we're working on in gcse.c to improve PRE (see
>> "GCSE/PRE problem" and "Redundant Load Elimination in GCSE")
>> have created redundant register-copy instructions (i.e.: an r211 = r232
>> rtx followed by another r211 = r232 rtx).
>> ...
>> Adding the following ("delete_obviously_dead_insns") at the end of
>> cse.c/delete_trivially_dead_insns() is one way to fix/work around this
>> problem:
>
>Perhaps you can use information available in the copy propagation pass
>to prove that copy operation is noop. I believe I even wrote this once
>(code to discover noops via cselib)
>
>Honza
We've gone back and fixed our code in gcse to prevent such copy pairs
from being generated. The general idea was to identify operations that
define registers which never get used (are killed before any use), and
delete them. I'm not sure how cprop can help do that. Seems like flow.c/
life_analysis is already doing this.
>>Anyway, this note comes to warn about the fragility of
>>loop.c/basic_induction_var().
Anyway2, future analysis of iv's in tree-ssa should be less fragile,
merely due to ssa (http://gcc.gnu.org/ml/gcc/2003-06/msg00179.html).
Ayal.
More information about the Gcc
mailing list