block->attr.block.extblk = extblk;
}
+/* returns the macro block header of a block. */
ir_node *get_Block_MacroBlock(const ir_node *block) {
assert(is_Block(block));
return get_irn_n(block, -1);
}
+/* returns the exception region number of a Block .*/
+unsigned long get_Block_exc_region(const ir_node *block) {
+ assert(is_Block(block));
+ return block->attr.block.exc_region;
+}
+
+/* returns the graph of a Block. */
+ir_graph *get_Block_irg(const ir_node *block) {
+ assert(is_Block(block));
+ return block->attr.block.irg;
+}
+
int
get_End_n_keepalives(ir_node *end) {
assert(end->op == op_End);
set_irn_n(node, 0, pred);
}
-long get_VProj_proj(const ir_node *node)
-{
- return node->attr.proj;
-}
-
-void set_VProj_proj(ir_node *node, long value)
-{
- node->attr.proj = value;
-}
-
long
get_Proj_proj(const ir_node *node) {
assert(is_Proj(node));
node->attr.proj = proj;
}
+long get_VProj_proj(const ir_node *node) {
+ return node->attr.proj;
+}
+
+void set_VProj_proj(ir_node *node, long value) {
+ node->attr.proj = value;
+}
+
ir_node **
get_Tuple_preds_arr(ir_node *node) {
assert(node->op == op_Tuple);
set_irn_n(node, 0, bound);
}
-pn_Cmp get_Confirm_cmp(ir_node *node) {
+pn_Cmp get_Confirm_cmp(const ir_node *node) {
assert(node->op == op_Confirm);
- return node->attr.confirm_cmp;
+ return node->attr.confirm.cmp;
}
void set_Confirm_cmp(ir_node *node, pn_Cmp cmp) {
assert(node->op == op_Confirm);
- node->attr.confirm_cmp = cmp;
+ node->attr.confirm.cmp = cmp;
+}
+
+unsigned long get_Confirm_region(const ir_node *node) {
+ assert(node->op == op_Confirm);
+ return node->attr.confirm.exc_region;
}
+void set_Confirm_region(ir_node *node, unsigned long region) {
+ assert(node->op == op_Confirm);
+ node->attr.confirm.exc_region = region;
+}
ir_node *
get_Filter_pred(ir_node *node) {
return _is_Sub(node);
}
+int
+(is_Tuple)(const ir_node *node) {
+ return _is_Tuple(node);
+}
+
int
(is_Start)(const ir_node *node) {
return _is_Start(node);
ir_extblk *extblk; /**< The extended basic block this block belongs to. */
ir_region *region; /**< The immediate structural region this block belongs to. */
unsigned mb_depth; /**< The macroblock depth: A distance from the macroblock header */
+ unsigned long exc_region; /**< The exception region number for this block. */
struct list_head succ_head; /**< A list head for all successor edges of a block. */
} block_attr;
} phi0_attr;
-typedef pn_Cmp confirm_attr; /**< Attribute to hold compare operation */
+/**< Confirm attribute. */
+typedef struct {
+ pn_Cmp cmp; /**< The compare operation. */
+ unsigned long exc_region; /**< If non-null: the region for which this confirm is restricted to. */
+} confirm_attr;
/** CopyB attribute. */
typedef struct {
Field n set to true if pred n is backedge.
@todo Ev. replace by bitfield! */
long proj; /**< For Proj: contains the result position to project */
- confirm_attr confirm_cmp; /**< For Confirm: compare operation */
+ confirm_attr confirm; /**< For Confirm: compare operation and region. */
filter_attr filter; /**< For Filter */
except_attr except; /**< For Phi node construction in case of exceptions */
copyb_attr copyb; /**< For CopyB operation */
return (_get_irn_op(node) == op_Sub);
}
+static INLINE int
+_is_Tuple(const ir_node *node) {
+ assert(node);
+ return (_get_irn_op(node) == op_Tuple);
+}
+
static INLINE int
_is_Start(const ir_node *node) {
assert(node);
#define is_Quot(node) _is_Quot(node)
#define is_Add(node) _is_Add(node)
#define is_Sub(node) _is_Sub(node)
+#define is_Tuple(node) _is_Tuple(node)
#define is_no_Block(node) _is_no_Block(node)
#define is_Block(node) _is_Block(node)
#define get_Block_n_cfgpreds(node) _get_Block_n_cfgpreds(node)