This is the mail archive of the gcc@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]

Use of single_set() in loop_regs_update()



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



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