This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Peepholes obsolete / new peepholes
- To: "'law at cygnus dot com'" <law at cygnus dot com>, gcc <gcc at gcc dot gnu dot org>
- Subject: RE: Peepholes obsolete / new peepholes
- From: Kazu Hirata <kazu at hxi dot com>
- Date: Tue, 15 Aug 2000 14:17:00 -0400
Hi,
> If that's the case, then the way we should deal with it is
> ADDRESS_COST
> rather than an arbitrary choice that doesn't allow any target to DTRT.
OK. What if ADDRESS_COST is not defined? Can I simply try
pre-increment/decrement or do something fancy (rtx_cost, etc) as in cse.c?
> I think Richard pointed out a potential problem with the
> current patch, but
> I believe that can be fixed by refining the patch to work when the
> candidate register dies, but is not set by the current insn.
I am thinking about using "! reg_set_p ()" for that. Would that work?
By the way, I am now trying the attached patch. It's working in
h8300-hms-gcc. When I tried the following sample code with arm-coff-gcc, it
hit abort () in haifa-sched.c:7060, causing an internal compiler error. Any
clue? Looking at the dump after the life analysis phase, things look OK.
void
push_qi (char* p, char n)
{
*--p = n;
}
Thanks,
Kazu Hirata
flow.c.patch