1 #ifndef _IRBACKEDGE_T_H_
2 #define _IRBACKEDGE_T_H_
6 static INLINE int * new_backedge_arr(struct obstack *obst, int size) {
7 int *res = NEW_ARR_D (int, obst, size);
8 memset(res, 0, sizeof(int) * size);
13 static INLINE void fix_backedges(struct obstack *obst, ir_node *n) {
14 opcode opc = get_irn_opcode(n);
16 if (opc == iro_Phi) arr = &n->attr.phi_backedge;
17 if ((opc == iro_Block) && !interprocedural_view)
18 arr = &n->attr.block.backedge;
19 if ((opc == iro_Block) && interprocedural_view)
20 arr = &n->attr.block.cg_backedge;
21 if (opc == iro_Filter) arr = &n->attr.filter.backedge;
23 if (ARR_LEN(arr) != ARR_LEN(get_irn_in(n))-1)
24 *arr = new_backedge_arr(obst, ARR_LEN(get_irn_in(n))-1);
27 #endif /* _IRBACKEDGE_T_H_ */