diff options
author | Andrew MacLeod <amacleod@redhat.com> | 2024-05-21 12:41:49 -0400 |
---|---|---|
committer | Andrew MacLeod <amacleod@redhat.com> | 2024-05-23 16:50:55 -0400 |
commit | 83bb9ad465f0c92c24658702804ee003183a9028 (patch) | |
tree | e086e61501318c9a596e12faef392e61d594c71e /gcc/gimple-range-fold.h | |
parent | fae5e6a4dfcf9270cd09c2240480860b09c2c627 (diff) | |
download | gcc-83bb9ad465f0c92c24658702804ee003183a9028.zip gcc-83bb9ad465f0c92c24658702804ee003183a9028.tar.gz gcc-83bb9ad465f0c92c24658702804ee003183a9028.tar.bz2 |
Move condexpr_adjust into gimple-range-fold
Certain components of GORI were needed in order to process a COND_EXPR
expression and calculate the 2 operands as if they were true and false edges
based on the condition. With GORI available from the range_query
objcet now, this can be moved into the fold_using_range code where it
really belongs.
* gimple-range-edge.h (range_query::condexpr_adjust): Delete.
* gimple-range-fold.cc (fold_using_range::range_of_range_op): Use
gori_ssa routine.
(fold_using_range::range_of_address): Likewise.
(fold_using_range::range_of_phi): Likewise.
(fold_using_range::condexpr_adjust): Relocated from gori_compute.
(fold_using_range::range_of_cond_expr): Use local condexpr_adjust.
(fur_source::register_outgoing_edges): Use gori_ssa routine.
* gimple-range-fold.h (gori_ssa): Rename from gori_bb.
(fold_using_range::condexpr_adjust): Add prototype.
* gimple-range-gori.cc (gori_compute::condexpr_adjust): Relocate.
* gimple-range-gori.h (gori_compute::condexpr_adjust): Delete.
Diffstat (limited to 'gcc/gimple-range-fold.h')
-rw-r--r-- | gcc/gimple-range-fold.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/gimple-range-fold.h b/gcc/gimple-range-fold.h index b240a6e..491d573 100644 --- a/gcc/gimple-range-fold.h +++ b/gcc/gimple-range-fold.h @@ -106,7 +106,7 @@ class fur_source public: fur_source (range_query *q = NULL); inline range_query *query () const { return m_query; } - inline gori_map *gori_bb () const + inline gori_map *gori_ssa () const { return (m_depend_p && m_query) ? m_query->gori_ssa () : NULL; } inline class gimple_outgoing_range *gori () { return m_depend_p ? &(m_query->gori ()) : NULL; } @@ -171,5 +171,7 @@ protected: fur_source &src); void relation_fold_and_or (irange& lhs_range, gimple *s, fur_source &src, vrange &op1, vrange &op2); + bool condexpr_adjust (vrange &r1, vrange &r2, gimple *, tree cond, tree op1, + tree op2, fur_source &src); }; #endif // GCC_GIMPLE_RANGE_FOLD_H |