peephole2: dead regs not marked as dead

Paolo Bonzini bonzini@gnu.org
Fri Oct 29 15:17:00 GMT 2010


On 10/29/2010 05:08 PM, Georg Lay wrote:
> As far as I understand the internals, peephole2 matches due to predicates and
> condition, it does not care for constraints (except for optional match_scratch)

Yes, I was referring as "using constraints in the define_insn".  But 
you're dong that as far as I see.

> Maybe it's better to write it as a split1 that works prior to
> reload instead of split2 that works after reload.

Yes, a split1 sounds much better.  It will give much more freedom to 
reload and the register allocation to do exactly the liveness-based kind 
of optimization that you're doing with a peephole.

> I don't know. match_scratch has the disadvantage that the input
> pattern will become a PARALLEL and is no more a single_set.

I don't understand why you mentioned match_scratch :) anyway note that a 
parallel of SET and CLOBBERs is a single_set.

Paolo



More information about the Gcc mailing list