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
e94498b4
Commit
e94498b4
authored
May 28, 2007
by
Christoph Mallon
Browse files
Constify.
[r14066]
parent
d9d1a79a
Changes
3
Hide whitespace changes
Inline
Side-by-side
ir/ir/irnode.c
View file @
e94498b4
...
...
@@ -1037,7 +1037,7 @@ set_Return_res(ir_node *node, int pos, ir_node *res){
set_irn_n
(
node
,
pos
+
RETURN_RESULT_OFFSET
,
res
);
}
tarval
*
(
get_Const_tarval
)(
ir_node
*
node
)
{
tarval
*
(
get_Const_tarval
)(
const
ir_node
*
node
)
{
return
_get_Const_tarval
(
node
);
}
...
...
@@ -1579,7 +1579,7 @@ get_Phi_preds_arr(ir_node *node) {
}
int
get_Phi_n_preds
(
ir_node
*
node
)
{
get_Phi_n_preds
(
const
ir_node
*
node
)
{
assert
(
is_Phi
(
node
)
||
is_Phi0
(
node
));
return
(
get_irn_arity
(
node
));
}
...
...
@@ -1591,7 +1591,7 @@ void set_Phi_n_preds(ir_node *node, int n_preds) {
*/
ir_node
*
get_Phi_pred
(
ir_node
*
node
,
int
pos
)
{
get_Phi_pred
(
const
ir_node
*
node
,
int
pos
)
{
assert
(
is_Phi
(
node
)
||
is_Phi0
(
node
));
return
get_irn_n
(
node
,
pos
);
}
...
...
ir/ir/irnode.h
View file @
e94498b4
...
...
@@ -483,7 +483,7 @@ typedef enum {
CNST_NO_CONST
=
4
/**< The node is no const at all. */
}
cnst_classify_t
;
tarval
*
get_Const_tarval
(
ir_node
*
node
);
tarval
*
get_Const_tarval
(
const
ir_node
*
node
);
void
set_Const_tarval
(
ir_node
*
node
,
tarval
*
con
);
/**
...
...
@@ -899,8 +899,8 @@ int is_Phi(const ir_node *n);
int
is_Phi0
(
const
ir_node
*
n
);
/* These routines also work for Filter nodes in interprocedural view. */
ir_node
**
get_Phi_preds_arr
(
ir_node
*
node
);
int
get_Phi_n_preds
(
ir_node
*
node
);
ir_node
*
get_Phi_pred
(
ir_node
*
node
,
int
pos
);
int
get_Phi_n_preds
(
const
ir_node
*
node
);
ir_node
*
get_Phi_pred
(
const
ir_node
*
node
,
int
pos
);
void
set_Phi_pred
(
ir_node
*
node
,
int
pos
,
ir_node
*
pred
);
ir_node
*
get_Filter_pred
(
ir_node
*
node
);
...
...
ir/ir/irnode_t.h
View file @
e94498b4
...
...
@@ -919,7 +919,7 @@ _is_Block_dead(const ir_node *block) {
}
}
static
INLINE
tarval
*
_get_Const_tarval
(
ir_node
*
node
)
{
static
INLINE
tarval
*
_get_Const_tarval
(
const
ir_node
*
node
)
{
assert
(
_get_irn_op
(
node
)
==
op_Const
);
return
node
->
attr
.
con
.
tv
;
}
...
...
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