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
0f37c776
Commit
0f37c776
authored
Jun 22, 2007
by
Michael Beck
Browse files
add the backend_marked flag
[r14726]
parent
2baf503a
Changes
3
Hide whitespace changes
Inline
Side-by-side
include/libfirm/typerep.h
View file @
0f37c776
...
...
@@ -374,6 +374,12 @@ int is_entity_compiler_generated(const ir_entity *ent);
/** Sets/resets the compiler generated flag. */
void
set_entity_compiler_generated
(
ir_entity
*
ent
,
int
flag
);
/** Checks if an entity is marked by the backend. */
int
is_entity_backend_marked
(
const
ir_entity
*
ent
);
/** Sets/resets the backend marker flag. */
void
set_entity_backend_marked
(
ir_entity
*
ent
,
int
flag
);
/**
* The state of the address_taken flag.
*/
...
...
ir/tr/entity.c
View file @
0f37c776
...
...
@@ -119,6 +119,7 @@ new_rd_entity(dbg_info *db, ir_type *owner, ident *name, ir_type *type)
res
->
address_taken
=
ir_address_taken_unknown
;
res
->
final
=
0
;
res
->
compiler_gen
=
0
;
res
->
backend_marked
=
0
;
res
->
offset
=
-
1
;
res
->
offset_bit_remainder
=
0
;
res
->
link
=
NULL
;
...
...
@@ -493,6 +494,16 @@ void (set_entity_compiler_generated)(ir_entity *ent, int flag) {
_set_entity_compiler_generated
(
ent
,
flag
);
}
/* set_entity_compiler_generated */
/* Checks if an entity is marked by the backend */
int
(
is_entity_backend_marked
)(
const
ir_entity
*
ent
)
{
return
_is_entity_backend_marked
(
ent
);
}
/* is_entity_backend_marked */
/* Sets/resets the compiler generated flag */
void
(
set_entity_backend_marked
)(
ir_entity
*
ent
,
int
flag
)
{
_set_entity_backend_marked
(
ent
,
flag
);
}
/* set_entity_backend_marked */
/* Checks if the address of an entity was taken. */
ir_address_taken_state
(
get_entity_address_taken
)(
const
ir_entity
*
ent
)
{
return
_get_entity_address_taken
(
ent
);
...
...
ir/tr/entity_t.h
View file @
0f37c776
...
...
@@ -110,6 +110,7 @@ struct ir_entity {
ir_address_taken_state
address_taken
:
3
;
/**< A flag that can be set to mark address taken entities. */
unsigned
final
:
1
;
/**< If set, this entity cannot be overridden. */
unsigned
compiler_gen
:
1
;
/**< If set, this entity was compiler generated. */
unsigned
backend_marked
:
1
;
/**< If set, this entity was marked by the backend for emission. */
int
offset
;
/**< Offset in bytes for this entity. Fixed when layout
of owner is determined. */
unsigned
char
offset_bit_remainder
;
...
...
@@ -304,6 +305,18 @@ _set_entity_compiler_generated(ir_entity *ent, int flag) {
ent
->
compiler_gen
=
flag
?
1
:
0
;
}
static
INLINE
int
_is_entity_backend_marked
(
const
ir_entity
*
ent
)
{
assert
(
ent
&&
ent
->
kind
==
k_entity
);
return
ent
->
backend_marked
;
}
static
INLINE
void
_set_entity_backend_marked
(
ir_entity
*
ent
,
int
flag
)
{
assert
(
ent
&&
ent
->
kind
==
k_entity
);
ent
->
backend_marked
=
flag
?
1
:
0
;
}
static
INLINE
ir_address_taken_state
_get_entity_address_taken
(
const
ir_entity
*
ent
)
{
assert
(
ent
&&
ent
->
kind
==
k_entity
);
...
...
@@ -423,6 +436,8 @@ _get_entity_repr_class(const ir_entity *ent) {
#define set_entity_final(ent, final) _set_entity_final(ent, final)
#define is_entity_compiler_generated(ent) _is_entity_compiler_generated(ent)
#define set_entity_compiler_generated(ent, flag) _set_entity_compiler_generated(ent, flag)
#define is_entity_backend_marked(ent) _is_entity_backend_marked(ent)
#define set_entity_backend_marked(ent, flag) _set_entity_backend_marked(ent, flag)
#define get_entity_address_taken(ent) _get_entity_address_taken(ent)
#define set_entity_address_taken(ent, flag) _set_entity_address_taken(ent, flag)
#define get_entity_offset(ent) _get_entity_offset(ent)
...
...
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