[20/23] rtlanal: Add simple_regno_set

Jeff Law law@redhat.com
Wed Nov 25 20:31:07 GMT 2020



On 11/13/20 1:21 AM, Richard Sandiford via Gcc-patches wrote:
> This patch adds a routine for finding a “simple” SET for a register
> definition.  See the comment in the patch for details.
>
> gcc/
> 	* rtl.h (simple_regno_set): Declare.
> 	* rtlanal.c (simple_regno_set): New function.
So I was a bit confused that this is supposed to reject read-write, but
what it's really rejecting is a narrow subset of read-write.  In
particular it rejects things that are potentially RMW via subregs. It
doesn't prevent the destination from appearing as a source operand.  You
might consider clarifying the comment.

OK

jeff



More information about the Gcc-patches mailing list