This is the mail archive of the
mailing list for the GCC project.
Re: A plan for eliminating cc0
- From: Paul Schlie <schlie at comcast dot net>
- To: Alexandre Oliva <aoliva at redhat dot com>
- Cc: Ian Lance Taylor <ian at airs dot com>,<gcc at gcc dot gnu dot org>
- Date: Wed, 27 Apr 2005 00:59:05 -0400
- Subject: Re: A plan for eliminating cc0
> From: Alexandre Oliva <email@example.com>
>> On Mar 28, 2005, Paul Schlie <firstname.lastname@example.org> wrote:
>> More specifically, if GCC enabled set to optionally specify multiple targets
>> for a single rtl source expression, i.e.:
>> (set ((reg:xx %0) (reg CC) ...) (some-expression:xx ...))
> There's always (set (parallel (...)) (some-expression)). We use
> parallels with similar semantics in cumulative function arguments, so
> this wouldn't be entirely new, but I suppose most rtl handlers would
> need a bit of work to fully understand the implications of this.
> Also, the fact that reg CC has a different mode might require some
> further tweaking.
> Given this, we could figure out some way to create lisp-like macros to
> translate input shorthands such as (set_cc (match_operand) (value))
> into the uglier (set (parallel (match_operand) (cc0)) (value)),
> including the possibility of a port introducing multiple
> variants/modes for set_cc, corresponding to different sets of flags
> that various instructions may set.
Understood; any thoughts as how it may be similarly specified which
cc-mode regs may be clobbered, in addition to updated, or left alone?
Which leads me to wonder if it may be worth while potentially accepting
and classifying something like the following as a single-set:
[(set (match_operand %0) (some-expression ...))
(update (ccx) (ccy)) (clobber (ccz))]
- %0 is not bound to (some-expression)
- ccx, ccy are now equivalent to %0
- ccz now has no equivalency (i.e. undefined)
- any other potentially defined cc-mode regs equivalency's are unchanged.
(as possibly a simper and somewhat more familiar and flexible approach?)