Hi I am inserting a call stmt in linear_transform_loops. Al though the call statement gets inserted , the compilation breaks. Can some one help me identify if I am missing some information in the call node that I create (thanks Daniel for all the help until now)
here is the set of statements I have used tree id = get_identifier ("foo"); tree t = build_function_type_list (void_type_node,NULL_TREE); tree decl = build_decl (FUNCTION_DECL, id, t); tree call = build_function_call_expr (decl, NULL); bsi_insert_before(&bsi,call,BSI_NEW_STMT); ...Here are the tree dumps of the statement which gets inserted dump of debug_tree() <call_expr 0x401d1478 type <void_type 0x40165460 void VOID align 8 symtab 0 alias set -1 pointer_to_this <pointer_type 0x401654d0>> side-effects arg 0 <addr_expr 0x401d2a78 type <pointer_type 0x401d5000 type <function_type 0x40167460> unsigned SI size <integer_cst 0x40154428 constant invariant 32> unit size <integer_cst 0x40154150 constant invariant 4> align 32 symtab 0 alias set -1> constant invariant arg 0 <function_decl 0x401cdbd0 foo type <function_type 0x40167460> SI file main.c line 15>>> # a_matrixD.1045 = V_MAY_DEF <a_matrixD.1045>; dump of debug_generic_stmt(). foo (); But this breaks with the follwoing path walk_dominator_tree->optimize_stmt->register_definitions_for_stmt->register_new_def ->get_phi_state (var)->var_ann (var)->assert(t) I will really appreciate any solutions or ideas or debugging tips. thanks