diff options
author | Andrew MacLeod <amacleod@redhat.com> | 2021-04-26 18:14:15 -0400 |
---|---|---|
committer | Andrew MacLeod <amacleod@redhat.com> | 2021-05-07 15:00:21 -0400 |
commit | 12f0a54ba9fa25aa13af368af5bb07e345c33dff (patch) | |
tree | 0dfebd27e05dd05f8fe58a2f3a3b9d2bce703937 /gcc/gimple-range-edge.h | |
parent | 4c07e591925bb02e71a499f1cf780ce63985dba0 (diff) | |
download | gcc-12f0a54ba9fa25aa13af368af5bb07e345c33dff.zip gcc-12f0a54ba9fa25aa13af368af5bb07e345c33dff.tar.gz gcc-12f0a54ba9fa25aa13af368af5bb07e345c33dff.tar.bz2 |
Make TRUE/FALSE edge calculation available without the outgoing edge class.
Rename class to gimple_outoging_edge and provide a non-class routine for
the outgoing edge of a gcond.
* gimple-range-edge.h (gimple_outgoing_range): Rename from
outgoing_range.
(gcond_edge_range): Export prototype.
* gimple-range-edge.cc (gcond_edge_range): New.
(gimple_outgoing_range::edge_range_p): Use gcond_edge_range.
* gimple-range-gori.h (gori_compute): Use gimple_outgoing_range.
Diffstat (limited to 'gcc/gimple-range-edge.h')
-rw-r--r-- | gcc/gimple-range-edge.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/gimple-range-edge.h b/gcc/gimple-range-edge.h index 8970c9e..87b4124 100644 --- a/gcc/gimple-range-edge.h +++ b/gcc/gimple-range-edge.h @@ -35,11 +35,11 @@ along with GCC; see the file COPYING3. If not see // The return value is NULL for no range, or the branch statement which the // edge gets the range from, along with the range. -class outgoing_range +class gimple_outgoing_range { public: - outgoing_range (); - ~outgoing_range (); + gimple_outgoing_range (); + ~gimple_outgoing_range (); gimple *edge_range_p (irange &r, edge e); private: void calc_switch_ranges (gswitch *sw); @@ -47,9 +47,11 @@ private: hash_map<edge, irange *> *m_edge_table; irange_allocator m_range_allocator; -}; +}; -// If there is a range control statment at the end of block BB, return it. +// If there is a range control statement at the end of block BB, return it. gimple *gimple_outgoing_range_stmt_p (basic_block bb); +// Return the range on edge E if it is from a GCOND. Either TRUE or FALSE. +void gcond_edge_range (irange &r, edge e); #endif // GIMPLE_RANGE_EDGE_H |