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
798d009e
Commit
798d009e
authored
Jul 31, 2008
by
yb9976
Browse files
Fixed more memory leaks.
[r20868]
parent
70a76105
Changes
2
Hide whitespace changes
Inline
Side-by-side
ir/ana/ircfscc.c
View file @
798d009e
...
@@ -163,6 +163,12 @@ static INLINE void init_stack(void) {
...
@@ -163,6 +163,12 @@ static INLINE void init_stack(void) {
tos
=
0
;
tos
=
0
;
}
}
static
void
finish_stack
(
void
)
{
DEL_ARR_F
(
stack
);
stack
=
NULL
;
}
/**
/**
* Push a node n onto the IR-node stack.
* Push a node n onto the IR-node stack.
*/
*/
...
@@ -296,6 +302,11 @@ static INLINE void init_scc(ir_graph *irg, struct obstack *obst) {
...
@@ -296,6 +302,11 @@ static INLINE void init_scc(ir_graph *irg, struct obstack *obst) {
irg_walk_graph
(
irg
,
init_node
,
NULL
,
obst
);
irg_walk_graph
(
irg
,
init_node
,
NULL
,
obst
);
}
}
static
INLINE
void
finish_scc
(
void
)
{
finish_stack
();
}
#ifdef INTERPROCEDURAL_VIEW
#ifdef INTERPROCEDURAL_VIEW
/**
/**
* Initializes the scc algorithm for the interprocedural case.
* Initializes the scc algorithm for the interprocedural case.
...
@@ -655,6 +666,7 @@ int construct_cf_backedges(ir_graph *irg) {
...
@@ -655,6 +666,7 @@ int construct_cf_backedges(ir_graph *irg) {
if
(
is_Block
(
el
))
if
(
is_Block
(
el
))
cfscc
(
el
);
cfscc
(
el
);
}
}
finish_scc
();
obstack_free
(
&
temp
,
NULL
);
obstack_free
(
&
temp
,
NULL
);
assert
(
head_rem
==
current_loop
);
assert
(
head_rem
==
current_loop
);
...
...
ir/ana/irscc.c
View file @
798d009e
...
@@ -209,6 +209,12 @@ static INLINE void init_stack(void) {
...
@@ -209,6 +209,12 @@ static INLINE void init_stack(void) {
tos
=
0
;
tos
=
0
;
}
}
static
void
finish_stack
(
void
)
{
DEL_ARR_F
(
stack
);
stack
=
NULL
;
}
#if 0
#if 0
/**
/**
* Frees the stack.
* Frees the stack.
...
@@ -350,6 +356,11 @@ static INLINE void init_scc(ir_graph *irg, struct obstack *obst) {
...
@@ -350,6 +356,11 @@ static INLINE void init_scc(ir_graph *irg, struct obstack *obst) {
*/
*/
}
}
static
INLINE
void
finish_scc
(
void
)
{
finish_stack
();
}
#ifdef INTERPROCEDURAL_VIEW
#ifdef INTERPROCEDURAL_VIEW
static
INLINE
void
init_ip_scc
(
struct
obstack
*
obst
)
{
static
INLINE
void
init_ip_scc
(
struct
obstack
*
obst
)
{
init_scc_common
();
init_scc_common
();
...
@@ -931,6 +942,8 @@ int construct_backedges(ir_graph *irg) {
...
@@ -931,6 +942,8 @@ int construct_backedges(ir_graph *irg) {
inc_irg_visited
(
irg
);
inc_irg_visited
(
irg
);
scc
(
get_irg_end
(
irg
));
scc
(
get_irg_end
(
irg
));
finish_scc
();
obstack_free
(
&
temp
,
NULL
);
obstack_free
(
&
temp
,
NULL
);
assert
(
head_rem
==
current_loop
);
assert
(
head_rem
==
current_loop
);
...
...
Write
Preview
Markdown
is supported
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