FIRM_API int is_Start(const ir_node *node);
/** Returns true if node is an End node. */
FIRM_API int is_End(const ir_node *node);
-/** Returns true if node is an EndExcept node. */
-FIRM_API int is_EndExcept(const ir_node *node);
-/** Returns true if node is an EndReg node. */
-FIRM_API int is_EndReg(const ir_node *node);
/** Returns true if node is a Minus node. */
FIRM_API int is_Minus(const ir_node *node);
/** Returns true if node is a Abs node. */
FIRM_API int is_Proj(const ir_node *node);
/** Returns true if the operation manipulates control flow:
- Start, End, Jmp, Cond, Return, Raise, Bad, EndReg, EndExcept */
+ Start, End, Jmp, Cond, Return, Raise, Bad */
FIRM_API int is_cfop(const ir_node *node);
-/** Returns true if the operation manipulates control flow: EndReg, EndExcept */
-FIRM_API int is_ip_cfop(const ir_node *node);
/** Returns true if the operation can change the control flow because
of an exception: Call, Quot, DivMod, Div, Mod, Load, Store, Alloc,
Bad. Raise is not fragile, but a unconditional jump. */
/**
* Returns non-zero if n is possible loop head of an endless loop.
- * I.e., it is a Block, Phi or Filter node and has only predecessors
+ * I.e., it is a Block or Phi node and has only predecessors
* within the loop.
* @arg root: only needed for assertion.
*/
/**
* Return non-zero if the given node is a legal loop header:
- * Block, Phi, Filter.
+ * Block, Phi
*
* @param n the node to check
*/
}
/**
- * Returns non-zero if n is a loop header, i.e., it is a Block, Phi
- * or Filter node and has predecessors within the loop and out
- * of the loop.
+ * Returns non-zero if n is a loop header, i.e., it is a Block or Phi
+ * node and has predecessors within the loop and out of the loop.
*
* @param n the node to check
* @param root only needed for assertion.
/**
* Returns non-zero if n is possible loop head of an endless loop.
- * I.e., it is a Block, Phi or Filter node and has only predecessors
+ * I.e., it is a Block or Phi node and has only predecessors
* within the loop.
*
* @param n the node to check
return is_outermost_Start(n) ? NULL : get_irn_n(m, res_index);
}
-
-#if EXPERIMENTAL_LOOP_TREE
-
-/* ----------------------------------------------------------------
- AS: This is experimental code to build loop trees suitable for
- the heap analysis. Does not work correctly right now... :-(
-
-
- Search in stack for the corresponding first Call-End-ProjX that
- corresponds to one of the control flow predecessors of the given
- block, that is the possible callers.
- returns: the control predecessor to chose\
- or -1 if no corresponding Call-End-Node could be found
- on the stack.
- - -------------------------------------------------------------- */
-
-int search_endproj_in_stack(ir_node *start_block)
-{
- int i, j;
- assert(is_Block(start_block));
- for (i = tos - 1; i >= 0; --i)
- {
- if (get_irn_op(stack[i]) == op_Proj && get_irn_mode(stack[i]) == mode_X &&
- get_irn_op(get_irn_n(stack[i], 0)) == op_EndReg)
- {
- printf("FOUND PROJ!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
- ir_node *end_projx = stack[i];
-
- int arity = get_irn_arity(start_block);
- for (j = 0; j < arity; j++)
- {
- ir_node *begin_projx = get_Block_cfgpred(get_irg_start_block(get_irn_irg(end_projx)),
- get_Proj_proj(end_projx));
- if (get_irn_n(start_block, j) == begin_projx)
- {
- printf("FOUND IT!!!!!!!!!!!!!!!!!!\n");
- return(j);
- }
- }
- }
- }
- return(-1);
-}
-
-
-static pmap *projx_link = NULL;
-
-void link_to_reg_end (ir_node *n, void *env)
-{
- if (get_irn_op(n) == op_Proj &&
- get_irn_mode(n) == mode_X &&
- get_irn_op(get_irn_n(n, 0)) == op_EndReg) {
- /* Reg End Projx -> Find the CallBegin Projx and hash it */
- ir_node *end_projx = n;
- ir_node *begin_projx = get_Block_cfgpred(get_irg_start_block(get_irn_irg(end_projx)),
- get_Proj_proj(end_projx));
- set_projx_link(begin_projx, end_projx);
- }
-}
-
-void set_projx_link(ir_node *cb_projx, ir_node *end_projx)
-{
- if (projx_link == NULL)
- projx_link = pmap_create();
- pmap_insert(projx_link, (void *)cb_projx, (void *)end_projx);
-}
-
-ir_node *get_projx_link(ir_node *cb_projx)
-{
- return((ir_node *) pmap_get(projx_link, (void *)cb_projx));
-}
-
-#endif
-
static inline int is_outermost_loop(ir_loop *l)
{
return l == get_loop_outer_loop(l);
}
-
/*-----------------------------------------------------------*
* The core algorithm. *
*-----------------------------------------------------------*/
/* TODO: Check, if there can be information derived from any of these:
is_Abs(node) is_Alloc(node) is_Anchor(node) is_Borrow(node) is_Bound(node)
- is_Break(node) is_Builtin(node) is_Call(node) is_CallBegin(node)
+ is_Break(node) is_Builtin(node) is_Call(node)
is_Carry(node) is_Cast(node) is_Cmp(node) is_Cond(node)
is_CopyB(node) is_Div(node) is_DivMod(node) is_Dummy(node)
- is_End(node) is_EndExcept(node) is_EndReg(node) is_Filter(node) is_Free(node)
+ is_End(node) is_Free(node)
is_IJmp(node) is_InstOf(node) is_Jmp(node) is_Load(node) is_Minus(node)
is_Mod(node) is_Mul(node) is_Mulh(node) is_Mux(node) is_NoMem(node)
is_Pin(node) is_Proj(node) is_Quot(node)
ir_type *type; /**< the type of which the object pointer must be */
} io_attr;
-/** Filter attributes. */
-typedef struct {
- long proj; /**< contains the result position to project (Proj) */
- ir_node **in_cg; /**< array with interprocedural predecessors (Phi) */
- unsigned *backedge; /**< Raw Bitfield n set to true if pred n is backedge. */
-} filter_attr;
-
-/** CallBegin attributes. */
-typedef struct {
- ir_node *call; /**< Associated Call-operation. */
-} callbegin_attr;
-
/** Cast attributes. */
typedef struct {
ir_type *type; /**< Type of the casted node. */
sel_attr sel; /**< For Sel. */
call_attr call; /**< For Call. */
builtin_attr builtin; /**< For Builtin. */
- callbegin_attr callbegin; /**< For CallBegin. */
alloc_attr alloc; /**< For Alloc. */
free_attr free; /**< For Free. */
io_attr instof; /**< For InstOf */
phi_attr phi; /**< For Phi. */
long proj; /**< For Proj: contains the result position to project */
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 */
bound_attr bound; /**< For Bound operation */
gendir = argv[2]
# these nodes don't work correctly yet for some reasons...
- niynodes = [ "EndExcept", "EndReg", "ASM" ]
+ niynodes = [ "ASM" ]
# these have custom im-/export code
customcode = [ "Start", "End", "Anchor", "SymConst", "Block" ]