aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2021-07-16 14:56:38 +0200
committerRichard Biener <rguenther@suse.de>2021-07-19 10:02:14 +0200
commit3d7686a30fcf0e44133f28673b722b5f57e430c5 (patch)
treebe689523b33c9e40321cb2aae46b35c4ffa957d7
parent3ce20b6be543824a07c3367253188d754b58667e (diff)
downloadgcc-3d7686a30fcf0e44133f28673b722b5f57e430c5.zip
gcc-3d7686a30fcf0e44133f28673b722b5f57e430c5.tar.gz
gcc-3d7686a30fcf0e44133f28673b722b5f57e430c5.tar.bz2
Remove gimple_expr_type
This removes the transitional gimple_expr_type API. 2021-07-16 Richard Biener <rguenther@suse.de> * gimple.h (gimple_expr_type): Remove. * doc/gimple.texi: Remove gimple_expr_type documentation.
-rw-r--r--gcc/doc/gimple.texi8
-rw-r--r--gcc/gimple.h42
2 files changed, 0 insertions, 50 deletions
diff --git a/gcc/doc/gimple.texi b/gcc/doc/gimple.texi
index 4b3d7d7..5d89dbc 100644
--- a/gcc/doc/gimple.texi
+++ b/gcc/doc/gimple.texi
@@ -868,14 +868,6 @@ Return the basic block to which statement @code{G} belongs to.
Return the lexical scope block holding statement @code{G}.
@end deftypefn
-@deftypefn {GIMPLE function} tree gimple_expr_type (gimple stmt)
-Return the type of the main expression computed by @code{STMT}. Return
-@code{void_type_node} if @code{STMT} computes nothing. This will only return
-something meaningful for @code{GIMPLE_ASSIGN}, @code{GIMPLE_COND} and
-@code{GIMPLE_CALL}. For all other tuple codes, it will return
-@code{void_type_node}.
-@end deftypefn
-
@deftypefn {GIMPLE function} {enum tree_code} gimple_expr_code (gimple stmt)
Return the tree code for the expression computed by @code{STMT}. This
is only meaningful for @code{GIMPLE_CALL}, @code{GIMPLE_ASSIGN} and
diff --git a/gcc/gimple.h b/gcc/gimple.h
index acf572b..29da919 100644
--- a/gcc/gimple.h
+++ b/gcc/gimple.h
@@ -6608,48 +6608,6 @@ is_gimple_resx (const gimple *gs)
return gimple_code (gs) == GIMPLE_RESX;
}
-/* Return the type of the main expression computed by STMT. Return
- void_type_node if the statement computes nothing. */
-
-static inline tree
-gimple_expr_type (const gimple *stmt)
-{
- enum gimple_code code = gimple_code (stmt);
- /* In general we want to pass out a type that can be substituted
- for both the RHS and the LHS types if there is a possibly
- useless conversion involved. That means returning the
- original RHS type as far as we can reconstruct it. */
- if (code == GIMPLE_CALL)
- {
- const gcall *call_stmt = as_a <const gcall *> (stmt);
- if (gimple_call_internal_p (call_stmt))
- switch (gimple_call_internal_fn (call_stmt))
- {
- case IFN_MASK_STORE:
- case IFN_SCATTER_STORE:
- return TREE_TYPE (gimple_call_arg (call_stmt, 3));
- case IFN_MASK_SCATTER_STORE:
- return TREE_TYPE (gimple_call_arg (call_stmt, 4));
- default:
- break;
- }
- return gimple_call_return_type (call_stmt);
- }
- else if (code == GIMPLE_ASSIGN)
- {
- if (gimple_assign_rhs_code (stmt) == POINTER_PLUS_EXPR)
- return TREE_TYPE (gimple_assign_rhs1 (stmt));
- else
- /* As fallback use the type of the LHS. */
- return TREE_TYPE (gimple_get_lhs (stmt));
- }
- else if (code == GIMPLE_COND)
- return boolean_type_node;
- else if (code == GIMPLE_PHI)
- return TREE_TYPE (gimple_phi_result (stmt));
- else
- return void_type_node;
-}
/* Enum and arrays used for allocation stats. Keep in sync with
gimple.c:gimple_alloc_kind_names. */