On Tue, Aug 21, 2018 at 2:58 PM Martin Liška <mli...@suse.cz> wrote:
>
> Hi.
>
> I'm considering adding couple of new gimple-related functions that
> are related to gswitch statement.
>
> Is it a good idea?

Just add them to tree-cfg.h?  That's what should be really called
gimple-cfg.h these days...

Richard.

> Martin
>
> gcc/ChangeLog:
>
> 2018-08-06  Martin Liska  <mli...@suse.cz>
>
>         * gimple-cfg.h: New file.
>         * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
>         Use gimple_switch_edge (and gimple_switch_default_edge).
>         * tree-switch-conversion.c (switch_conversion::collect): Likewise.
>         (switch_decision_tree::compute_cases_per_edge): Likewise.
>         (switch_decision_tree::analyze_switch_statement): Likewise.
>         (switch_decision_tree::try_switch_expansion): Likewise.
> ---
>  gcc/gimple-cfg.h             | 44 ++++++++++++++++++++++++++++++++++++
>  gcc/ipa-fnsummary.c          |  7 +++---
>  gcc/tree-switch-conversion.c | 38 ++++++++++++-------------------
>  3 files changed, 62 insertions(+), 27 deletions(-)
>  create mode 100644 gcc/gimple-cfg.h
>
>

Reply via email to