* sched-int.h (sd_iterator_cond): Manually tail recurse.

From-SVN: r210895
This commit is contained in:
Jan Hubicka 2014-05-24 19:11:35 +02:00 committed by Jan Hubicka
parent 06e3da3474
commit e0e349f3f2
2 changed files with 30 additions and 23 deletions

View File

@ -1,3 +1,7 @@
2014-05-23 Jan Hubicka <hubicka@ucw.cz>
* sched-int.h (sd_iterator_cond): Manually tail recurse.
2014-05-23 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/440.md (ppc440-integer): Include shift without

View File

@ -1550,34 +1550,37 @@ sd_iterator_start (rtx insn, sd_list_types_def types)
static inline bool
sd_iterator_cond (sd_iterator_def *it_ptr, dep_t *dep_ptr)
{
dep_link_t link = *it_ptr->linkp;
if (link != NULL)
while (true)
{
*dep_ptr = DEP_LINK_DEP (link);
return true;
}
else
{
sd_list_types_def types = it_ptr->types;
dep_link_t link = *it_ptr->linkp;
if (types != SD_LIST_NONE)
/* Switch to next list. */
if (link != NULL)
{
deps_list_t list;
sd_next_list (it_ptr->insn,
&it_ptr->types, &list, &it_ptr->resolved_p);
it_ptr->linkp = &DEPS_LIST_FIRST (list);
if (list)
return sd_iterator_cond (it_ptr, dep_ptr);
*dep_ptr = DEP_LINK_DEP (link);
return true;
}
else
{
sd_list_types_def types = it_ptr->types;
*dep_ptr = NULL;
return false;
}
if (types != SD_LIST_NONE)
/* Switch to next list. */
{
deps_list_t list;
sd_next_list (it_ptr->insn,
&it_ptr->types, &list, &it_ptr->resolved_p);
it_ptr->linkp = &DEPS_LIST_FIRST (list);
if (list)
continue;
}
*dep_ptr = NULL;
return false;
}
}
}
/* Advance iterator. */