GCC Middle and Back End API Reference
|
Go to the source code of this file.
Data Structures | |
struct | expr_eval_op |
struct | condition |
struct | inline_param_summary |
class | ipa_predicate |
Typedefs | |
typedef vec< expr_eval_op, va_gc > * | expr_eval_ops |
typedef vec< condition, va_gc > * | conditions |
typedef uint32_t | clause_t |
Functions | |
void | dump_condition (FILE *f, conditions conditions, int cond) |
ipa_predicate | add_condition (ipa_fn_summary *summary, ipa_node_params *params_summary, int operand_num, tree type, struct agg_position_info *aggpos, enum tree_code code, tree val, expr_eval_ops param_ops=NULL) |
typedef uint32_t clause_t |
Predicates are used to represent function parameters (such as runtime) which depend on a context function is called in. Predicates are logical formulas in conjunctive-disjunctive form consisting of clauses which are bitmaps specifying a set of condition that must be true for a clause to be satisfied. Physically they are represented as array of clauses terminated by 0. In order to make predicate (possibly) true, all of its clauses must be (possibly) true. To make clause (possibly) true, one of conditions it mentions must be (possibly) true. There are fixed bounds on number of clauses and conditions and all the manipulation functions are conservative in positive direction. I.e. we may lose precision by thinking that predicate may be true even when it is not.
typedef vec<condition, va_gc>* conditions |
typedef vec<expr_eval_op, va_gc>* expr_eval_ops |
ipa_predicate add_condition | ( | class ipa_fn_summary * | summary, |
class ipa_node_params * | params_summary, | ||
int | operand_num, | ||
tree | type, | ||
struct agg_position_info * | aggpos, | ||
enum tree_code | code, | ||
tree | val, | ||
expr_eval_ops | param_ops ) |
Add condition to condition list SUMMARY. OPERAND_NUM, TYPE, CODE, VAL and PARAM_OPS correspond to fields of condition structure. AGGPOS describes whether the used operand is loaded from an aggregate and where in the aggregate it is. It can be NULL, which means this not a load from an aggregate.
References agg_position_info::agg_contents, condition::agg_contents, agg_position_info::by_ref, condition::by_ref, condition::code, ipa_fn_summary::conds, expr_eval_ops_equal_p(), ipa_predicate::first_dynamic_condition, gcc_checking_assert, i, ipa_set_param_used_by_ipa_predicates(), ipa_predicate::num_conditions, agg_position_info::offset, condition::offset, offset, condition::operand_num, condition::param_ops, ipa_predicate::predicate_testing_cond(), condition::type, types_compatible_p(), unshare_expr_without_location(), condition::val, expr_eval_op::val, vec_safe_copy(), vec_safe_iterate(), vec_safe_push(), and vrp_operand_equal_p().
Referenced by analyze_function_body(), ipa_predicate::remap_after_inlining(), set_cond_stmt_execution_predicate(), set_switch_stmt_execution_predicate(), will_be_nonconstant_expr_predicate(), and will_be_nonconstant_predicate().
void dump_condition | ( | FILE * | f, |
conditions | conditions, | ||
int | cond ) |
Dump conditional COND.
References condition::agg_contents, condition::by_ref, CASE_CONVERT, ipa_predicate::changed, condition::code, expr_eval_op::code, ipa_predicate::false_condition, ipa_predicate::first_dynamic_condition, get_tree_code_name(), HOST_WIDE_INT_PRINT_DEC, i, expr_eval_op::index, ipa_predicate::is_not_constant, ipa_predicate::not_inlined_condition, ipa_predicate::not_sra_candidate, condition::offset, op_symbol_code(), condition::operand_num, condition::param_ops, print_generic_expr(), expr_eval_op::type, condition::val, expr_eval_op::val, and vec_safe_length().
Referenced by dump_clause(), and ipa_call_context::estimate_size_and_time().