projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use corresponding macro.
[libfirm]
/
ir
/
ir
/
irnode_t.h
diff --git
a/ir/ir/irnode_t.h
b/ir/ir/irnode_t.h
index
7c41e03
..
aa70bbd
100644
(file)
--- a/
ir/ir/irnode_t.h
+++ b/
ir/ir/irnode_t.h
@@
-56,7
+56,7
@@
extern unsigned firm_add_node_size;
* @return
* The operations.
*/
* @return
* The operations.
*/
-ir_op_ops *firm_set_default_get_type_attr(
ir_opcode
code, ir_op_ops *ops);
+ir_op_ops *firm_set_default_get_type_attr(
unsigned
code, ir_op_ops *ops);
/**
* Sets the get_entity_attr operation for an ir_op_ops.
/**
* Sets the get_entity_attr operation for an ir_op_ops.
@@
-67,7
+67,7
@@
ir_op_ops *firm_set_default_get_type_attr(ir_opcode code, ir_op_ops *ops);
* @return
* The operations.
*/
* @return
* The operations.
*/
-ir_op_ops *firm_set_default_get_entity_attr(
ir_opcode
code, ir_op_ops *ops);
+ir_op_ops *firm_set_default_get_entity_attr(
unsigned
code, ir_op_ops *ops);
/**
* Returns an array with the predecessors of the Block. Depending on
/**
* Returns an array with the predecessors of the Block. Depending on
@@
-135,7
+135,7
@@
static inline unsigned _get_irn_opcode(const ir_node *node)
*/
static inline int _get_irn_arity(const ir_node *node)
{
*/
static inline int _get_irn_arity(const ir_node *node)
{
- return
ARR_LEN(node->in) - 1
;
+ return
(int)(ARR_LEN(node->in) - 1)
;
}
/**
}
/**
@@
-167,12
+167,12
@@
static inline unsigned hash_irn(const ir_node *node)
}
static inline int _get_irn_deps(const ir_node *node) {
}
static inline int _get_irn_deps(const ir_node *node) {
- return node->deps ? ARR_LEN(node->deps) : 0;
+ return node->deps ?
(int)
ARR_LEN(node->deps) : 0;
}
static inline ir_node *_get_irn_dep(const ir_node *node, int pos) {
assert(node->deps && "dependency array node yet allocated. use add_irn_dep()");
}
static inline ir_node *_get_irn_dep(const ir_node *node, int pos) {
assert(node->deps && "dependency array node yet allocated. use add_irn_dep()");
- assert(pos >= 0 && pos < ARR_LEN(node->deps) && "dependency index out of range");
+ assert(pos >= 0 && pos <
(int)
ARR_LEN(node->deps) && "dependency index out of range");
return node->deps[pos];
}
return node->deps[pos];
}
@@
-184,7
+184,7
@@
static inline void _set_irn_dep(ir_node *node, int pos, ir_node *dep)
ir_node *old;
assert(node->deps && "dependency array node yet allocated. use add_irn_dep()");
ir_node *old;
assert(node->deps && "dependency array node yet allocated. use add_irn_dep()");
- assert(pos >= 0 && pos < ARR_LEN(node->deps) && "dependency index out of range");
+ assert(pos >= 0 && pos <
(int)
ARR_LEN(node->deps) && "dependency index out of range");
old = node->deps[pos];
node->deps[pos] = dep;
edges_notify_edge_kind(node, pos, dep, old, EDGE_KIND_DEP, get_irn_irg(node));
old = node->deps[pos];
node->deps[pos] = dep;
edges_notify_edge_kind(node, pos, dep, old, EDGE_KIND_DEP, get_irn_irg(node));
@@
-432,9
+432,12
@@
static inline int _is_Block_dead(const ir_node *block)
{
ir_op *op = _get_irn_op(block);
{
ir_op *op = _get_irn_op(block);
- if (op == op_Bad)
+ /* we can have Bad, Anchor and Block nodes as block input */
+ if (op == op_Bad) {
return 1;
return 1;
- else {
+ } else if (op == op_Anchor) {
+ return 0;
+ } else {
assert(op == op_Block);
return block->attr.block.is_dead;
}
assert(op == op_Block);
return block->attr.block.is_dead;
}