diff options
author | Andrew MacLeod <amacleod@redhat.com> | 2020-10-06 12:53:09 -0400 |
---|---|---|
committer | Andrew MacLeod <amacleod@redhat.com> | 2020-10-06 13:03:13 -0400 |
commit | fcae5121154d1c3382b056bcc2c563cedac28e74 (patch) | |
tree | 7f1a992410f82963ee9df115586cf45e39a53583 /gcc/go/gofrontend/gogo.cc | |
parent | 90e88fd376bb9ad6223a1f5ccd803d1bd9539b05 (diff) | |
download | gcc-fcae5121154d1c3382b056bcc2c563cedac28e74.zip gcc-fcae5121154d1c3382b056bcc2c563cedac28e74.tar.gz gcc-fcae5121154d1c3382b056bcc2c563cedac28e74.tar.bz2 |
Hybrid EVRP and testcases
Provide a hybrid EVRP pass which uses legacy EVRP and adds additonal
enhancements from the new ranger infrastructure.
A New option is also provided, -fevrp-mode=
And adjust testcases
gcc/ChangeLog:
2020-10-06 Andrew MacLeod <amacleod@redhat.com>
* flag-types.h (enum evrp_mode): New enumerated type EVRP_MODE_*.
* common.opt (fevrp-mode): New undocumented flag.
* gimple-ssa-evrp.c: Include gimple-range.h
(class rvrp_folder): EVRP folding using ranger exclusively.
(rvrp_folder::rvrp_folder): New.
(rvrp_folder::~rvrp_folder): New.
(rvrp_folder::value_of_expr): New. Use rangers value_of_expr.
(rvrp_folder::value_on_edge): New. Use rangers value_on_edge.
(rvrp_folder::value_of_Stmt): New. Use rangers value_of_stmt.
(rvrp_folder::fold_stmt): New. Call the simplifier.
(class hybrid_folder): EVRP folding using both engines.
(hybrid_folder::hybrid_folder): New.
(hybrid_folder::~hybrid_folder): New.
(hybrid_folder::fold_stmt): New. Simplify with one engne, then the
other.
(hybrid_folder::value_of_expr): New. Use both value routines.
(hybrid_folder::value_on_edge): New. Use both value routines.
(hybrid_folder::value_of_stmt): New. Use both value routines.
(hybrid_folder::choose_value): New. Choose between range_analzyer and
rangers values.
(execute_early_vrp): Choose a folder based on flag_evrp_mode.
* vr-values.c (simplify_using_ranges::fold_cond): Try range_of_stmt
first to see if it returns a value.
(simplify_using_ranges::simplify_switch_using_ranges): Return true if
any changes were made to the switch.
gcc/testsuite/ChangeLog:
2020-10-06 Andrew MacLeod <amacleod@redhat.com>
* gcc.dg/pr81192.c: Disable EVRP pass.
* gcc.dg/tree-ssa/pr77445-2.c: Ditto.
* gcc.dg/tree-ssa/ssa-dom-thread-6.c: Adjust.
* gcc.dg/tree-ssa/ssa-dom-thread-7.c: Ditto.
Diffstat (limited to 'gcc/go/gofrontend/gogo.cc')
0 files changed, 0 insertions, 0 deletions