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
95439e41
Commit
95439e41
authored
Nov 17, 2011
by
Matthias Braun
Browse files
remove symconst_type_tag
parent
bd092bd1
Changes
9
Hide whitespace changes
Inline
Side-by-side
include/libfirm/firm_types.h
View file @
95439e41
...
...
@@ -220,8 +220,6 @@ ENUM_BITSET(mtp_additional_properties)
* SymConst. The content of the attribute symconst_symbol depends on this tag.
* Use the proper access routine after testing this flag. */
typedef
enum
symconst_kind
{
symconst_type_tag
,
/**< The SymConst is a type tag for the given type.
symconst_symbol is type *. */
symconst_type_size
,
/**< The SymConst is the size of the given type.
symconst_symbol is type *. */
symconst_type_align
,
/**< The SymConst is the alignment of the given type.
...
...
include/libfirm/ircons.h
View file @
95439e41
...
...
@@ -521,7 +521,6 @@
* -----------------------------------------------------------------------------------------
*
* There are several symbolic constants:
* symconst_type_tag The symbolic constant represents a type tag.
* symconst_type_size The symbolic constant represents the size of a type.
* symconst_type_align The symbolic constant represents the alignment of a type.
* symconst_addr_ent The symbolic constant represents the address of an entity.
...
...
@@ -543,12 +542,11 @@
*
* Attributes:
* attr.i.num The symconst_addr_ent, i.e. one of
* -symconst_type_tag
* -symconst_type_size
* -symconst_type_align
* -symconst_addr_ent
*
* If the attr.i.num is
symconst_type_tag,
symconst_type_size or symconst_type_align,
* If the attr.i.num is symconst_type_size or symconst_type_align,
* the node contains an attribute:
*
* attr.i.*type, a pointer to a type_class.
...
...
@@ -1112,8 +1110,6 @@ FIRM_API ir_node *new_rd_Const_long(dbg_info *db, ir_graph *irg,
*
* This is the constructor for a symbolic constant.
* There are several kinds of symbolic constants:
* - symconst_type_tag The symbolic constant represents a type tag. The
* type the tag stands for is given explicitly.
* - symconst_type_size The symbolic constant represents the size of a type.
* The type of which the constant represents the size
* is given explicitly.
...
...
@@ -1164,15 +1160,6 @@ FIRM_API ir_node *new_rd_SymConst_addr_ent(dbg_info *db, ir_graph *irg,
FIRM_API
ir_node
*
new_rd_SymConst_ofs_ent
(
dbg_info
*
db
,
ir_graph
*
irg
,
ir_mode
*
mode
,
ir_entity
*
symbol
);
/** Constructor for a SymConst type_tag node.
*
* Same as new_rd_SymConst, except that the constructor is tailored for
* symconst_type_tag.
* Adds the SymConst to the start block of irg.
*/
FIRM_API
ir_node
*
new_rd_SymConst_type_tag
(
dbg_info
*
db
,
ir_graph
*
irg
,
ir_mode
*
mode
,
ir_type
*
symbol
);
/** Constructor for a SymConst size node.
*
* Same as new_rd_SymConst, except that the constructor is tailored for
...
...
@@ -1282,8 +1269,6 @@ FIRM_API ir_node *new_r_Const_long(ir_graph *irg, ir_mode *mode, long value);
*
* This is the constructor for a symbolic constant.
* There are several kinds of symbolic constants:
* - symconst_type_tag The symbolic constant represents a type tag. The
* type the tag stands for is given explicitly.
* - symconst_type_size The symbolic constant represents the size of a type.
* The type of which the constant represents the size
* is given explicitly.
...
...
@@ -1408,8 +1393,6 @@ FIRM_API ir_node *new_d_Const_long(dbg_info *db, ir_mode *mode, long value);
*
* This is the constructor for a symbolic constant.
* There are several kinds of symbolic constants:
* - symconst_type_tag The symbolic constant represents a type tag. The
* type the tag stands for is given explicitly.
* - symconst_type_size The symbolic constant represents the size of a type.
* The type of which the constant represents the size
* is given explicitly.
...
...
@@ -1531,8 +1514,6 @@ FIRM_API ir_node *new_Const_long(ir_mode *mode, long value);
*
* This is the constructor for a symbolic constant.
* There are several kinds of symbolic constants:
* - symconst_type_tag The symbolic constant represents a type tag. The
* type the tag stands for is given explicitly.
* - symconst_type_size The symbolic constant represents the size of a type.
* The type of which the constant represents the size
* is given explicitly.
...
...
include/libfirm/irnode.h
View file @
95439e41
...
...
@@ -380,7 +380,7 @@ FIRM_API symconst_kind get_SymConst_kind(const ir_node *node);
/** Set the kind of the SymConst. */
FIRM_API
void
set_SymConst_kind
(
ir_node
*
node
,
symconst_kind
num
);
/** Only to access SymConst of kind type_
tag or
size. Else assertion: */
/** Only to access SymConst of kind type_size. Else assertion: */
FIRM_API
ir_type
*
get_SymConst_type
(
const
ir_node
*
node
);
FIRM_API
void
set_SymConst_type
(
ir_node
*
node
,
ir_type
*
tp
);
...
...
ir/ir/ircons.c
View file @
95439e41
...
...
@@ -124,13 +124,6 @@ ir_node *new_rd_SymConst_ofs_ent(dbg_info *db, ir_graph *irg, ir_mode *mode, ir_
return
new_rd_SymConst
(
db
,
irg
,
mode
,
sym
,
symconst_ofs_ent
);
}
ir_node
*
new_rd_SymConst_type_tag
(
dbg_info
*
db
,
ir_graph
*
irg
,
ir_mode
*
mode
,
ir_type
*
symbol
)
{
symconst_symbol
sym
;
sym
.
type_p
=
symbol
;
return
new_rd_SymConst
(
db
,
irg
,
mode
,
sym
,
symconst_type_tag
);
}
ir_node
*
new_rd_SymConst_size
(
dbg_info
*
db
,
ir_graph
*
irg
,
ir_mode
*
mode
,
ir_type
*
symbol
)
{
symconst_symbol
sym
;
...
...
ir/ir/irdump.c
View file @
95439e41
...
...
@@ -675,9 +675,6 @@ void dump_node_opcode(FILE *F, ir_node *n)
case
symconst_ofs_ent
:
fprintf
(
F
,
"SymC %s offset"
,
get_entity_name
(
get_SymConst_entity
(
n
)));
break
;
case
symconst_type_tag
:
ir_fprintf
(
F
,
"SymC %+F tag"
,
get_SymConst_type
(
n
));
break
;
case
symconst_type_size
:
ir_fprintf
(
F
,
"SymC %+F size"
,
get_SymConst_type
(
n
));
break
;
...
...
ir/ir/irdumptxt.c
View file @
95439e41
...
...
@@ -247,11 +247,6 @@ void dump_irnode_to_file(FILE *F, ir_node *n)
fprintf
(
F
,
" entity: "
);
dump_entity_to_file
(
F
,
get_SymConst_entity
(
n
));
break
;
case
symconst_type_tag
:
fprintf
(
F
,
" kind: type_tag
\n
"
);
fprintf
(
F
,
" type: "
);
dump_type_to_file
(
F
,
get_SymConst_type
(
n
));
break
;
case
symconst_type_size
:
fprintf
(
F
,
" kind: size
\n
"
);
fprintf
(
F
,
" type: "
);
...
...
ir/lower/lower_hl.c
View file @
95439e41
...
...
@@ -212,9 +212,6 @@ static void lower_symconst(ir_node *symc)
ir_graph
*
irg
;
switch
(
get_SymConst_kind
(
symc
))
{
case
symconst_type_tag
:
assert
(
!
"SymConst kind symconst_type_tag not implemented"
);
break
;
case
symconst_type_size
:
/* rewrite the SymConst node by a Const node */
irg
=
get_irn_irg
(
symc
);
...
...
scripts/ir_spec.py
View file @
95439e41
...
...
@@ -879,8 +879,6 @@ class Sub(Binop):
class
SymConst
(
Op
):
"""A symbolic constant.
- *symconst_type_tag* The symbolic constant represents a type tag. The
type the tag stands for is given explicitly.
- *symconst_type_size* The symbolic constant represents the size of a type.
The type of which the constant represents the size
is given explicitly.
...
...
win32/firmEvaluator/firm.c
View file @
95439e41
...
...
@@ -519,12 +519,6 @@ static HRESULT format_node(DEBUGHELPER *pHelper, int nBase, const void *addr, ch
case
iro_SymConst
:
_tcsncat
(
pResult
,
"<"
,
max
);
switch
(
n
.
attr
.
symc
.
kind
)
{
case
symconst_type_tag
:
_tcsncat
(
pResult
,
"TAG:"
,
max
);
if
(
format_type
(
pHelper
,
nBase
,
n
.
attr
.
symc
.
sym
.
type_p
,
name
,
sizeof
(
name
),
0
)
!=
S_OK
)
return
E_FAIL
;
_tcsncat
(
pResult
,
name
,
max
);
break
;
case
symconst_type_size
:
_tcsncat
(
pResult
,
"SIZE:"
,
max
);
if
(
format_type
(
pHelper
,
nBase
,
n
.
attr
.
symc
.
sym
.
type_p
,
name
,
sizeof
(
name
),
0
)
!=
S_OK
)
...
...
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