>
> And the code crashes at the macro FOR_EACH_BB_FN.. This is exatly as
> it is implemented in cgraph_create_edges() function.. but I think that
> the problem is because I call it at wrong time (too early, or too late
> - before or after parsing).. Could it be?

Yes.  You can start by calling it in the same place cgraph_create_edges ()
is been called. (cgraph_analyze_function ())

> When cgraph_create_edges() function is called it is passed a
> function's declaration tree. In my case I also pass a function
> declaration tree:
>
> this_cfun = DECL_STRUCT_FUNCTION(current_function_decl);

Check if current_function_decl is actually set when you access it.
You can learn more by looking at the function that calls
cgraph_create_edges()
which sets current_function_decl.

Revital

Reply via email to