aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-range-fold.h
diff options
context:
space:
mode:
authorAndrew MacLeod <amacleod@redhat.com>2022-08-16 13:18:37 -0400
committerAndrew MacLeod <amacleod@redhat.com>2022-08-16 21:09:00 -0400
commit80f78716c2c7ce1b7f96077c35c1dd474a2086a2 (patch)
treef6af5d1fef6ba4f80be68a4b331806d7cebd5168 /gcc/gimple-range-fold.h
parent47a61e65148c6f1c237638144eb72ed5afd86387 (diff)
downloadgcc-80f78716c2c7ce1b7f96077c35c1dd474a2086a2.zip
gcc-80f78716c2c7ce1b7f96077c35c1dd474a2086a2.tar.gz
gcc-80f78716c2c7ce1b7f96077c35c1dd474a2086a2.tar.bz2
Abstract interesting ssa-names from GORI.
Provide a routine to pick out the ssa-names from interesting statements. * gimple-range-fold.cc (gimple_range_ssa_names): New. * gimple-range-fold.h (gimple_range_ssa_names): New prototype. * gimple-range-gori.cc (range_def_chain::get_def_chain): Move code to new routine.
Diffstat (limited to 'gcc/gimple-range-fold.h')
-rw-r--r--gcc/gimple-range-fold.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/gimple-range-fold.h b/gcc/gimple-range-fold.h
index c2f381d..f2eab72 100644
--- a/gcc/gimple-range-fold.h
+++ b/gcc/gimple-range-fold.h
@@ -96,6 +96,14 @@ range_compatible_p (tree type1, tree type2)
&& TYPE_SIGN (type1) == TYPE_SIGN (type2));
}
+extern tree gimple_range_operand1 (const gimple *s);
+extern tree gimple_range_operand2 (const gimple *s);
+
+// Given stmt S, fill VEC, up to VEC_SIZE elements, with relevant ssa-names
+// on the statement. For efficiency, it is an error to not pass in enough
+// elements for the vector. Return the number of ssa-names.
+
+unsigned gimple_range_ssa_names (tree *vec, unsigned vec_size, gimple *stmt);
// Source of all operands for fold_using_range and gori_compute.
// It abstracts out the source of an operand so it can come from a stmt or
@@ -150,9 +158,6 @@ protected:
relation_oracle *m_oracle;
};
-extern tree gimple_range_operand1 (const gimple *s);
-extern tree gimple_range_operand2 (const gimple *s);
-
// This class uses ranges to fold a gimple statement producinf a range for
// the LHS. The source of all operands is supplied via the fur_source class
// which provides a range_query as well as a source location and any other