summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/tree-inline.c
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2002-05-09 20:02:13 +0000
committerobrien <obrien@FreeBSD.org>2002-05-09 20:02:13 +0000
commitc8f5fc7032940ad6633f932ac40cade82ec4d0cc (patch)
tree29a0f0a6c79a69ecc64f612947a0fe5904311713 /contrib/gcc/tree-inline.c
parentc9ab9ae440a8066b2c2b85b157b1fdadcf09916a (diff)
downloadFreeBSD-src-c8f5fc7032940ad6633f932ac40cade82ec4d0cc.zip
FreeBSD-src-c8f5fc7032940ad6633f932ac40cade82ec4d0cc.tar.gz
Gcc 3.1.0 pre-release from the FSF anoncvs repo on 9-May-2002 15:57:15 EDT.
Diffstat (limited to 'contrib/gcc/tree-inline.c')
-rw-r--r--contrib/gcc/tree-inline.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/contrib/gcc/tree-inline.c b/contrib/gcc/tree-inline.c
index 02ba716..5aa141a 100644
--- a/contrib/gcc/tree-inline.c
+++ b/contrib/gcc/tree-inline.c
@@ -480,9 +480,11 @@ initialize_inlined_parameters (id, args, fn)
tree init_stmt;
tree var;
tree value;
+ tree cleanup;
/* Find the initializer. */
- value = a ? TREE_VALUE (a) : NULL_TREE;
+ value = (*lang_hooks.tree_inlining.convert_parm_for_inlining)
+ (p, a ? TREE_VALUE (a) : NULL_TREE, fn);
/* If the parameter is never assigned to, we may not need to
create a new variable here at all. Instead, we may be able
@@ -558,16 +560,26 @@ initialize_inlined_parameters (id, args, fn)
TREE_CHAIN (init_stmt) = init_stmts;
init_stmts = init_stmt;
}
+
+ /* See if we need to clean up the declaration. */
+ cleanup = maybe_build_cleanup (var);
+ if (cleanup)
+ {
+ tree cleanup_stmt;
+ /* Build the cleanup statement. */
+ cleanup_stmt = build_stmt (CLEANUP_STMT, var, cleanup);
+ /* Add it to the *front* of the list; the list will be
+ reversed below. */
+ TREE_CHAIN (cleanup_stmt) = init_stmts;
+ init_stmts = cleanup_stmt;
+ }
}
/* Evaluate trailing arguments. */
for (; a; a = TREE_CHAIN (a))
{
tree init_stmt;
- tree value;
-
- /* Find the initializer. */
- value = a ? TREE_VALUE (a) : NULL_TREE;
+ tree value = TREE_VALUE (a);
if (! value || ! TREE_SIDE_EFFECTS (value))
continue;
@@ -842,6 +854,8 @@ expand_call_inline (tp, walk_subtrees, data)
type of the statement expression is the return type of the
function call. */
expr = build1 (STMT_EXPR, TREE_TYPE (TREE_TYPE (fn)), NULL_TREE);
+ /* There is no scope associated with the statement-expression. */
+ STMT_EXPR_NO_SCOPE (expr) = 1;
/* Local declarations will be replaced by their equivalents in this
map. */
@@ -1223,6 +1237,7 @@ walk_tree (tp, func, data, htab_)
case IDENTIFIER_NODE:
case INTEGER_CST:
case REAL_CST:
+ case VECTOR_CST:
case STRING_CST:
case REAL_TYPE:
case COMPLEX_TYPE:
OpenPOWER on IntegriCloud