https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66790

--- Comment #30 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> GEN and KILL are not the same for LR and MIR.
> 
> 1) Sets and clobbers are handled differently.  A set or clobber of r1
> _kills_ liveness, while for MIR sets _generate_ "initialized-ness" and only
> clobbers kill it.
> 
> 2) A use of r1 _creates_ liveness (which extends up, until it reaches the
> sets for all reaching definitions of that use), while uses of r1 are
> irrelevant for MIR.
> 
> 3) For LR, GEN must override KILL if an insn has both a set and a use of r1.
> For MIR, you cannot have a GEN (set) and a KILL (clobber) in the same insn.

The issue is not LR vs MIR, it's the may-initialized part of LIVE vs MIR.

It seem to me that the GEN and KILL of the may-initialized part of LIVE should
be the same as those of MIR, since the difference between the 2 problems is
only at the global level.  Pierre-Marie's patch duplicates them, but ideally
they should be factored and reused.

Reply via email to