This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: approaches to carry-flag modelling in RTL
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: "Paulo J. Matos" <paulo at matos-sorge dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 31 Oct 2011 22:43:02 -0400 (EDT)
- Subject: Re: approaches to carry-flag modelling in RTL
- References: <CAPOJ94N-6Ek4-s6RJXDLHUCTN3EssVuYnh8xTZaeQR-0_cE3Og@mail.gmail.com> <4EAADF8F.2090002@redhat.com> <CAPOJ94P9ZuK50X7e+5zq7eu_73iJv1hwn+BUB5Ctu8nb9+RH2g@mail.gmail.com> <alpine.BSF.2.00.1110310107210.49224@dair.pair.com> <j8lq9d$e13$2@dough.gmane.org>
On Mon, 31 Oct 2011, Paulo J. Matos wrote:
> On 31/10/11 05:36, Hans-Peter Nilsson wrote:
> > BTW, I
> > don't think it helps that someone decided the canonical form of
> > a parallel that includes a CC-setter must have the CC-setting
> > *first* (contrasting with the position of clobbers)...
>
> How did you reach this conclusion?
Not obvious or maybe I was unclear as to what I alluded?
In the below insn-bodies, "sub" is the insn that sets cc0 as a
side-effect.
Supposed canonical form :
(parallel
[(set cc_reg) (compare ...))
(set destreg) (sub ...))])
and:
(parallel
[(set destreg) (sub ...))
(clobber cc_reg)])
But IMHO it'd be easier (for most values of "easier") to combine
both patterns with that non-existing mechanism (and no, I don't
count match_parallel) if we instead canonicalized on the CC_REG
set being the same as the clobber position:
(parallel
[(set destreg) (sub ...))
(set cc_reg) (compare ...))])
with:
(parallel
[(set destreg) (sub ...))
(clobber cc_reg)])
brgds, H-P