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
d905c366
Commit
d905c366
authored
Jun 06, 2008
by
Michael Beck
Browse files
is_self_recursive_Call() added
[r19989]
parent
637548dc
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/libfirm/irnode.h
View file @
d905c366
...
...
@@ -645,6 +645,12 @@ void set_Call_type(ir_node *node, ir_type *tp);
/** Gets the arity of a call. Identical to get_Call_n_params(). */
int
get_Call_arity
(
const
ir_node
*
node
);
/**
* Returns non-zero if a Call is surely a self-recursive Call.
* Beware: if this functions returns 0, the call might be self-recursive!
*/
int
is_self_recursive_Call
(
const
ir_node
*
call
);
/** Set, get and remove the callee information for a Call node.
*
* The callee information lists all method entities that can be called
...
...
ir/ir/irnode.c
View file @
d905c366
...
...
@@ -1412,6 +1412,21 @@ void set_CallBegin_call(ir_node *node, ir_node *call) {
node
->
attr
.
callbegin
.
call
=
call
;
}
/*
* Returns non-zero if a Call is surely a self-recursive Call.
* Beware: if this functions returns 0, the call might be self-recursive!
*/
int
is_self_recursive_Call
(
const
ir_node
*
call
)
{
const
ir_node
*
callee
=
get_Call_ptr
(
call
);
if
(
is_SymConst_addr_ent
(
callee
))
{
const
ir_entity
*
ent
=
get_SymConst_entity
(
callee
);
const
ir_graph
*
irg
=
get_entity_irg
(
ent
);
if
(
irg
==
get_irn_irg
(
call
))
return
1
;
}
return
0
;
}
#define BINOP(OP) \
ir_node * get_##OP##_left(const ir_node *node) { \
...
...
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