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
3663d1cf
Commit
3663d1cf
authored
Jul 11, 2002
by
Götz Lindenmaier
Browse files
Normalisierung der Zugriffsfunktionen,
frame und global type sind nicht mehr in irp_types [r439]
parent
d2490350
Changes
24
Hide whitespace changes
Inline
Side-by-side
ir/ana/cgana.c
View file @
3663d1cf
...
...
@@ -48,7 +48,7 @@ static entity * get_implementation(type * class, entity * method) {
return
e
;
}
}
for
(
i
=
get_class_n_supertype
(
class
)
-
1
;
i
>=
0
;
--
i
)
{
for
(
i
=
get_class_n_supertype
s
(
class
)
-
1
;
i
>=
0
;
--
i
)
{
entity
*
e
=
get_implementation
(
get_class_supertype
(
class
,
i
),
method
);
if
(
e
)
{
return
e
;
...
...
ir/ir/ircgcons.c
View file @
3663d1cf
...
...
@@ -252,7 +252,7 @@ static void prepare_irg_end(ir_graph * irg, irg_data_t * data) {
}
}
if
(
n_ret
>
0
)
{
int
n_res
=
get_method_n_res
(
get_entity_type
(
get_irg_ent
(
irg
)));
int
n_res
=
get_method_n_res
s
(
get_entity_type
(
get_irg_ent
(
irg
)));
ir_node
**
in
=
NEW_ARR_F
(
ir_node
*
,
n_ret
);
/* block */
for
(
i
=
n_ret
-
1
;
i
>=
0
;
--
i
)
{
...
...
ir/ir/ircgcons.h
View file @
3663d1cf
...
...
@@ -15,8 +15,8 @@
#include "entity.h"
/* Aufbau der interprozeduralen Darstellung.
Das Analyseergebnis muss
*
in d
en
C
all
-Operationen
gespeichert sein. */
/* Aufbau der interprozeduralen Darstellung.
In den Call-Operationen
*
muss
en all
e potentialen callees
gespeichert sein. */
void
cg_construct
(
int
arr_len
,
entity
**
free_methods_arr
);
...
...
ir/ir/ircons.c
View file @
3663d1cf
...
...
@@ -555,7 +555,6 @@ new_rd_Sel (dbg_info* db, ir_graph *irg, ir_node *block, ir_node *store, ir_node
memcpy
(
&
r_in
[
2
],
in
,
sizeof
(
ir_node
*
)
*
arity
);
res
=
new_ir_node
(
db
,
irg
,
block
,
op_Sel
,
mode_p
,
r_arity
,
r_in
);
res
->
attr
.
s
.
ltyp
=
static_linkage
;
res
->
attr
.
s
.
ent
=
ent
;
res
=
optimize
(
res
);
...
...
ir/ir/ircons.h
View file @
3663d1cf
...
...
@@ -1346,7 +1346,10 @@ void switch_block (ir_node *target); */
ir_node
*
new_Block
(
int
arity
,
ir_node
**
in
);
ir_node
*
new_Start
(
void
);
ir_node
*
new_End
(
void
);
ir_node
*
new_EndReg
(
void
);
ir_node
*
new_EndExcept
(
void
);
ir_node
*
new_Jmp
(
void
);
ir_node
*
new_Break
(
void
);
ir_node
*
new_Cond
(
ir_node
*
c
);
ir_node
*
new_Return
(
ir_node
*
store
,
int
arity
,
ir_node
**
in
);
ir_node
*
new_Raise
(
ir_node
*
store
,
ir_node
*
obj
);
...
...
@@ -1358,6 +1361,7 @@ ir_node *new_Sel (ir_node *store, ir_node *objptr, int arity, ir_node **in,
ir_node
*
new_InstOf
(
ir_node
*
store
,
ir_node
*
objptr
,
type
*
ent
);
ir_node
*
new_Call
(
ir_node
*
store
,
ir_node
*
callee
,
int
arity
,
ir_node
**
in
,
type
*
type
);
ir_node
*
new_CallBegin
(
ir_node
*
callee
);
ir_node
*
new_Add
(
ir_node
*
op1
,
ir_node
*
op2
,
ir_mode
*
mode
);
ir_node
*
new_Sub
(
ir_node
*
op1
,
ir_node
*
op2
,
ir_mode
*
mode
);
ir_node
*
new_Minus
(
ir_node
*
op
,
ir_mode
*
mode
);
...
...
@@ -1386,16 +1390,12 @@ ir_node *new_Free (ir_node *store, ir_node *ptr, ir_node *size,
type
*
free_type
);
ir_node
*
new_Sync
(
int
arity
,
ir_node
**
in
);
ir_node
*
new_Proj
(
ir_node
*
arg
,
ir_mode
*
mode
,
long
proj
);
ir_node
*
new_Filter
(
ir_node
*
arg
,
ir_mode
*
mode
,
long
proj
);
ir_node
*
new_defaultProj
(
ir_node
*
arg
,
long
max_proj
);
ir_node
*
new_Tuple
(
int
arity
,
ir_node
**
in
);
ir_node
*
new_Id
(
ir_node
*
val
,
ir_mode
*
mode
);
ir_node
*
new_Bad
(
void
);
ir_node
*
new_Unknown
(
void
);
ir_node
*
new_CallBegin
(
ir_node
*
callee
);
ir_node
*
new_EndReg
(
void
);
ir_node
*
new_EndExcept
(
void
);
ir_node
*
new_Break
(
void
);
ir_node
*
new_Filter
(
ir_node
*
arg
,
ir_mode
*
mode
,
long
proj
);
/***********************************************************************/
/* The comfortable interface. */
...
...
ir/ir/irdump.c
View file @
3663d1cf
...
...
@@ -763,18 +763,18 @@ dump_type_info (type_or_ent *tore, void *env) {
switch
(
get_type_tpop_code
(
tp
))
{
case
tpo_class
:
{
for
(
i
=
0
;
i
<
get_class_n_supertype
(
tp
);
i
++
)
for
(
i
=
0
;
i
<
get_class_n_supertype
s
(
tp
);
i
++
)
xfprintf
(
F
,
"edge: { sourcename:
\"
%p
\"
targetname:
\"
%p
\"
"
TYPE_SUPER_EDGE_ATTR
"}
\n
"
,
tp
,
get_class_supertype
(
tp
,
i
));
for
(
i
=
0
;
i
<
get_class_n_member
(
tp
);
i
++
)
for
(
i
=
0
;
i
<
get_class_n_member
s
(
tp
);
i
++
)
xfprintf
(
F
,
"edge: { sourcename:
\"
%p
\"
targetname:
\"
%p
\"
"
TYPE_MEMBER_EDGE_ATTR
"}
\n
"
,
tp
,
get_class_member
(
tp
,
i
));
}
break
;
case
tpo_struct
:
{
for
(
i
=
0
;
i
<
get_struct_n_member
(
tp
);
i
++
)
for
(
i
=
0
;
i
<
get_struct_n_member
s
(
tp
);
i
++
)
xfprintf
(
F
,
"edge: { sourcename:
\"
%p
\"
targetname:
\"
%p
\"
"
TYPE_MEMBER_EDGE_ATTR
"}
\n
"
,
tp
,
get_struct_member
(
tp
,
i
));
...
...
@@ -785,7 +785,7 @@ dump_type_info (type_or_ent *tore, void *env) {
xfprintf
(
F
,
"edge: { sourcename:
\"
%p
\"
targetname:
\"
%p
\"
"
METH_PAR_EDGE_ATTR
"}
\n
"
,
tp
,
get_method_param_type
(
tp
,
i
),
i
);
for
(
i
=
0
;
i
<
get_method_n_res
(
tp
);
i
++
)
for
(
i
=
0
;
i
<
get_method_n_res
s
(
tp
);
i
++
)
xfprintf
(
F
,
"edge: { sourcename:
\"
%p
\"
targetname:
\"
%p
\"
"
METH_RES_EDGE_ATTR
"}
\n
"
,
tp
,
get_method_res_type
(
tp
,
i
),
i
);
...
...
ir/ir/irgopt.c
View file @
3663d1cf
...
...
@@ -482,7 +482,7 @@ void inline_method(ir_node *call, ir_graph *called_graph) {
/*** Replicate local entities of the called_graph ***/
/* copy the entities. */
called_frame
=
get_irg_frame_type
(
called_graph
);
for
(
i
=
0
;
i
<
get_class_n_member
(
called_frame
);
i
++
)
{
for
(
i
=
0
;
i
<
get_class_n_member
s
(
called_frame
);
i
++
)
{
entity
*
new_ent
,
*
old_ent
;
old_ent
=
get_class_member
(
called_frame
,
i
);
new_ent
=
copy_entity_own
(
old_ent
,
get_cur_frame_type
());
...
...
@@ -521,7 +521,7 @@ void inline_method(ir_node *call, ir_graph *called_graph) {
end_bl
=
get_new_node
(
get_irg_end_block
(
called_graph
));
end
=
get_new_node
(
get_irg_end
(
called_graph
));
arity
=
get_irn_arity
(
end_bl
);
/* arity = n_exc + n_ret */
n_res
=
get_method_n_res
(
get_Call_type
(
call
));
n_res
=
get_method_n_res
s
(
get_Call_type
(
call
));
res_pred
=
(
ir_node
**
)
malloc
(
n_res
*
sizeof
(
ir_node
*
));
cf_pred
=
(
ir_node
**
)
malloc
(
arity
*
sizeof
(
ir_node
*
));
...
...
ir/ir/irgraph.c
View file @
3663d1cf
...
...
@@ -16,7 +16,7 @@
# include "ircons.h"
# include "irgraph_t.h"
# include "irprog.h"
# include "irprog
_t
.h"
# include "iropt_t.h"
# include "array.h"
# include "irgmod.h"
...
...
@@ -45,6 +45,7 @@ void free_Phi_in_stack(Phi_in_stack *s);
ir_graph
*
new_ir_graph
(
entity
*
ent
,
int
n_loc
)
{
int
i
;
ir_graph
*
res
;
ir_node
*
first_block
;
ir_node
*
projX
;
...
...
@@ -87,14 +88,16 @@ new_ir_graph (entity *ent, int n_loc)
res
->
outs_state
=
no_outs
;
res
->
dom_state
=
no_dom
;
/** Type infor
a
mtion for the procedure of the graph **/
/** Type inform
a
tion for the procedure of the graph **/
res
->
ent
=
ent
;
set_entity_irg
(
ent
,
res
);
/** A type that represents the stack frame. A class type so that it can
contain "inner" methods as in Pascal. **/
res
->
frame_type
=
new_type_class
(
mangle
(
get_entity_ident
(
ent
),
id_from_str
(
FRAME_TP_SUFFIX
,
strlen
(
FRAME_TP_SUFFIX
))));
id_from_str
(
FRAME_TP_SUFFIX
,
strlen
(
FRAME_TP_SUFFIX
))));
/* Remove type from type list. Must be treated differently than other types. */
remove_irp_type_from_list
(
res
->
frame_type
);
/** Nodes needed in every graph **/
res
->
end_block
=
new_immBlock
();
...
...
@@ -360,7 +363,7 @@ is_frame_type(type *ftp) {
}
int
get_irg_n_loc
(
ir_graph
*
irg
)
get_irg_n_loc
s
(
ir_graph
*
irg
)
{
#if PRECISE_EXC_CONTEXT
return
irg
->
n_loc
-
1
-
1
;
...
...
ir/ir/irgraph.h
View file @
3663d1cf
...
...
@@ -94,7 +94,15 @@ ir_graph *new_ir_graph (entity *ent, int n_loc);
graph, nor the entity standing for this graph. */
void
free_ir_graph
(
ir_graph
*
irg
);
/* access routines for all ir_graph attributes */
/** access routines for all ir_graph attributes **/
entity
*
get_irg_ent
(
ir_graph
*
irg
);
void
set_irg_ent
(
ir_graph
*
irg
,
entity
*
ent
);
type
*
get_irg_frame_type
(
ir_graph
*
irg
);
void
set_irg_frame_type
(
ir_graph
*
irg
,
type
*
ftp
);
/* To test for a frame type */
int
is_frame_type
(
type
*
ftp
);
ir_node
*
get_irg_start_block
(
ir_graph
*
irg
);
void
set_irg_start_block
(
ir_graph
*
irg
,
ir_node
*
node
);
...
...
@@ -107,6 +115,7 @@ void set_irg_end_block (ir_graph *irg, ir_node *node);
ir_node
*
get_irg_end
(
ir_graph
*
irg
);
void
set_irg_end
(
ir_graph
*
irg
,
ir_node
*
node
);
/* @@@ oblivious, no more supported. */
ir_node
*
get_irg_cstore
(
ir_graph
*
irg
);
void
set_irg_cstore
(
ir_graph
*
irg
,
ir_node
*
node
);
...
...
@@ -119,6 +128,9 @@ void set_irg_globals (ir_graph *irg, ir_node *node);
ir_node
*
get_irg_args
(
ir_graph
*
irg
);
void
set_irg_args
(
ir_graph
*
irg
,
ir_node
*
node
);
ir_node
*
get_irg_current_block
(
ir_graph
*
irg
);
void
set_irg_current_block
(
ir_graph
*
irg
,
ir_node
*
node
);
/* Use new_Bad() instead!! */
ir_node
*
get_irg_bad
(
ir_graph
*
irg
);
void
set_irg_bad
(
ir_graph
*
irg
,
ir_node
*
node
);
...
...
@@ -127,29 +139,15 @@ void set_irg_bad (ir_graph *irg, ir_node *node);
ir_node
*
get_irg_unknown
(
ir_graph
*
irg
);
void
set_irg_unknown
(
ir_graph
*
irg
,
ir_node
*
node
);
ir_node
*
get_irg_current_block
(
ir_graph
*
irg
);
void
set_irg_current_block
(
ir_graph
*
irg
,
ir_node
*
node
);
entity
*
get_irg_ent
(
ir_graph
*
irg
);
void
set_irg_ent
(
ir_graph
*
irg
,
entity
*
ent
);
type
*
get_irg_frame_type
(
ir_graph
*
irg
);
void
set_irg_frame_type
(
ir_graph
*
irg
,
type
*
ftp
);
/* To test for a frame type */
int
is_frame_type
(
type
*
ftp
);
/* Use not encouraged, internal of Phi construction algorithm. */
int
get_irg_n_loc
(
ir_graph
*
irg
);
void
set_irg_n_loc
(
ir_graph
*
irg
,
int
n_loc
);
int
get_irg_n_locs
(
ir_graph
*
irg
);
/********************************************************************************/
/* States of an ir_graph. */
/********************************************************************************/
/* An ir_graph can have different states. These states represent the analysis
/*
*
An ir_graph can have different states. These states represent the analysis
information associated with the graph. Optimizations invalidate these
states. */
states.
*
*/
/* state: phase values: phase_building, phase_high, phase_low.
The irg is in phase_building during construction of the irgraph. It is in
...
...
@@ -167,7 +165,7 @@ irg_phase_state get_irg_phase_state (ir_graph *irg);
void
set_irg_phase_low
(
ir_graph
*
irg
);
/* state: pinned
The graph is "pinned" if all nodes are a
ccos
iated with a basic block.
The graph is "pinned" if all nodes are a
ssoc
iated with a basic block.
It is in state "floats" if nodes are in arbitrary blocks. In state
"floats" the block predecessor is set in all nodes, but this can be an
invalid block, i.e., the block is not a dominator of all the uses of
...
...
ir/ir/irnode.c
View file @
3663d1cf
...
...
@@ -378,12 +378,12 @@ irn_not_visited (ir_node *node) {
}
INLINE
void
set_irn_link
(
ir_node
*
node
,
ir_node
*
link
)
{
set_irn_link
(
ir_node
*
node
,
void
*
link
)
{
assert
(
node
);
node
->
link
=
link
;
}
INLINE
ir_node
*
INLINE
void
*
get_irn_link
(
ir_node
*
node
)
{
assert
(
node
);
return
node
->
link
;
...
...
@@ -496,13 +496,6 @@ get_Block_n_cfgpreds (ir_node *node) {
return
(
get_irn_arity
(
node
));
}
/*
INLINE void
set_Block_n_cfgpreds (ir_node *node, int n_preds) {
assert ((node->op == op_Block));
}
*/
INLINE
ir_node
*
get_Block_cfgpred
(
ir_node
*
node
,
int
pos
)
{
assert
(
node
->
op
==
op_Block
);
...
...
@@ -671,8 +664,20 @@ set_End_keepalive(ir_node *end, int pos, ir_node *ka) {
INLINE
void
free_End
(
ir_node
*
end
)
{
assert
(
end
->
op
==
op_End
);
/* DEL_ARR_F(end->in); GL @@@ tut nicht ! */
end
->
in
=
NULL
;
/* @@@ make sure we get an error if we use the in array afterwards ... */
end
->
in
=
NULL
;
/* @@@ make sure we get an error if we use the
in array afterwards ... */
}
ir_graph
*
get_EndReg_irg
(
ir_node
*
end
)
{
assert
(
end
->
op
==
op_EndReg
);
return
end
->
attr
.
end
.
irg
;
}
ir_graph
*
get_EndExcept_irg
(
ir_node
*
end
)
{
assert
(
end
->
op
==
op_EndReg
);
return
end
->
attr
.
end
.
irg
;
}
/*
...
...
@@ -743,7 +748,7 @@ set_Return_mem (ir_node *node, ir_node *mem) {
}
INLINE
int
get_Return_n_res
(
ir_node
*
node
)
{
get_Return_n_res
s
(
ir_node
*
node
)
{
assert
(
node
->
op
==
op_Return
);
return
(
get_irn_arity
(
node
)
-
RETURN_RESULT_OFFSET
);
}
...
...
@@ -752,7 +757,7 @@ INLINE ir_node **
get_Return_res_arr
(
ir_node
*
node
)
{
assert
((
node
->
op
==
op_Return
));
if
(
get_Return_n_res
(
node
)
>
0
)
if
(
get_Return_n_res
s
(
node
)
>
0
)
return
(
ir_node
**
)
&
(
get_irn_in
(
node
)[
1
+
RETURN_RESULT_OFFSET
]);
else
return
NULL
;
...
...
@@ -768,7 +773,7 @@ set_Return_n_res (ir_node *node, int results) {
INLINE
ir_node
*
get_Return_res
(
ir_node
*
node
,
int
pos
)
{
assert
(
node
->
op
==
op_Return
);
assert
(
get_Return_n_res
(
node
)
>
pos
);
assert
(
get_Return_n_res
s
(
node
)
>
pos
);
return
get_irn_n
(
node
,
pos
+
RETURN_RESULT_OFFSET
);
}
...
...
@@ -892,7 +897,7 @@ set_Sel_ptr (ir_node *node, ir_node *ptr) {
}
INLINE
int
get_Sel_n_index
(
ir_node
*
node
)
{
get_Sel_n_index
s
(
ir_node
*
node
)
{
assert
(
node
->
op
==
op_Sel
);
return
(
get_irn_arity
(
node
)
-
SEL_INDEX_OFFSET
);
}
...
...
@@ -901,19 +906,12 @@ INLINE ir_node **
get_Sel_index_arr
(
ir_node
*
node
)
{
assert
((
node
->
op
==
op_Sel
));
if
(
get_Sel_n_index
(
node
)
>
0
)
if
(
get_Sel_n_index
s
(
node
)
>
0
)
return
(
ir_node
**
)
&
get_irn_in
(
node
)[
SEL_INDEX_OFFSET
+
1
];
else
return
NULL
;
}
/*
INLINE void
set_Sel_n_index (ir_node *node, int n_index) {
assert (node->op == op_Sel);
}
*/
INLINE
ir_node
*
get_Sel_index
(
ir_node
*
node
,
int
pos
)
{
assert
(
node
->
op
==
op_Sel
);
...
...
@@ -938,18 +936,6 @@ set_Sel_entity (ir_node *node, entity *ent) {
node
->
attr
.
s
.
ent
=
ent
;
}
INLINE
linkage_type
get_Sel_linkage_type
(
ir_node
*
node
)
{
assert
(
node
->
op
==
op_Sel
);
return
node
->
attr
.
s
.
ltyp
;
}
INLINE
void
set_Sel_linkage_type
(
ir_node
*
node
,
linkage_type
lt
)
{
assert
(
node
->
op
==
op_Sel
);
node
->
attr
.
s
.
ltyp
=
lt
;
}
type
*
get_InstOf_ent
(
ir_node
*
node
)
{
assert
(
node
->
op
=
op_InstOf
);
...
...
@@ -1091,6 +1077,27 @@ void remove_Call_callee_arr(ir_node * node) {
node
->
attr
.
call
.
callee_arr
=
NULL
;
}
ir_node
*
get_CallBegin_ptr
(
ir_node
*
node
)
{
assert
(
node
->
op
==
op_CallBegin
);
return
get_irn_n
(
node
,
0
);
}
void
set_CallBegin_ptr
(
ir_node
*
node
,
ir_node
*
ptr
)
{
assert
(
node
->
op
==
op_CallBegin
);
set_irn_n
(
node
,
0
,
ptr
);
}
ir_graph
*
get_CallBegin_irg
(
ir_node
*
node
)
{
assert
(
node
->
op
==
op_CallBegin
);
return
node
->
attr
.
callbegin
.
irg
;
}
ir_node
*
get_CallBegin_call
(
ir_node
*
node
)
{
assert
(
node
->
op
==
op_CallBegin
);
return
node
->
attr
.
callbegin
.
call
;
}
void
set_CallBegin_call
(
ir_node
*
node
,
ir_node
*
call
)
{
assert
(
node
->
op
==
op_CallBegin
);
node
->
attr
.
callbegin
.
call
=
call
;
}
INLINE
ir_node
*
get_Add_left
(
ir_node
*
node
)
{
assert
(
node
->
op
==
op_Add
);
...
...
@@ -2057,16 +2064,25 @@ set_Id_pred (ir_node *node, ir_node *pred) {
INLINE
ir_node
*
get_Filter_pred
(
ir_node
*
node
)
{
get_Filter_pred
(
ir_node
*
node
)
{
assert
(
node
->
op
==
op_Filter
);
return
node
->
in
[
1
];
}
INLINE
void
set_Filter_pred
(
ir_node
*
node
,
ir_node
*
pred
)
{
assert
(
node
->
op
==
op_Filter
);
node
->
in
[
1
]
=
pred
;
}
INLINE
long
get_Filter_proj
(
ir_node
*
node
)
{
assert
(
node
->
op
==
op_Filter
);
return
node
->
attr
.
filter
.
proj
;
}
INLINE
void
set_Filter_proj
(
ir_node
*
node
,
long
proj
)
{
assert
(
node
->
op
==
op_Filter
);
node
->
attr
.
filter
.
proj
=
proj
;
}
void
set_Filter_cg_pred_arr
(
ir_node
*
node
,
int
arity
,
ir_node
**
in
)
{
assert
(
node
->
op
==
op_Filter
);
...
...
ir/ir/irnode.h
View file @
3663d1cf
...
...
@@ -57,8 +57,6 @@ typedef struct ir_node ir_node;
/* returns the number of predecessors without the block predecessor: */
int
get_irn_arity
(
ir_node
*
node
);
/* returns the array with the ins: */
INLINE
ir_node
**
get_irn_in
(
ir_node
*
node
);
/* Replaces the old in array by a new one that will contain the ins given in
the parameters. Conserves the block predecessor. It copies the array passed.
This function is necessary to ajust in arrays of blocks, calls and phis.
...
...
@@ -95,13 +93,16 @@ INLINE void set_irn_visited (ir_node *node, unsigned long visited);
INLINE
unsigned
long
get_irn_visited
(
ir_node
*
node
);
/* Sets visited to get_irg_visited(current_ir_graph) */
INLINE
void
mark_irn_visited
(
ir_node
*
node
);
/* Returns 1
o
f visited < get_irg_visited(current_ir_graph). */
/* Returns 1
i
f visited < get_irg_visited(current_ir_graph). */
INLINE
int
irn_not_visited
(
ir_node
*
node
);
INLINE
void
set_irn_link
(
ir_node
*
node
,
ir_node
*
link
);
INLINE
ir_node
*
get_irn_link
(
ir_node
*
node
);
INLINE
void
set_irn_link
(
ir_node
*
node
,
void
*
link
);
INLINE
void
*
get_irn_link
(
ir_node
*
node
);
/* Outputs a unique number for this node if libfirm is compiled for
debugging, else returns 0. */
debugging,
(configure with --enable-debug)
else returns 0. */
INLINE
long
get_irn_node_nr
(
ir_node
*
node
);
/* Returns the ir_graph this node belongs to. Only valid for
* CallBegin, EndReg and EndExcept */
INLINE
ir_graph
*
get_irn_irg
(
ir_node
*
node
);
/*****/
/* irnode constructor */
...
...
@@ -142,9 +143,9 @@ typedef enum {
pns_args
/* Projection on all arguments */
}
pns_number
;
/* @@@ no more supported */
INLINE
ir_node
**
get_Block_cfgpred_arr
(
ir_node
*
node
);
int
get_Block_n_cfgpreds
(
ir_node
*
node
);
/* INLINE void set_Block_n_cfgpreds (ir_node *node, int n_preds); */
INLINE
ir_node
*
get_Block_cfgpred
(
ir_node
*
node
,
int
pos
);
INLINE
void
set_Block_cfgpred
(
ir_node
*
node
,
int
pos
,
ir_node
*
pred
);
INLINE
bool
get_Block_matured
(
ir_node
*
node
);
...
...
@@ -154,17 +155,15 @@ INLINE void set_Block_block_visited (ir_node *node, unsigned long visit);
/* For this current_ir_graph must be set. */
INLINE
void
mark_Block_block_visited
(
ir_node
*
node
);
INLINE
int
Block_not_block_visited
(
ir_node
*
node
);
INLINE
ir_node
*
get_Block_graph_arr
(
ir_node
*
node
,
int
pos
);
INLINE
void
set_Block_graph_arr
(
ir_node
*
node
,
int
pos
,
ir_node
*
value
);
/* exc handling */
/* exc handling
@@@ ajacs specific -- not supported
*/
void
set_Block_exc
(
ir_node
*
,
exc_t
);
exc_t
get_Block_exc
(
ir_node
*
);
void
set_Node_exc
(
ir_node
*
,
exc_t
);
exc_t
get_Node_exc
(
ir_node
*
);
/* handler handling */
/* handler handling
@@@ ajacs specific -- not supported
*/
void
set_Block_handler
(
ir_node
*
,
ir_node
*
);
ir_node
*
get_Block_handler
(
ir_node
*
);
...
...
@@ -175,6 +174,7 @@ ir_node* get_Node_handler (ir_node*);
* both views. */
void
set_Block_cg_cfgpred_arr
(
ir_node
*
node
,
int
arity
,
ir_node
**
in
);
void
set_Block_cg_cfgpred
(
ir_node
*
node
,
int
pos
,
ir_node
*
pred
);
/* @@@ not supported */
ir_node
**
get_Block_cg_cfgpred_arr
(
ir_node
*
node
);
int
get_Block_cg_n_cfgpreds
(
ir_node
*
node
);
void
remove_Block_cg_cfgpred_arr
(
ir_node
*
node
);
...
...
@@ -188,6 +188,10 @@ INLINE void set_End_keepalive(ir_node *end, int pos, ir_node *ka);
free_End frees these data structures. */
INLINE
void
free_End
(
ir_node
*
end
);
ir_graph
*
get_EndReg_irg
(
ir_node
*
end
);
ir_graph
*
get_EndExcept_irg
(
ir_node
*
end
);
/* We distinguish three kinds of Cond nodes. These can be distinguished
by the mode of the selector operand and an internal flag of type cond_kind.
First we distinguish binary Conds and switch Conds.
...
...
@@ -222,8 +226,7 @@ INLINE void set_Cond_kind (ir_node *node, cond_kind kind);
INLINE
ir_node
*
get_Return_mem
(
ir_node
*
node
);
INLINE
void
set_Return_mem
(
ir_node
*
node
,
ir_node
*
mem
);
INLINE
ir_node
**
get_Return_res_arr
(
ir_node
*
node
);
INLINE
int
get_Return_n_res
(
ir_node
*
node
);
/*INLINE void set_Return_n_res (ir_node *node, int results); */
INLINE
int
get_Return_n_ress
(
ir_node
*
node
);
INLINE
ir_node
*
get_Return_res
(
ir_node
*
node
,
int
pos
);
INLINE
void
set_Return_res
(
ir_node
*
node
,
int
pos
,
ir_node
*
res
);
...
...
@@ -266,21 +269,13 @@ INLINE void set_Sel_mem (ir_node *node, ir_node *mem);
INLINE
ir_node
*
get_Sel_ptr
(
ir_node
*
node
);
/* ptr to the object to select from */
INLINE
void
set_Sel_ptr
(
ir_node
*
node
,
ir_node
*
ptr
);
INLINE
ir_node
**
get_Sel_index_arr
(
ir_node
*
node
);
INLINE
int
get_Sel_n_index
(
ir_node
*
node
);
/*INLINE void set_Sel_n_index (ir_node *node, int n_index); */
INLINE
int
get_Sel_n_indexs
(
ir_node
*
node
);
INLINE
ir_node
*
get_Sel_index
(
ir_node
*
node
,
int
pos
);
INLINE
void
set_Sel_index
(
ir_node
*
node
,
int
pos
,
ir_node
*
index
);
INLINE
entity
*
get_Sel_entity
(
ir_node
*
node
);
/* entity to select */
INLINE
void
set_Sel_entity
(
ir_node
*
node
,
entity
*
ent
);
typedef
enum
{
static_linkage
,
/* entity is used internal and not visible out of this
file/class. */
external_linkage
,
/* */
no_linkage
}
linkage_type
;
INLINE
linkage_type
get_Sel_linkage_type
(
ir_node
*
node
);
INLINE
void
set_Sel_linkage_type
(
ir_node
*
node
,
linkage_type
lt
);
/* @@@ ajacs specific node -- not supported */
type
*
get_InstOf_ent
(
ir_node
*
);
void
set_InstOf_ent
(
ir_node
*
,
type
*
);
ir_node
*
get_InstOf_obj
(
ir_node
*
);
...
...
@@ -294,19 +289,22 @@ INLINE ir_node *get_Call_ptr (ir_node *node);
INLINE
void
set_Call_ptr
(
ir_node
*
node
,
ir_node
*
ptr
);
INLINE
ir_node
**
get_Call_param_arr
(
ir_node
*
node
);
INLINE
int
get_Call_n_params
(
ir_node
*
node
);
INLINE
int
get_Call_arity
(
ir_node
*
node
);
/* INLINE void set_Call_arity (ir_node *node, ir_node *arity); */
INLINE
ir_node
*
get_Call_param
(
ir_node
*
node
,
int
pos
);
INLINE
void
set_Call_param
(
ir_node
*
node
,
int
pos
,
ir_node
*
param
);
INLINE
type
*
get_Call_type
(
ir_node
*
node
);
INLINE
void
set_Call_type
(
ir_node
*
node
,
type
*
type
);
/* Set, get and remove the callee-analysis. */
int
get_Call_n_callees
(
ir_node
*
node
);
entity
*
get_Call_callee
(
ir_node
*
node
,
int
pos
);
void
set_Call_callee_arr
(
ir_node
*
node
,
int
n
,
entity
**
arr
);
void
remove_Call_callee_arr
(
ir_node
*
node
);
ir_node
*
get_CallBegin_ptr
(
ir_node
*
node
);
void
set_CallBegin_ptr
(
ir_node
*
node
,
ir_node
*
ptr
);
ir_graph
*
get_CallBegin_irg
(
ir_node
*
node
);
ir_node
*
get_CallBegin_call
(
ir_node
*
node
);
void
set_CallBegin_call
(
ir_node
*
node
,
ir_node
*
call
);
/* For unary and binary arithmetic operations the access to the
operands can be factored out. Left is the first, right the
second arithmetic value as listed in tech report 1999-44.
...
...
@@ -441,10 +439,17 @@ INLINE void set_Conv_op (ir_node *node, ir_node *op);
INLINE
ir_node
**
get_Phi_preds_arr
(
ir_node
*
node
);
INLINE
int
get_Phi_n_preds
(
ir_node
*
node
);
/* INLINE void set_Phi_n_preds (ir_node *node, int n_preds); */
INLINE
ir_node
*
get_Phi_pred
(
ir_node
*
node
,
int
pos
);
INLINE
void
set_Phi_pred
(
ir_node
*
node
,
int
pos
,
ir_node
*
pred
);
INLINE
ir_node
*
get_Filter_pred
(
ir_node
*
node
);
INLINE
void
set_Filter_pred
(
ir_node
*
node
,
ir_node
*
pred
);
INLINE
long
get_Filter_proj
(
ir_node
*
node
);
INLINE
void
set_Filter_proj
(
ir_node
*
node
,
long
proj
);
/* set the interprocedural predecessors */
void
set_Filter_cg_pred_arr
(
ir_node
*
node
,
int
arity
,
ir_node
**
in
);
void
set_Filter_cg_pred
(
ir_node
*
node
,
int
pos
,
ir_node
*
pred
);
INLINE
ir_node
*
get_Load_mem
(
ir_node
*
node
);
INLINE
void
set_Load_mem
(
ir_node
*
node
,
ir_node
*
mem
);
INLINE
ir_node
*
get_Load_ptr
(
ir_node
*
node
);
...
...
@@ -481,7 +486,6 @@ INLINE void set_Free_type (ir_node *node, type *type);
INLINE
ir_node
**
get_Sync_preds_arr
(
ir_node
*
node
);
INLINE
int
get_Sync_n_preds
(
ir_node
*
node
);
/* INLINE void set_Sync_n_preds (ir_node *node, int n_preds); */
INLINE
ir_node
*
get_Sync_pred
(
ir_node
*
node
,
int
pos
);
INLINE
void
set_Sync_pred
(
ir_node
*
node
,
int
pos
,
ir_node
*
pred
);
...
...
@@ -492,23 +496,12 @@ INLINE void set_Proj_proj (ir_node *node, long proj);
INLINE
ir_node
**
get_Tuple_preds_arr
(
ir_node
*
node
);
INLINE
int
get_Tuple_n_preds
(
ir_node
*
node
);
/* INLINE void set_Tuple_n_preds (ir_node *node, int n_preds); */
INLINE
ir_node
*
get_Tuple_pred
(
ir_node
*
node
,
int
pos
);
INLINE
void
set_Tuple_pred
(
ir_node
*
node
,
int
pos
,
ir_node
*
pred
);
INLINE
ir_node
*
get_Id_pred
(
ir_node
*
node
);
INLINE
void
set_Id_pred
(
ir_node
*
node
,
ir_node
*
pred
);
INLINE
ir_node
*
get_Filter_pred
(
ir_node
*
node
);
INLINE
long
get_Filter_proj
(
ir_node
*
node
);
/* set the interprocedural predecessors */
void
set_Filter_cg_pred_arr
(
ir_node
*
node
,
int
arity
,
ir_node
**
in
);
void
set_Filter_cg_pred
(
ir_node
*
node
,
int
pos
,
ir_node
*
pred
);
/* Returns the ir_graph this node belongs to. Only valid for
* CallBegin, EndReg and EndExcept */
INLINE
ir_graph
*
get_irn_irg
(
ir_node
*
node
);
/*****/
/****s* irnode/other2
...
...
ir/ir/irnode_t.h
View file @
3663d1cf
...
...
@@ -61,7 +61,6 @@ typedef struct {
/* Sel attributes */
typedef
struct
{
entity
*
ent
;
/* entity to select */
linkage_type
ltyp
;
/* linkage type of the entity */
}<