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
5b567bb7
Commit
5b567bb7
authored
Jul 12, 2004
by
Götz Lindenmaier
Browse files
fix for firmjni
[r3402]
parent
62bdc597
Changes
5
Hide whitespace changes
Inline
Side-by-side
firmjni/Makefile.in
View file @
5b567bb7
...
...
@@ -68,7 +68,7 @@ FIRM_PATH_HEADERS=common/firm.h common/firm_common.h \
ir/ircons.h ir/ircgcons.h ir/irflag.h ir/irvrfy.h ir/irdump.h
\
ir/iropt.h ir/irgopt.h ir/ircgopt.h
\
ana/irouts.h ana/irdom.h ana/irloop.h ana/cgana.h
\
ir/irgmod.h
tr
/typegmod.h opt/tailrec.h
stat
/firmstat.h
ir/irgmod.h
tr
/typegmod.h opt/tailrec.h
FIRM_SOURCE_DIR_HEADERS
=
$(
addprefix
$(SOURCE_DIR)
/,
$(FIRM_HEADERS)
)
...
...
firmjni/testprograms/run-results.txt
View file @
5b567bb7
...
...
@@ -7,20 +7,20 @@ use xvcg to view this graph:
Creating an IR graph: IfElseExample...
Optimization: 3
new Node 3
3
old Node 3
2
new Node 3
2
old Node 3
1
Optimization: 2
new Nodes: 3
5
,
old Nodes: 3
6
, 3
4
, 3
5
,
new Nodes: 3
4
,
old Nodes: 3
5
, 3
3
, 3
4
,
Optimization: 2
new Nodes:
20
,
old Nodes: 3
7
, 3
4
,
20
,
new Nodes:
19
,
old Nodes: 3
6
, 3
3
,
19
,
Optimization: 4
new Nodes: 2
7
,
old Nodes: 4
2
, 3
5
,
new Nodes: 2
6
,
old Nodes: 4
1
, 3
4
,
Done building the graph. Optimizing it.
Optimization: 4
new Nodes: 2
7
,
old Nodes: 4
2
, 3
5
,
new Nodes: 2
6
,
old Nodes: 4
1
, 3
4
,
use xvcg to view this graph:
/ben/goetz/bin/xvcg GRAPHNAME
ir/ir/ircons.c
View file @
5b567bb7
...
...
@@ -721,6 +721,26 @@ new_rd_SymConst (dbg_info* db, ir_graph *irg, ir_node *block, symconst_symbol va
return
res
;
}
ir_node
*
new_rd_SymConst_addr_ent
(
dbg_info
*
db
,
ir_graph
*
irg
,
entity
*
symbol
,
type
*
tp
)
{
symconst_symbol
sym
=
{(
type
*
)
symbol
};
return
new_rd_SymConst_type
(
db
,
irg
,
irg
->
start_block
,
sym
,
symconst_addr_ent
,
tp
);
}
ir_node
*
new_rd_SymConst_addr_name
(
dbg_info
*
db
,
ir_graph
*
irg
,
ident
*
symbol
,
type
*
tp
)
{
symconst_symbol
sym
=
{(
type
*
)
symbol
};
return
new_rd_SymConst_type
(
db
,
irg
,
irg
->
start_block
,
sym
,
symconst_addr_name
,
tp
);
}
ir_node
*
new_rd_SymConst_type_tag
(
dbg_info
*
db
,
ir_graph
*
irg
,
type
*
symbol
,
type
*
tp
)
{
symconst_symbol
sym
=
{
symbol
};
return
new_rd_SymConst_type
(
db
,
irg
,
irg
->
start_block
,
sym
,
symconst_type_tag
,
tp
);
}
ir_node
*
new_rd_SymConst_size
(
dbg_info
*
db
,
ir_graph
*
irg
,
type
*
symbol
,
type
*
tp
)
{
symconst_symbol
sym
=
{
symbol
};
return
new_rd_SymConst_type
(
db
,
irg
,
irg
->
start_block
,
sym
,
symconst_size
,
tp
);
}
INLINE
ir_node
*
new_rd_Sync
(
dbg_info
*
db
,
ir_graph
*
irg
,
ir_node
*
block
,
int
arity
,
ir_node
**
in
)
{
...
...
ir/ir/ircons.h
View file @
5b567bb7
...
...
@@ -1300,6 +1300,9 @@ ir_node *new_rd_Const (dbg_info *db, ir_graph *irg, ir_node *block,
* Outputs of the node.
* An unsigned integer (I_u) or a pointer (P).
*
* Mention union in declaration so that the firmjni generator recognizes that
* it can not cast the argument to an int.
*
* @param *db A pointer for debug information.
* @param *irg The ir graph the node belongs to.
* @param *block The ir block the node belongs to.
...
...
@@ -1308,14 +1311,42 @@ ir_node *new_rd_Const (dbg_info *db, ir_graph *irg, ir_node *block,
* @param tp The source type of the constant.
*/
ir_node
*
new_rd_SymConst_type
(
dbg_info
*
db
,
ir_graph
*
irg
,
ir_node
*
block
,
symconst_symbol
value
,
new_rd_SymConst_type
(
dbg_info
*
db
,
ir_graph
*
irg
,
ir_node
*
block
,
union
symconst_symbol
value
,
symconst_kind
symkind
,
type
*
tp
);
/** Constructor for a SymConst node.
*
* Same as new_rd_SymConst_type, except that it sets the type to type_unknown. */
ir_node
*
new_rd_SymConst
(
dbg_info
*
db
,
ir_graph
*
irg
,
ir_node
*
block
,
symconst_symbol
value
,
symconst_kind
symkind
);
union
symconst_symbol
value
,
symconst_kind
symkind
);
/** Constructor for a SymConst addr_ent node.
*
* Same as new_rd_SymConst_type, except that the constructor is tailored for
* symconst_addr_ent.
* Adds the symconst to the start block of irg. */
ir_node
*
new_rd_SymConst_addr_ent
(
dbg_info
*
db
,
ir_graph
*
irg
,
entity
*
symbol
,
type
*
tp
);
/** Constructor for a SymConst addr_name node.
*
* Same as new_rd_SymConst_type, except that the constructor is tailored for
* symconst_addr_ent.
* Adds the symconst to the start block of irg. */
ir_node
*
new_rd_SymConst_addr_name
(
dbg_info
*
db
,
ir_graph
*
irg
,
ident
*
symbol
,
type
*
tp
);
/** Constructor for a SymConst type_tag node.
*
* Same as new_rd_SymConst_type, except that the constructor is tailored for
* symconst_addr_ent.
* Adds the symconst to the start block of irg. */
ir_node
*
new_rd_SymConst_type_tag
(
dbg_info
*
db
,
ir_graph
*
irg
,
type
*
symbol
,
type
*
tp
);
/** Constructor for a SymConst size node.
*
* Same as new_rd_SymConst_type, except that the constructor is tailored for
* symconst_addr_ent.
* Adds the symconst to the start block of irg. */
ir_node
*
new_rd_SymConst_size
(
dbg_info
*
db
,
ir_graph
*
irg
,
type
*
symbol
,
type
*
tp
);
/** Constructor for a Sel node.
*
...
...
@@ -1975,7 +2006,7 @@ ir_node *new_r_Const (ir_graph *irg, ir_node *block,
* @param symkind The kind of the symbolic constant: type_tag, size or link_info.
*/
ir_node
*
new_r_SymConst
(
ir_graph
*
irg
,
ir_node
*
block
,
symconst_symbol
value
,
symconst_kind
symkind
);
union
symconst_symbol
value
,
symconst_kind
symkind
);
/** Constructor for a Sel node.
*
...
...
@@ -2682,12 +2713,12 @@ ir_node *new_d_Const (dbg_info* db, ir_mode *mode, tarval *con);
* @param tp The source type of the constant.
*
*/
ir_node
*
new_d_SymConst_type
(
dbg_info
*
db
,
symconst_symbol
value
,
symconst_kind
kind
,
type
*
tp
);
ir_node
*
new_d_SymConst_type
(
dbg_info
*
db
,
union
symconst_symbol
value
,
symconst_kind
kind
,
type
*
tp
);
/** Constructor for a SymConst node.
*
* Same as new_d_SymConst_type, except that it sets the type to type_unknown. */
ir_node
*
new_d_SymConst
(
dbg_info
*
db
,
symconst_symbol
value
,
symconst_kind
kind
);
ir_node
*
new_d_SymConst
(
dbg_info
*
db
,
union
symconst_symbol
value
,
symconst_kind
kind
);
/** Constructor for a simpleSel node.
*
...
...
@@ -3393,7 +3424,7 @@ ir_node *new_Const (ir_mode *mode, tarval *con);
* @param symkind The kind of the symbolic constant: symconst_type_tag, symconst_size or symconst_addr_name.
*
*/
ir_node
*
new_SymConst
(
symconst_symbol
value
,
symconst_kind
kind
);
ir_node
*
new_SymConst
(
union
symconst_symbol
value
,
symconst_kind
kind
);
/** Constructor for a simpelSel node.
*
...
...
ir/ir/irnode.h
View file @
5b567bb7
...
...
@@ -426,10 +426,6 @@ type *get_SymConst_type (ir_node *node);
void
set_SymConst_type
(
ir_node
*
node
,
type
*
tp
);
/** Only to access SymConst of kind addr_name. Else assertion: */
/* old:
ident *get_SymConst_ptrinfo (ir_node *node);
void set_SymConst_ptrinfo (ir_node *node, ident *ptrinfo);
*/
#define get_SymConst_ptrinfo get_SymConst_name
#define set_SymConst_ptrinfo set_SymConst_name
ident
*
get_SymConst_name
(
ir_node
*
node
);
...
...
@@ -441,10 +437,10 @@ void set_SymConst_entity (ir_node *node, entity *ent);
/** Sets both: type and ptrinfo. Needed to treat the node independent of
its semantics. Does a memcpy for the memory sym points to. */
#define get_SymConst_type_or_id get_SymConst_symbol
#define set_S
ym
C
onst_
type_or_id s
et_SymConst_symbol
symconst_symbol
g
et_SymConst_symbol
(
ir_node
*
node
);
void
set_SymConst_symbol
(
ir_node
*
node
,
symconst_symbol
sym
);
/* write 'union': firmjni then does not create a method... */
union
s
ym
c
onst_
symbol
g
et_SymConst_symbol
(
ir_node
*
node
);
void
s
et_SymConst_symbol
(
ir_node
*
node
,
union
symconst_symbol
sym
);
ir_node
*
get_Sel_mem
(
ir_node
*
node
);
void
set_Sel_mem
(
ir_node
*
node
,
ir_node
*
mem
);
...
...
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