This is the mail archive of the gcc-bugs@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]

[Bug rtl-optimization/17482] GCSE after reload replacing changing instructions


------- Additional Comments From dje at gcc dot gnu dot org  2004-09-15 01:18 -------
The commandline options are -O3 -funroll-loops.  One can look at the numerous
gfortran failures for AIX on the gcc-testresults mailinglist to see all of the
examples that fails in this way.

The problem is not whether the analysis recognizes the PRE_INC as modifying a
register.  The current code already does that.  I tried your patch, after fixing
the typos, and it does not solve the failure.

I can see reg_avail_info[29], for example, being set correctly without your
changes.  oprs_changed_p() recursively walks into the INSN and sees the change
to r29.  The problem is that the information is deleted by
reset_oprs_set_table() before beginning the
eliminate_partially_redundant_loads() phase.

The original code, and the version in gcse.c, allocates reg_set_bitmap and
reg_avail_info, with the latter containing last_bb, first_set, and last_set. 
reg_avail_info is persistent in all of the gcse phases.  reset_oprs_set_table()
only clear reg_set_bitmap in gcse.c, unlike postreload-gcse.c that clears
reg_avail_info.  Your restructuring and simplification cannot work safely.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17482


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