This is the mail archive of the
mailing list for the GCC project.
Re: [RFC, 4.8] Magic matching for flags clobbering and setting
- From: Richard Henderson <rth at redhat dot com>
- To: Hans-Peter Nilsson <hp at bitrange dot com>
- Cc: Uros Bizjak <ubizjak at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 23 Feb 2012 08:12:17 -0800
- Subject: Re: [RFC, 4.8] Magic matching for flags clobbering and setting
- References: <4F35B27A.firstname.lastname@example.org> <alpine.BSF.email@example.com>
On 02/22/12 17:16, Hans-Peter Nilsson wrote:
>> What I know is missing off the top of my head are:
>> (2) Can't be usefully used with define_insn_and_split, and no way to tell.
>> This problem should simply be documented in the .texi file as user error.
> Not sure I see the problem or the impact of the absence. Would
> it help if there was a way to match_dup the clobber/set? Maybe
> as a match_op_flags, the same as match_flags but with the first
> argument being an assigning operand number. You probably
> wouldn't want to use this very often.)
Yes, one could probably have some use of it with a split, if the
match_flags is assigned an operand number. You'd have to be
very careful about preserving the contents of the compare if you
adjust the other instruction data at all...
I've also thought of using the operand number as a quick way to
test whether the flags are actually live. I.e.
if (GET_CODE (operands[n]) == CLOBBER)
within the split or the C output template.