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
001d1f92
Commit
001d1f92
authored
Apr 15, 2010
by
Matthias Braun
Browse files
avoid excessive use of alloca -- it doesn't work on cygwin
[r27407]
parent
60aee65e
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/bespillslots.c
View file @
001d1f92
...
...
@@ -348,16 +348,19 @@ static void do_greedy_coalescing(be_fec_env_t *env)
int
affinity_edge_count
;
bitset_t
**
interferences
;
int
*
spillslot_unionfind
;
struct
obstack
data
;
spillcount
=
set_count
(
env
->
spills
);
if
(
spillcount
==
0
)
return
;
obstack_init
(
&
data
);
DB
((
dbg
,
DBG_COALESCING
,
"Coalescing %d spillslots
\n
"
,
spillcount
));
interferences
=
ALLOC
A
N
(
bitset_t
*
,
spillcount
);
spillslot_unionfind
=
ALLOC
A
N
(
int
,
spillcount
);
spilllist
=
ALLOC
A
N
(
spill_t
*
,
spillcount
);
interferences
=
O
ALLOCN
(
&
data
,
bitset_t
*
,
spillcount
);
spillslot_unionfind
=
O
ALLOCN
(
&
data
,
int
,
spillcount
);
spilllist
=
O
ALLOCN
(
&
data
,
spill_t
*
,
spillcount
);
uf_init
(
spillslot_unionfind
,
spillcount
);
...
...
@@ -372,7 +375,7 @@ static void do_greedy_coalescing(be_fec_env_t *env)
}
for
(
i
=
0
;
i
<
spillcount
;
++
i
)
{
interferences
[
i
]
=
bitset_
alloca
(
spillcount
);
interferences
[
i
]
=
bitset_
obstack_alloc
(
&
data
,
spillcount
);
}
/* construct interferences */
...
...
@@ -462,6 +465,7 @@ static void do_greedy_coalescing(be_fec_env_t *env)
}
/*dump_interference_graph(env, interferences, "after");*/
obstack_free
(
&
data
,
0
);
}
...
...
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