/* register new space for every node */
-unsigned register_additional_node_data(unsigned size) {
+unsigned firm_register_additional_node_data(unsigned size) {
assert(!forbid_new_data && "Too late to register additional node data");
if (forbid_new_data)
* If arity is negative, a node with a dynamic array is created.
*/
ir_node *
-new_ir_node (dbg_info *db, ir_graph *irg, ir_node *block, ir_op *op, ir_mode *mode,
- int arity, ir_node **in)
+new_ir_node(dbg_info *db, ir_graph *irg, ir_node *block, ir_op *op, ir_mode *mode,
+ int arity, ir_node **in)
{
ir_node *res;
size_t node_size = offsetof(ir_node, attr) + op->attr_size + firm_add_node_size;
ir_node *
get_nodes_block(const ir_node *node) {
assert(node->op != op_Block);
- assert(is_irn_pinned_in_irg(node) && "block info may be incorrect");
return get_irn_n(node, -1);
}
return block->attr.block.irg;
}
+int has_Block_label(const ir_node *block) {
+ assert(is_Block(block));
+ return block->attr.block.has_label;
+}
+
+ir_label_t get_Block_label(const ir_node *block) {
+ assert(is_Block(block));
+ return block->attr.block.label;
+}
+
+void set_Block_label(ir_node *block, ir_label_t label) {
+ assert(is_Block(block));
+ block->attr.block.has_label = 1;
+ block->attr.block.label = label;
+}
+
int
get_End_n_keepalives(ir_node *end) {
assert(end->op == op_End);
node->attr.symc.sym = sym;
}
+ir_label_t get_SymConst_label(const ir_node *node) {
+ assert(node->op == op_SymConst && SYMCONST_HAS_LABEL(get_SymConst_kind(node)));
+ return node->attr.symc.sym.label;
+}
+
+void set_SymConst_label(ir_node *node, ir_label_t label) {
+ assert(node->op == op_SymConst && SYMCONST_HAS_LABEL(get_SymConst_kind(node)));
+ node->attr.symc.sym.label = label;
+}
+
ir_type *
get_SymConst_value_type(ir_node *node) {
assert(node->op == op_SymConst);
node->attr.load.volatility = volatility;
}
+ir_align
+get_Load_align(ir_node *node) {
+ assert(node->op == op_Load);
+ return node->attr.load.aligned;
+}
+
+void
+set_Load_align(ir_node *node, ir_align align) {
+ assert(node->op == op_Load);
+ node->attr.load.aligned = align;
+}
+
ir_node *
get_Store_mem(ir_node *node) {
node->attr.store.volatility = volatility;
}
+ir_align
+get_Store_align(ir_node *node) {
+ assert(node->op == op_Store);
+ return node->attr.store.aligned;
+}
+
+void
+set_Store_align(ir_node *node, ir_align align) {
+ assert(node->op == op_Store);
+ node->attr.store.aligned = align;
+}
+
ir_node *
get_Alloc_mem(ir_node *node) {
return _is_Or(node);
}
+int
+(is_Eor)(const ir_node *node) {
+ return _is_Eor(node);
+}
+
int
(is_Sub)(const ir_node *node) {
return _is_Sub(node);
}
+int
+(is_Not)(const ir_node *node) {
+ return _is_Not(node);
+}
+
+int
+(is_Psi)(const ir_node *node) {
+ return _is_Psi(node);
+}
+
int
(is_Tuple)(const ir_node *node) {
return _is_Tuple(node);
return ops;
}
+/* Sets the debug information of a node. */
+void (set_irn_dbg_info)(ir_node *n, dbg_info *db) {
+ _set_irn_dbg_info(n, db);
+}
+
+/**
+ * Returns the debug information of an node.
+ *
+ * @param n The node.
+ */
+dbg_info *(get_irn_dbg_info)(const ir_node *n) {
+ return _get_irn_dbg_info(n);
+}
+
+
+
#ifdef DEBUG_libfirm
void dump_irn(ir_node *n) {
int i, arity = get_irn_arity(n);