aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-range-gori.h
diff options
context:
space:
mode:
authorAndrew MacLeod <amacleod@redhat.com>2023-08-15 17:29:58 -0400
committerAndrew MacLeod <amacleod@redhat.com>2023-10-05 15:00:38 -0400
commit480648ce9ebda809c726e6f54d1bf7f652d68075 (patch)
treee646798122f491d917ea307f2e5abad43791a795 /gcc/gimple-range-gori.h
parent043a6fcbc27f8721301eb2f72a7839f54f393003 (diff)
downloadgcc-480648ce9ebda809c726e6f54d1bf7f652d68075.zip
gcc-480648ce9ebda809c726e6f54d1bf7f652d68075.tar.gz
gcc-480648ce9ebda809c726e6f54d1bf7f652d68075.tar.bz2
Add outgoing range vector calcualtion API
Provide a GORI API which can produce a range vector for all outgoing ranges on an edge without any of the other infratructure. * gimple-range-gori.cc (gori_stmt_info::gori_stmt_info): New. (gori_calc_operands): New. (gori_on_edge): New. (gori_name_helper): New. (gori_name_on_edge): New. * gimple-range-gori.h (gori_on_edge): New prototype. (gori_name_on_edge): New prototype.
Diffstat (limited to 'gcc/gimple-range-gori.h')
-rw-r--r--gcc/gimple-range-gori.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/gimple-range-gori.h b/gcc/gimple-range-gori.h
index b8d97d1..e75ade0 100644
--- a/gcc/gimple-range-gori.h
+++ b/gcc/gimple-range-gori.h
@@ -208,6 +208,21 @@ private:
int m_not_executable_flag;
};
+// These APIs are used to query GORI if there are ranges generated on an edge.
+// GORI_ON_EDGE is used to get all the ranges at once (returned in an
+// ssa_cache structure).
+// GORI_NAME_ON_EDGE is used to simply ask if NAME has a range on edge E
+
+// Fill ssa-cache R with any outgoing ranges on edge E, using OGR and QUERY.
+bool gori_on_edge (class ssa_cache &r, edge e,
+ range_query *query = NULL,
+ gimple_outgoing_range *ogr = NULL);
+
+// Query if NAME has an outgoing range on edge E, and return it in R if so.
+// Note this doesnt use ranger, its a static GORI analysis of the range in
+// block e->src and is based on any branch at the exit of that block.
+bool gori_name_on_edge (vrange &r, tree name, edge e, range_query *q = NULL);
+
// For each name that is an import into BB's exports..
#define FOR_EACH_GORI_IMPORT_NAME(gori, bb, name) \
for (gori_export_iterator iter ((gori).imports ((bb))); \