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
d5d91740
Commit
d5d91740
authored
Jun 06, 2014
by
Christoph Mallon
Committed by
Christoph Mallon
Sep 25, 2014
Browse files
arm: Simplify appending to a single-linked list.
parent
0eaf4a4f
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/arm/arm_emitter.c
View file @
d5d91740
...
...
@@ -60,7 +60,7 @@ DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL;)
static
struct
obstack
obst
;
static
pmap
*
ent_or_tv
;
static
ent_or_tv_t
*
ent_or_tv_first
;
static
ent_or_tv_t
*
ent_or_tv_
last
;
static
ent_or_tv_t
*
*
ent_or_tv_
anchor
;
static
void
arm_emit_register
(
const
arch_register_t
*
reg
)
{
...
...
@@ -390,12 +390,8 @@ static ent_or_tv_t *get_ent_or_tv_entry(const ent_or_tv_t *key)
*
entry
=
*
key
;
entry
->
label
=
get_unique_label
();
entry
->
next
=
NULL
;
if
(
ent_or_tv_last
!=
NULL
)
{
ent_or_tv_last
->
next
=
entry
;
}
else
{
ent_or_tv_first
=
entry
;
}
ent_or_tv_last
=
entry
;
*
ent_or_tv_anchor
=
entry
;
ent_or_tv_anchor
=
&
entry
->
next
;
pmap_insert
(
ent_or_tv
,
key
->
u
.
generic
,
entry
);
}
return
entry
;
...
...
@@ -787,8 +783,8 @@ void arm_emit_function(ir_graph *irg)
ent_or_tv
=
pmap_create
();
obstack_init
(
&
obst
);
ent_or_tv_first
=
NULL
;
ent_or_tv_
last
=
NULL
;
ent_or_tv_first
=
NULL
;
ent_or_tv_
anchor
=
&
ent_or_tv_first
;
arm_register_emitters
();
...
...
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