* @date 18.11.2005
* @version $Id$
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
#include <stdlib.h>
#include "irgwalk.h"
#include "irbitset.h"
-#include "bearch_t.h"
+#include "bearch.h"
#include "be_t.h"
#include "beintlive_t.h"
#include "beifg_t.h"
+#include "beifg_impl.h"
#include "bechordal_t.h"
typedef struct _cli_head_t {
if (ifg->cli_root == NULL)
{
- new_cli_head = obstack_alloc(&ifg->obst, sizeof(*new_cli_head));
+ new_cli_head = OALLOC(&ifg->obst, cli_head_t);
INIT_LIST_HEAD(&new_cli_head->list);
ifg->cli_root = new_cli_head;
}
else
{
cli_head = ifg->cli_root;
- while(!(cli_head->next_cli_head == NULL))
+ while (!(cli_head->next_cli_head == NULL))
{
cli_head = cli_head->next_cli_head;
}
- new_cli_head = obstack_alloc(&ifg->obst, sizeof(*new_cli_head));
+ new_cli_head = OALLOC(&ifg->obst, cli_head_t);
INIT_LIST_HEAD(&new_cli_head->list);
cli_head->next_cli_head = new_cli_head;
}
{
cli_element_t *cli_element;
- cli_element = obstack_alloc(&ifg->obst, sizeof(*cli_element));
+ cli_element = OALLOC(&ifg->obst, cli_element_t);
INIT_LIST_HEAD(&cli_element->list);
return cli_element;
}
list_for_each_entry(cli_element_t, element, &cli_head->list, list){
- if(element->irn == live_irn){
+ if (element->irn == live_irn){
is_element = 1;
break;
}
cli_element_t *element;
int is_dominated_by_max;
- //int dominates_min;
if (it->curr_cli_head == NULL || it->curr_cli_head->next_cli_head == NULL) /* way back of recursion or this is the last clique */
{
head = it->curr_cli_head->next_cli_head;
is_dominated_by_max = value_dominates(head->max, irn);
- //dominates_min = value_dominates(irn, head->min);
if ((is_dominated_by_max) || (irn == head->max)) /* node could be in clique */
{
if (b->is_def) /* b is a new node */
{
ir_nodeset_insert(&live, irn);
- if(b->is_real)
+ if (b->is_real)
{
was_def = 1;
}
bitset_t *bitset_visneighbours = bitset_malloc(get_irg_last_idx(ifg->env->irg));
int is_dominated_by_max = 0;
- int dominates_min = 0;
int is_in_clique = 0;
it->curr_cli_head = cli_head;
assert(cli_head && "There is no root entry for a cli_head.");
is_dominated_by_max = value_dominates(cli_head->max, irn);
- dominates_min = value_dominates(irn, cli_head->min);
if ((is_dominated_by_max) || (irn == cli_head->max)) /* node could be in clique */
{
}
}
}
- if(!is_in_clique)
+ if (!is_in_clique)
{
cli_head = get_next_cli_head(irn, it);
element = get_next_element(irn, it);
be_ifg_t *be_ifg_clique_new(const be_chordal_env_t *env)
{
- ifg_clique_t *ifg = xmalloc(sizeof(*ifg));
+ ifg_clique_t *ifg = XMALLOC(ifg_clique_t);
ifg->impl = &ifg_clique_impl;
ifg->env = env;