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

RE: Peepholes obsolete / new peepholes


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


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