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
57c32f8c
Commit
57c32f8c
authored
Dec 01, 2012
by
Christoph Mallon
Browse files
array: Use DUP_ARR_D().
parent
1209ae49
Changes
2
Hide whitespace changes
Inline
Side-by-side
ir/ana/domfront.c
View file @
57c32f8c
...
...
@@ -59,8 +59,6 @@ static ir_node **compute_df(ir_node *blk, ir_dom_front_info_t *info)
{
ir_node
*
c
;
ir_node
**
df_list
=
NEW_ARR_F
(
ir_node
*
,
0
);
ir_node
**
df
;
size_t
len
;
/* Add local dominance frontiers */
foreach_block_succ
(
blk
,
edge
)
{
...
...
@@ -88,9 +86,7 @@ static ir_node **compute_df(ir_node *blk, ir_dom_front_info_t *info)
}
/* now copy the flexible array to the obstack */
len
=
ARR_LEN
(
df_list
);
df
=
NEW_ARR_D
(
ir_node
*
,
&
info
->
obst
,
len
);
memcpy
(
df
,
df_list
,
len
*
sizeof
(
df
[
0
]));
ir_node
**
const
df
=
DUP_ARR_D
(
ir_node
*
,
&
info
->
obst
,
df_list
);
DEL_ARR_F
(
df_list
);
pmap_insert
(
info
->
df_map
,
blk
,
df
);
...
...
ir/ir/ircons.c
View file @
57c32f8c
...
...
@@ -311,7 +311,6 @@ void mature_immBlock(ir_node *block)
size_t
n_preds
;
ir_node
*
next
;
ir_node
*
phi
;
ir_node
**
new_in
;
ir_graph
*
irg
;
assert
(
is_Block
(
block
));
...
...
@@ -340,8 +339,7 @@ void mature_immBlock(ir_node *block)
/* create final in-array for the block */
if
(
block
->
attr
.
block
.
dynamic_ins
)
{
new_in
=
NEW_ARR_D
(
ir_node
*
,
get_irg_obstack
(
irg
),
n_preds
+
1
);
memcpy
(
new_in
,
block
->
in
,
(
n_preds
+
1
)
*
sizeof
(
new_in
[
0
]));
ir_node
**
const
new_in
=
DUP_ARR_D
(
ir_node
*
,
get_irg_obstack
(
irg
),
block
->
in
);
DEL_ARR_F
(
block
->
in
);
block
->
in
=
new_in
;
block
->
attr
.
block
.
dynamic_ins
=
false
;
...
...
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