PIPS
|
Methods to get parent information constructed during recursion. More...
Functions | |
gen_chunk * | gen_get_recurse_previous_visited_object (void) |
Get the previously visited object. More... | |
gen_chunk * | gen_get_recurse_current_ancestor (void) |
Get the ancestor of the current object. More... | |
gen_chunk * | gen_get_recurse_ancestor (const void *object) |
Get the first ancestor object encountered during the recursion for the given object. More... | |
gen_chunk * | gen_get_ancestor (int type, const void *obj) |
return the first ancestor object found of the given type. More... | |
gen_chunk * | gen_get_current_object (void) |
return the current visited object, or NULL if not in a recursion. More... | |
gen_chunk * | gen_get_current_ancestor (int type) |
Return current object of that type... More... | |
Methods to get parent information constructed during recursion.
To have example of usage, have a look at the caller-graph in the Doxygen documentation of its functions, for example gen_get_recurse_ancestor(), that will point you to phases such as try_to_recover_for_loop_in_a_while().
return the first ancestor object found of the given type.
type | newgen domain of the ancestor looked for. |
object | we want the ancestor of. |
maybe it could move the search in the upper recursion if any...
Definition at line 3560 of file genClib.c.
References current_mrc, hash_get(), HASH_UNDEFINED_VALUE, gen_chunk::i, message_assert, and multi_recurse::seen.
Referenced by add_loop_parallel_threshold(), build_outer(), call_flt(), check_ref(), compute_cumulated_reductions(), do_check_isolate_statement_preconditions_on_call(), do_delay_communications_interprocedurally(), do_grouping_filter_out_self(), do_loop_nest_unswitching(), do_outliner_smart_replacment(), do_remove_redundant_communications_in_forloop(), do_remove_redundant_communications_in_loop(), do_remove_redundant_communications_in_whileloop(), entity_from_user_name(), find_loop_from_label_walker(), find_pragma(), fsi_stmt_flt(), gen_get_current_ancestor(), inline_statement_crawler(), inner_rewrite(), insert_optional_pragma(), isolate_patch_reference(), live_in_paths_of_loop(), live_in_paths_of_whileloop(), live_out_paths_from_call_site_to_callee(), live_out_paths_from_forloop_to_body(), live_out_paths_from_loop_to_body(), live_out_paths_from_test_to_branches(), live_out_paths_from_unstructured_to_nodes(), live_out_paths_from_whileloop_to_body(), live_paths_from_block_to_statements(), loop_annotate(), loop_push(), reference_written_p(), rename_reference(), replace_entities_expression_walker(), rssp_ref(), simplify_subscript(), statement_filter(), statement_purge_declarations_walker(), and subtsitute_variable_in_reference().
Return current object of that type...
or NULL if none found
Definition at line 3587 of file genClib.c.
References current, gen_get_ancestor(), and gen_get_current_object().
Referenced by glc_call(), glc_cast(), and glc_ref().
gen_chunk* gen_get_current_object | ( | void | ) |
return the current visited object, or NULL if not in a recursion.
Ok, we should have it, but its name may not be known in a macro, or deep in a called function...
Definition at line 3580 of file genClib.c.
References multi_recurse::current, and current_mrc.
Referenced by gen_get_current_ancestor().
gen_chunk* gen_get_recurse_ancestor | ( | const void * | object | ) |
Get the first ancestor object encountered during the recursion for the given object.
The heritage relation is built during the top-down phase (the filter-down phase), so if the objects are rewriten during the top-down rewriting phase (that should never happend, rewrite should be performed on the bottom-up pass, when the "rewrite" function is called), the heritage relation are not up-to-date for these objects.
is
the object we want the ancestor
Definition at line 3546 of file genClib.c.
References current_mrc, hash_get(), message_assert, and multi_recurse::seen.
Referenced by replace_field_by_reference_walker(), transform_a_for_loop_into_a_while_loop(), and try_to_transform_a_for_loop_into_a_do_loop().
gen_chunk* gen_get_recurse_current_ancestor | ( | void | ) |
Get the ancestor of the current object.
Definition at line 3526 of file genClib.c.
References current_mrc, message_assert, stack_head(), and multi_recurse::upwards.
Referenced by if_conv_init_statement().
gen_chunk* gen_get_recurse_previous_visited_object | ( | void | ) |
Get the previously visited object.
It may be a sibling, a parent, or an child.
Definition at line 3513 of file genClib.c.
References current_mrc, message_assert, and multi_recurse::previous.