diff options
author | Martin Liska <mliska@suse.cz> | 2021-11-03 10:38:21 +0100 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2021-11-03 14:00:46 +0100 |
commit | 2d01bef2f214bb80dca0e91c14e95cf4d76b0afb (patch) | |
tree | 96326c428ba6b88cbc2dd16fedb033a8144ab749 /gcc/ipa-predicate.h | |
parent | 73658e70d9edfab77d7a50039b3ab7d2be3a41a0 (diff) | |
download | gcc-2d01bef2f214bb80dca0e91c14e95cf4d76b0afb.zip gcc-2d01bef2f214bb80dca0e91c14e95cf4d76b0afb.tar.gz gcc-2d01bef2f214bb80dca0e91c14e95cf4d76b0afb.tar.bz2 |
Rename predicate class to ipa_predicate
PR bootstrap/102828
gcc/ChangeLog:
* ipa-fnsummary.c (edge_predicate_pool): Rename predicate class to ipa_predicate.
(ipa_fn_summary::account_size_time): Likewise.
(edge_set_predicate): Likewise.
(set_hint_predicate): Likewise.
(add_freqcounting_predicate): Likewise.
(evaluate_conditions_for_known_args): Likewise.
(evaluate_properties_for_edge): Likewise.
(remap_freqcounting_preds_after_dup): Likewise.
(ipa_fn_summary_t::duplicate): Likewise.
(set_cond_stmt_execution_predicate): Likewise.
(set_switch_stmt_execution_predicate): Likewise.
(compute_bb_predicates): Likewise.
(will_be_nonconstant_expr_predicate): Likewise.
(will_be_nonconstant_predicate): Likewise.
(phi_result_unknown_predicate): Likewise.
(predicate_for_phi_result): Likewise.
(analyze_function_body): Likewise.
(compute_fn_summary): Likewise.
(summarize_calls_size_and_time): Likewise.
(estimate_calls_size_and_time): Likewise.
(ipa_call_context::estimate_size_and_time): Likewise.
(remap_edge_summaries): Likewise.
(remap_freqcounting_predicate): Likewise.
(ipa_merge_fn_summary_after_inlining): Likewise.
(ipa_update_overall_fn_summary): Likewise.
(read_ipa_call_summary): Likewise.
(inline_read_section): Likewise.
* ipa-fnsummary.h (struct ipa_freqcounting_predicate): Likewise.
* ipa-predicate.c (predicate::add_clause): Likewise.
(ipa_predicate::add_clause): Likewise.
(predicate::or_with): Likewise.
(ipa_predicate::or_with): Likewise.
(predicate::evaluate): Likewise.
(ipa_predicate::evaluate): Likewise.
(predicate::probability): Likewise.
(ipa_predicate::probability): Likewise.
(dump_condition): Likewise.
(dump_clause): Likewise.
(predicate::dump): Likewise.
(ipa_predicate::dump): Likewise.
(predicate::debug): Likewise.
(ipa_predicate::debug): Likewise.
(predicate::remap_after_duplication): Likewise.
(ipa_predicate::remap_after_duplication): Likewise.
(predicate::remap_after_inlining): Likewise.
(ipa_predicate::remap_after_inlining): Likewise.
(predicate::stream_in): Likewise.
(ipa_predicate::stream_in): Likewise.
(predicate::stream_out): Likewise.
(ipa_predicate::stream_out): Likewise.
(add_condition): Likewise.
* ipa-predicate.h (class predicate): Likewise.
(class ipa_predicate): Likewise.
(add_condition): Likewise.
Diffstat (limited to 'gcc/ipa-predicate.h')
-rw-r--r-- | gcc/ipa-predicate.h | 65 |
1 files changed, 33 insertions, 32 deletions
diff --git a/gcc/ipa-predicate.h b/gcc/ipa-predicate.h index ac52b54..190dced 100644 --- a/gcc/ipa-predicate.h +++ b/gcc/ipa-predicate.h @@ -111,7 +111,7 @@ typedef vec<condition, va_gc> *conditions; is not. */ typedef uint32_t clause_t; -class predicate +class ipa_predicate { public: enum predicate_conditions @@ -138,7 +138,7 @@ public: /* Initialize predicate either to true of false depending on P. */ - inline predicate (bool p = true) + inline ipa_predicate (bool p = true) { if (p) /* True predicate. */ @@ -149,42 +149,42 @@ public: } /* Sanity check that we do not mix pointers to predicates with predicates. */ - inline predicate (predicate *) + inline ipa_predicate (ipa_predicate *) { gcc_unreachable (); } /* Return predicate testing condition I. */ - static inline predicate predicate_testing_cond (int i) + static inline ipa_predicate predicate_testing_cond (int i) { - class predicate p; + ipa_predicate p; p.set_to_cond (i + first_dynamic_condition); return p; } /* Return predicate testing that function was not inlined. */ - static predicate not_inlined (void) + static ipa_predicate not_inlined (void) { - class predicate p; + ipa_predicate p; p.set_to_cond (not_inlined_condition); return p; } - /* Compute logical and of predicates. */ - predicate & operator &= (const predicate &); - inline predicate operator &(const predicate &p) const + /* Compute logical and of ipa_predicates. */ + ipa_predicate & operator &= (const ipa_predicate &); + inline ipa_predicate operator &(const ipa_predicate &p) const { - predicate ret = *this; + ipa_predicate ret = *this; ret &= p; return ret; } - /* Compute logical or of predicates. This is not operator because + /* Compute logical or of ipa_predicates. This is not operator because extra parameter CONDITIONS is needed */ - predicate or_with (conditions, const predicate &) const; + ipa_predicate or_with (conditions, const ipa_predicate &) const; - /* Return true if predicates are known to be equal. */ - inline bool operator==(const predicate &p2) const + /* Return true if ipa_predicates are known to be equal. */ + inline bool operator==(const ipa_predicate &p2) const { int i; for (i = 0; m_clause[i]; i++) @@ -215,7 +215,7 @@ public: return false; } - inline bool operator!=(const predicate &p2) const + inline bool operator!=(const ipa_predicate &p2) const { return !(*this == p2); } @@ -236,18 +236,19 @@ public: void dump (FILE *f, conditions, bool nl=true) const; void DEBUG_FUNCTION debug (conditions) const; - /* Return predicate equal to THIS after duplication. */ - predicate remap_after_duplication (clause_t); + /* Return ipa_predicate equal to THIS after duplication. */ + ipa_predicate remap_after_duplication (clause_t); - /* Return predicate equal to THIS after inlining. */ - predicate remap_after_inlining (class ipa_fn_summary *, - class ipa_node_params *params_summary, - class ipa_fn_summary *, - const vec<int> &, const vec<HOST_WIDE_INT> &, - clause_t, const predicate &); + /* Return ipa_predicate equal to THIS after inlining. */ + ipa_predicate remap_after_inlining (class ipa_fn_summary *, + ipa_node_params *params_summary, + ipa_fn_summary *, + const vec<int> &, + const vec<HOST_WIDE_INT> &, + clause_t, const ipa_predicate &); - void stream_in (class lto_input_block *); - void stream_out (struct output_block *); + void stream_in (lto_input_block *); + void stream_out (output_block *); private: static const int max_clauses = 8; @@ -264,9 +265,9 @@ private: }; void dump_condition (FILE *f, conditions conditions, int cond); -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 = NULL); +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); |