projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Correct a subtle bug in the ia32 backend: Sub(x, x) triggered that the Neg+Add trick...
[libfirm]
/
ir
/
be
/
beifg_clique.c
diff --git
a/ir/be/beifg_clique.c
b/ir/be/beifg_clique.c
index
1a82faf
..
1976273
100644
(file)
--- a/
ir/be/beifg_clique.c
+++ b/
ir/be/beifg_clique.c
@@
-24,9
+24,7
@@
* @date 18.11.2005
* @version $Id$
*/
* @date 18.11.2005
* @version $Id$
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
#include "config.h"
-#endif
#include <stdlib.h>
#include <stdlib.h>
@@
-38,7
+36,7
@@
#include "irgwalk.h"
#include "irbitset.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 "be_t.h"
#include "beintlive_t.h"
#include "beifg_t.h"
@@
-81,18
+79,18
@@
static cli_head_t *get_new_cli_head(ifg_clique_t *ifg)
if (ifg->cli_root == NULL)
{
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;
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;
}
{
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;
}
INIT_LIST_HEAD(&new_cli_head->list);
cli_head->next_cli_head = new_cli_head;
}
@@
-109,7
+107,7
@@
static cli_element_t *get_new_cli_element(ifg_clique_t *ifg)
{
cli_element_t *cli_element;
{
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;
INIT_LIST_HEAD(&cli_element->list);
return cli_element;
@@
-152,7
+150,7
@@
static void write_clique(ir_nodeset_t *live_set, ifg_clique_t *ifg)
}
list_for_each_entry(cli_element_t, element, &cli_head->list, list){
}
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;
}
is_element = 1;
break;
}
@@
-340,7
+338,7
@@
static void find_neighbour_walker(ir_node *bl, void *data)
if (b->is_def) /* b is a new node */
{
ir_nodeset_insert(&live, irn);
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;
}
{
was_def = 1;
}
@@
-391,7
+389,7
@@
static void find_first_neighbour(const ifg_clique_t *ifg, cli_iter_t *it, const
}
}
}
}
}
}
- if(!is_in_clique)
+ if
(!is_in_clique)
{
cli_head = get_next_cli_head(irn, it);
element = get_next_element(irn, it);
{
cli_head = get_next_cli_head(irn, it);
element = get_next_element(irn, it);
@@
-539,7
+537,7
@@
static const be_ifg_impl_t ifg_clique_impl = {
be_ifg_t *be_ifg_clique_new(const be_chordal_env_t *env)
{
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;
ifg->impl = &ifg_clique_impl;
ifg->env = env;