This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Use of single_set() in loop_regs_update()
- To: <gcc at gcc dot gnu dot org>
- Subject: Use of single_set() in loop_regs_update()
- From: Richard Sandiford <rsandifo at redhat dot com>
- Date: Wed, 14 Mar 2001 18:17:05 +0000 (GMT)
I'm having trouble understanding the interface between loop.c and alias.c.
loop_regs_update() is defined:
static void
loop_regs_update (loop, seq)
const struct loop *loop ATTRIBUTE_UNUSED;
rtx seq;
{
/* Update register info for alias analysis. */
if (GET_CODE (seq) == SEQUENCE)
{
[...snip...]
}
else
{
rtx set = single_set (seq);
if (set && GET_CODE (SET_DEST (set)) == REG)
record_base_value (REGNO (SET_DEST (set)), SET_SRC (set), 0);
}
}
and gets passed a SEQUENCE or SET rtx. But single_set() is defined as:
#define single_set(I) (INSN_P (I) \
? (GET_CODE (PATTERN (I)) == SET \
? PATTERN (I) : single_set_1 (I)) \
: NULL_RTX)
i.e. it returns null unless given an insn. I can't seem to trigger
the call to record_base_value().
Richard