FreeBSD/contrib/gcc/c-common.c
/* Merge the nodes of ADD into TO.  This merging process is done so that for
   each variable that already exists in TO, no new node is added; however if
   there is a write access recorded in ADD, and an occurrence on TO is only
   a read access, then the occurrence in TO will be modified to record the
   write.  */
Merge the nodes of ADD into TO.  This merging process is done so that for
each variable that already exists in TO, no new node is added; however if
there is a write access recorded in ADD, and an occurrence on TO is only
a read access, then the occurrence in TO will be modified to record the
write.
Merge the nodes of ADD into TO . This merging process is done so that for each variable that already exists in TO no new node is added ; however if there is a write access recorded in ADD and an occurrence on TO is only a read access then the occurrence in TO will be modified to record the write .
static void
merge_tlist (struct tlist **to, struct tlist *add, int copy)
{
  struct tlist **end = to;
  while (*end)
    end = &(*end)->next;
  while (add)
    {
      int found = 0;
      struct tlist *tmp2;
      struct tlist *next = add->next;
      for (tmp2 = *to; tmp2; tmp2 = tmp2->next)
	if (tmp2->expr == add->expr)
	  {
	    found = 1;
	    if (!tmp2->writer)
	      tmp2->writer = add->writer;
	  }
      if (!found)
	{
	  *end = copy ? add : new_tlist (NULL, add->expr, add->writer);
	  end = &(*end)->next;
	  *end = 0;
	}
      add = next;
    }
}
static void merge_tlist ( struct tlist * * to , struct tlist * add , int copy ) { struct tlist * * end = to ; while ( * end ) end = & ( * end ) -> next ; while ( add ) { int found = 0 ; struct tlist * tmp2 ; struct tlist * next = add -> next ; for ( tmp2 = * to ; tmp2 ; tmp2 = tmp2 -> next ) if ( tmp2 -> expr == add -> expr ) { found = 1 ; if ( ! tmp2 -> writer ) tmp2 -> writer = add -> writer ; } if ( ! found ) { * end = copy ? add : new_tlist ( NULL , add -> expr , add -> writer ) ; end = & ( * end ) -> next ; * end = 0 ; } add = next ; } }
Merge the nodes of ADD into TO.
Merge the nodes of ADD into TO .