This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC, 4.8] Magic matching for flags clobbering and setting


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.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]