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
31f34dc0
Commit
31f34dc0
authored
Feb 12, 2007
by
Christian Würdig
Browse files
added function to get a user Proj with a certain proj num from a mode_T node
parent
6be08f9b
Changes
2
Hide whitespace changes
Inline
Side-by-side
ir/be/beutil.c
View file @
31f34dc0
...
...
@@ -20,6 +20,7 @@
#include "irgopt.h"
#include "irtools.h"
#include "irprintf.h"
#include "iredges.h"
#include "beutil.h"
#include "besched_t.h"
...
...
@@ -225,3 +226,21 @@ ir_node *dom_up_search(pset *accept, ir_node *start_point_exclusive) {
else
return
NULL
;
/* this was the start block and we did not find an acceptable irn */
}
/**
* Gets the Proj with number pn from irn.
*/
ir_node
*
be_get_Proj_for_pn
(
const
ir_node
*
irn
,
long
pn
)
{
const
ir_edge_t
*
edge
;
ir_node
*
proj
;
assert
(
get_irn_mode
(
irn
)
==
mode_T
&&
"need mode_T"
);
foreach_out_edge
(
irn
,
edge
)
{
proj
=
get_edge_src_irn
(
edge
);
if
(
get_Proj_proj
(
proj
)
==
pn
)
return
proj
;
}
return
NULL
;
}
ir/be/beutil.h
View file @
31f34dc0
...
...
@@ -132,4 +132,9 @@ void be_kill_node(ir_node *irn);
*/
ir_node
*
dom_up_search
(
pset
*
accept
,
ir_node
*
start_point_exclusive
);
/**
* Gets the Proj with number pn from irn.
*/
ir_node
*
be_get_Proj_for_pn
(
const
ir_node
*
irn
,
long
pn
);
#endif
/* _BEUTIL_H */
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