This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Compare-elim pass (was: Re: [PATCH] Fix PR 61225)
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Hans-Peter Nilsson <hp at bitrange dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, Uros Bizjak <ubizjak at gmail dot com>, Eric Botcazou <ebotcazou at adacore dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Jeff Law <law at redhat dot com>, Steven Bosscher <stevenb dot gcc at gmail dot com>, Zhenqiang Chen <zhenqiang dot chen at linaro dot org>, Richard Henderson <rth at redhat dot com>
- Date: Sun, 18 Jan 2015 17:28:39 -0600
- Subject: Re: Compare-elim pass (was: Re: [PATCH] Fix PR 61225)
- Authentication-results: sourceware.org; auth=none
- References: <CAFULd4YmXQncYbPa+6-zjNqCEdRam8Lc5S3GB5YNbksPeonvXg at mail dot gmail dot com> <3249058 dot ZmxRDWLt50 at polaris> <CAFULd4ahL-EfNiqOXJOEHuO0RwLf=5HGR2GySuU6hQ3sqPbZ9g at mail dot gmail dot com> <20141206083843 dot GT1923 at tucnak dot redhat dot com> <alpine dot BSF dot 2 dot 02 dot 1501171252430 dot 98090 at arjuna dot pair dot com>
On Sat, Jan 17, 2015 at 01:18:44PM -0500, Hans-Peter Nilsson wrote:
> The current cc-first order happened more of an accidental
> opinion than an architectural decision as I vaguely recall, when
> asking. We also have the canonical location of a *cc clobber*,
> i.e. last in a parallel. For that reason, it then makes sense
> to have the *cc-setting* last. Changing rebelling ports doesn't
> solve that inconsistency.
Except you also have the variant of the insn pattern where the CC is
set and the GPR is clobbered (on PowerPC we have one of those for
every insn, and only a few where CC is clobbered).
> So, my vote for canonically declaring the order non-canonical
> *and* automatically generating/matching both orders.
It would be nice to only have to write the set+set version, and do
some markup to say which of the clobber variants should be generated,
yes.
Having the order canonical is nice for whatever has to match it.
There are a lot more places that have to match it than places that
have to generate it. We could of course change gen* so you can
write patterns in any order you please in your machine description
files.
Segher