Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
8ab3e0e3
Commit
8ab3e0e3
authored
May 01, 2016
by
Christoph Mallon
Browse files
cleanup: Remove unnecessary calls to alter an entity right after creating it.
parent
27be0d38
Changes
5
Hide whitespace changes
Inline
Side-by-side
ir/be/ia32/ia32_transform.c
View file @
8ab3e0e3
...
...
@@ -324,7 +324,6 @@ static ir_entity *create_float_const_entity(ir_tarval *tv, ident *name)
res
=
new_global_entity
(
get_glob_type
(),
name
,
tp
,
ir_visibility_private
,
IR_LINKAGE_CONSTANT
|
IR_LINKAGE_NO_IDENTITY
);
set_entity_ld_ident
(
res
,
get_entity_ident
(
res
));
ir_initializer_t
*
const
initializer
=
create_initializer_tarval
(
tv
);
set_entity_initializer
(
res
,
initializer
);
...
...
@@ -579,8 +578,6 @@ ir_entity *ia32_gen_fp_known_const(ia32_known_const_t const kct)
ir_visibility_private
,
IR_LINKAGE_CONSTANT
|
IR_LINKAGE_NO_IDENTITY
);
set_entity_ld_ident
(
ent
,
name
);
ir_initializer_t
*
initializer
=
create_initializer_compound
(
2
);
set_initializer_compound_value
(
initializer
,
0
,
create_initializer_tarval
(
get_mode_null
(
mode
)));
...
...
@@ -3289,10 +3286,6 @@ static ir_entity *ia32_create_const_array(ir_node *c0, ir_node *c1,
ir_visibility_private
,
IR_LINKAGE_CONSTANT
|
IR_LINKAGE_NO_IDENTITY
);
set_entity_ld_ident
(
ent
,
get_entity_ident
(
ent
));
set_entity_visibility
(
ent
,
ir_visibility_private
);
add_entity_linkage
(
ent
,
IR_LINKAGE_CONSTANT
|
IR_LINKAGE_NO_IDENTITY
);
ir_initializer_t
*
initializer
=
create_initializer_compound
(
2
);
set_initializer_compound_value
(
initializer
,
0
,
create_initializer_tarval
(
tv0
));
...
...
ir/ir/irnode.c
View file @
8ab3e0e3
...
...
@@ -400,7 +400,6 @@ ir_entity *create_Block_entity(ir_node *block)
if
(
entity
==
NULL
)
{
ir_label_t
nr
=
get_irp_next_label_nr
();
entity
=
new_label_entity
(
nr
);
set_entity_visibility
(
entity
,
ir_visibility_private
);
set_entity_linkage
(
entity
,
IR_LINKAGE_CONSTANT
);
block
->
attr
.
block
.
entity
=
entity
;
...
...
ir/ir/irprofile.c
View file @
8ab3e0e3
...
...
@@ -162,10 +162,7 @@ static ir_entity *get_init_firmprof_ref(void)
set_method_param_type
(
init_type
,
1
,
uintptr
);
set_method_param_type
(
init_type
,
2
,
uint
);
ir_entity
*
const
result
=
new_entity
(
get_glob_type
(),
init_name
,
init_type
);
set_entity_visibility
(
result
,
ir_visibility_external
);
return
result
;
return
new_entity
(
get_glob_type
(),
init_name
,
init_type
);
}
/**
...
...
@@ -182,7 +179,6 @@ static ir_graph *gen_initializer_irg(ir_entity *ent_filename, ir_entity *bblock_
ident
*
const
name
=
new_id_from_str
(
"__firmprof_initializer"
);
ir_entity
*
const
ent
=
new_entity
(
get_glob_type
(),
name
,
new_type_method
(
0
,
0
));
set_entity_visibility
(
ent
,
ir_visibility_local
);
set_entity_ld_ident
(
ent
,
name
);
ir_graph
*
const
irg
=
new_ir_graph
(
ent
,
0
);
ir_type
*
const
empty_frame_type
=
get_irg_frame_type
(
irg
);
...
...
ir/opt/ircomplib.c
View file @
8ab3e0e3
...
...
@@ -49,7 +49,5 @@ ir_entity *create_compilerlib_entity(ident *id, ir_type *mt)
/* Create a new one */
ir_type
*
glob
=
get_glob_type
();
entity
=
new_entity
(
glob
,
ld_name
,
mt
);
set_entity_ld_ident
(
entity
,
ld_name
);
set_entity_visibility
(
entity
,
ir_visibility_external
);
return
entity
;
}
ir/tr/entity.c
View file @
8ab3e0e3
...
...
@@ -914,8 +914,6 @@ void ir_init_entity(ir_prog *irp)
ident
*
const
id
=
new_id_from_str
(
UNKNOWN_ENTITY_NAME
);
ir_type
*
const
utype
=
get_unknown_type
();
irp
->
unknown_entity
=
intern_new_entity
(
irp
->
dummy_owner
,
IR_ENTITY_UNKNOWN
,
id
,
utype
,
ir_visibility_private
);
set_entity_visibility
(
irp
->
unknown_entity
,
ir_visibility_external
);
set_entity_ld_ident
(
irp
->
unknown_entity
,
id
);
id
,
utype
,
ir_visibility_external
);
hook_new_entity
(
irp
->
unknown_entity
);
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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