Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
0caf8d86
Commit
0caf8d86
authored
Dec 16, 2012
by
Christoph Mallon
Browse files
becopyilp: Use a ir_nodeset instead of a pset for all_removed.
parent
90e7800f
Changes
2
Hide whitespace changes
Inline
Side-by-side
ir/be/becopyilp.c
View file @
0caf8d86
...
...
@@ -86,7 +86,7 @@ static size_red_t *new_size_red(copy_opt_t *co)
size_red_t
*
res
=
XMALLOC
(
size_red_t
);
res
->
co
=
co
;
res
->
all_removed
=
pset_new_ptr_default
(
);
ir_nodeset_init
(
&
res
->
all_removed
);
res
->
col_suff
=
NULL
;
obstack_init
(
&
res
->
ob
);
...
...
@@ -150,7 +150,7 @@ static void sr_remove(size_red_t *const sr)
cs
->
next
=
sr
->
col_suff
;
sr
->
col_suff
=
cs
;
p
set_insert
_ptr
(
sr
->
all_removed
,
irn
);
ir_node
set_insert
(
&
sr
->
all_removed
,
irn
);
redo
=
true
;
}
...
...
@@ -211,7 +211,7 @@ static void sr_reinsert(size_red_t *const sr)
assert
(
free_col
<
n_regs
);
}
set_irn_col
(
sr
->
co
->
cls
,
irn
,
free_col
);
p
set_remove
_ptr
(
sr
->
all_removed
,
irn
);
/* irn is back in graph again */
ir_node
set_remove
(
&
sr
->
all_removed
,
irn
);
/* irn is back in graph again */
}
}
...
...
@@ -220,8 +220,8 @@ static void sr_reinsert(size_red_t *const sr)
*/
static
void
free_size_red
(
size_red_t
*
const
sr
)
{
del_pset
(
sr
->
all_removed
);
obstack_free
(
&
sr
->
ob
,
NULL
);
ir_nodeset_destroy
(
&
sr
->
all_removed
);
free
(
sr
);
}
...
...
ir/be/becopyilp_t.h
View file @
0caf8d86
...
...
@@ -13,7 +13,6 @@
#define FIRM_BE_BECOPYILP_T_H
#include
"firm_types.h"
#include
"pset.h"
#include
"becopyopt_t.h"
/******************************************************************************
...
...
@@ -35,7 +34,7 @@ struct coloring_suffix_t {
typedef
struct
size_red_t
{
copy_opt_t
*
co
;
pset
*
all_removed
;
/**< All nodes removed during problem size reduction */
ir_nodeset_t
all_removed
;
/**< All nodes removed during problem size reduction */
coloring_suffix_t
*
col_suff
;
/**< Coloring suffix. Reverse would be a PEO prefix */
struct
obstack
ob
;
}
size_red_t
;
...
...
@@ -43,7 +42,10 @@ typedef struct size_red_t {
/**
* Checks if a node has already been removed
*/
#define sr_is_removed(sr, irn) pset_find_ptr((sr)->all_removed, irn)
static
inline
bool
sr_is_removed
(
size_red_t
const
*
const
sr
,
ir_node
const
*
const
irn
)
{
return
ir_nodeset_contains
(
&
sr
->
all_removed
,
irn
);
}
/**
* TODO: This search is necessary because during the construction of the
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment