- changed handling of Mux nodes: these are now optimized using the iropt instead...
[libfirm] / ir / ir / irnode_t.h
index ddf15fe..b824f61 100644 (file)
@@ -99,6 +99,14 @@ ir_op_ops *firm_set_default_get_type_attr(ir_opcode code, ir_op_ops *ops);
  */
 ir_op_ops *firm_set_default_get_entity_attr(ir_opcode code, ir_op_ops *ops);
 
+/**
+ * Returns an array with the predecessors of the Block. Depending on
+ * the implementation of the graph data structure this can be a copy of
+ * the internal representation of predecessors as well as the internal
+ * array itself. Therefore writing to this array might obstruct the IR.
+ */
+ir_node **get_Block_cfgpred_arr(ir_node *node);
+
 /*-------------------------------------------------------------------*/
 /*  These function are most used in libfirm.  Give them as static    */
 /*  functions so they can be inlined.                                */
@@ -497,6 +505,12 @@ _is_Carry(const ir_node *node) {
        return (_get_irn_op(node) == op_Carry);
 }
 
+static inline int
+_is_Borrow(const ir_node *node) {
+       assert(node);
+       return (_get_irn_op(node) == op_Borrow);
+}
+
 static inline int
 _is_And(const ir_node *node) {
        assert(node);
@@ -798,7 +812,7 @@ _get_Block_cfgpred(const ir_node *node, int pos) {
  *    We walk from the predecessor to the next pinned node
  *    (skip_Proj) and return the block that node is in.
  *  - If we encounter the Bad node, this function does not return
- *    Start, but the Bad node.
+ *    the Start block, but the Bad node.
  */
 static inline ir_node  *
 _get_Block_cfgpred_block(const ir_node *node, int pos) {
@@ -1085,6 +1099,7 @@ _is_arg_Proj(const ir_node *node) {
 #define is_Quot(node)                         _is_Quot(node)
 #define is_Add(node)                          _is_Add(node)
 #define is_Carry(node)                        _is_Carry(node)
+#define is_Borrow(node)                       _is_Borrow(node)
 #define is_And(node)                          _is_And(node)
 #define is_Or(node)                           _is_Or(node)
 #define is_Eor(node)                          _is_Eor(node)