Hi, I need to do the following. I want to at run time run a data correction pass on some of my integer arrays. As the data needs correctioin often, it needs to be done just before the use of such an array. I am trying to do this in gcc by inserting a function (convert(int *)) just before such a use. But then I need extract the argument from the assignment and pass it to this function. Can anyone give me pointers to how I can pass an argument after extracting it from a assignment statement. I successfully extracted the operand but have difficulty passing it as an argument. i would appreciate any suggestions/help/pointers to similar code
thanks Shrey ps: If anyone would want to see what I am doing, here it is, get_stmt_operands(stmt) FOR_EACH_SSA_OPERAND(op,stmt,iter,SSA_OP_USE) { tree id =get_identifier("convert") tree t_list=build_function_type_list(void_type_node,TREE_TYPE(op)) tree decl=build_decl(FUNCTION_DECL,id,t_list); call=build_function_call_expr(decl,op) gimplify_to_stmt_list(&call) bsi_insert_before(iter,call,BSI_SAME_STMT) }