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
a12363c5
Commit
a12363c5
authored
Oct 03, 2007
by
Michael Beck
Browse files
added get_nodes_MacroBlock()
[r16060]
parent
60d329a2
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/libfirm/irnode.h
View file @
a12363c5
...
...
@@ -283,6 +283,19 @@ ir_node *get_nodes_block (const ir_node *node);
/** Sets the Block of a node. */
void
set_nodes_block
(
ir_node
*
node
,
ir_node
*
block
);
/**
* Return the MacroBlock the node belongs to. This is only
* possible for pinned nodes or if the graph is in pinned state.
* Otherwise the MacroBlock may be incorrect. This condition is
* now checked by an assertion.
*
* This works for all except Block. It can return Blocks or the Bad node.
*
* To express the difference to access routines that work for all
* nodes we use infix "nodes" and do not name this function
* get_irn_MacroBlock(). */
ir_node
*
get_nodes_MacroBlock
(
const
ir_node
*
node
);
/**
* @function get_irn_block()
* @see get_nodes_block()
...
...
ir/ir/irnode.c
View file @
a12363c5
...
...
@@ -664,6 +664,13 @@ set_nodes_block(ir_node *node, ir_node *block) {
set_irn_n
(
node
,
-
1
,
block
);
}
/* this works for all except Block */
ir_node
*
get_nodes_MacroBlock
(
const
ir_node
*
node
)
{
assert
(
node
->
op
!=
op_Block
);
return
get_Block_MacroBlock
(
get_irn_n
(
node
,
-
1
));
}
/* Test whether arbitrary node is frame pointer, i.e. Proj(pn_Start_P_frame_base)
* from Start. If so returns frame type, else Null. */
ir_type
*
is_frame_pointer
(
ir_node
*
n
)
{
...
...
Write
Preview
Supports
Markdown
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