Hi, > I'm trying to add a simple function to the callgraph using > cgraph_add_new_function() ( new function body is obtained by function > actually processed) . > I put my pass in pass_tree_loop.sub as first pass just after > pass_tree_loop_init pass, but I have some problems because the code > that I put into the new function ( using move_sese_region_to_fn() ) is > already in ssa form. > Unfortunately I have to use gcc version 4.2.2 and so I think that the > only solution is to put the code out of the ssa form.
if at all possible, try to use the mainline for new development (it will usually make your life much easier, and it will also make it possible to contribute any bugfixes/improvements you may make during your project, whatever it is). That being said, if for whatever reason you cannot affect this decision, have a look at parloop branch (tree-outof-ssa.c:go_out_of_ssa and its users) -- the early version of loop parallelization had to solve the same problem, Zdenek