From ac58418f84f562871be5781e8530a6857b0b810f Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Thu, 22 Jul 2010 19:07:42 +0000 Subject: [PATCH] remove more leftovers from interprocedural view [r27778] --- include/libfirm/irnode.h | 8 +--- ir/ana/callgraph.c | 2 +- ir/ana/irscc.c | 84 ++-------------------------------------- ir/ana/vrp.c | 4 +- ir/ir/irtypes.h | 14 ------- scripts/gen_ir_io.py | 2 +- 6 files changed, 9 insertions(+), 105 deletions(-) diff --git a/include/libfirm/irnode.h b/include/libfirm/irnode.h index e3ce04a37..c9849a26e 100644 --- a/include/libfirm/irnode.h +++ b/include/libfirm/irnode.h @@ -1138,10 +1138,6 @@ FIRM_API int is_NoMem(const ir_node *node); 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. */ @@ -1248,11 +1244,9 @@ FIRM_API int is_InstOf(const ir_node *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. */ diff --git a/ir/ana/callgraph.c b/ir/ana/callgraph.c index 89ab83862..65a6c2f97 100644 --- a/ir/ana/callgraph.c +++ b/ir/ana/callgraph.c @@ -705,7 +705,7 @@ static int is_head(ir_graph *n, ir_graph *root) /** * 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. */ diff --git a/ir/ana/irscc.c b/ir/ana/irscc.c index 86bd927de..6a7dff03f 100644 --- a/ir/ana/irscc.c +++ b/ir/ana/irscc.c @@ -416,7 +416,7 @@ static inline int get_start_index(ir_node *n) /** * Return non-zero if the given node is a legal loop header: - * Block, Phi, Filter. + * Block, Phi * * @param n the node to check */ @@ -428,9 +428,8 @@ static inline int is_possible_loop_head(ir_node *n) } /** - * 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. @@ -469,7 +468,7 @@ static int is_head(ir_node *n, ir_node *root) /** * 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 @@ -630,86 +629,11 @@ static ir_node *find_tail(ir_node *n) 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. * *-----------------------------------------------------------*/ diff --git a/ir/ana/vrp.c b/ir/ana/vrp.c index 9ac342ca5..6a623f089 100644 --- a/ir/ana/vrp.c +++ b/ir/ana/vrp.c @@ -364,10 +364,10 @@ static int vrp_update_node(ir_node *node) /* 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) diff --git a/ir/ir/irtypes.h b/ir/ir/irtypes.h index 169248b22..80345530b 100644 --- a/ir/ir/irtypes.h +++ b/ir/ir/irtypes.h @@ -228,18 +228,6 @@ typedef struct { 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. */ @@ -323,7 +311,6 @@ typedef union { 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 */ @@ -333,7 +320,6 @@ typedef union { 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 */ diff --git a/scripts/gen_ir_io.py b/scripts/gen_ir_io.py index c177f39e1..cec272fe5 100755 --- a/scripts/gen_ir_io.py +++ b/scripts/gen_ir_io.py @@ -229,7 +229,7 @@ def main(argv): 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" ] -- 2.20.1