aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgexpand.c
diff options
context:
space:
mode:
authorMichael Matz <matz@suse.de>2011-04-15 19:48:25 +0000
committerMichael Matz <matz@gcc.gnu.org>2011-04-15 19:48:25 +0000
commit63d2a3533fb013061b3a20ddcc26233d6368de32 (patch)
tree2ca8a4769f794f0a8bad0116318e591f72ee7e8e /gcc/cfgexpand.c
parentdee74c343634bec2e6909f197ce0b669820acc56 (diff)
downloadgcc-63d2a3533fb013061b3a20ddcc26233d6368de32.zip
gcc-63d2a3533fb013061b3a20ddcc26233d6368de32.tar.gz
gcc-63d2a3533fb013061b3a20ddcc26233d6368de32.tar.bz2
tree.h (ALLOCA_FOR_VAR_P): Rename to CALL_ALLOCA_FOR_VAR_P.
* tree.h (ALLOCA_FOR_VAR_P): Rename to CALL_ALLOCA_FOR_VAR_P. * builtins.c (expand_builtin): Use CALL_ALLOCA_FOR_VAR_P. * function.c (gimplify_parameters): Ditto. * gimplify.c (gimplify_vla_decl): Ditto. * gimple.h (enum gf_mask): Add GF_CALL_ALLOCA_FOR_VAR. (gimple_call_set_alloca_for_var): New inline function. (gimple_call_alloca_for_var_p): Ditto. * gimple.c (gimple_build_call_from_tree): Remember CALL_ALLOCA_FOR_VAR_P state. * cfgexpand.c (expand_call_stmt): Restore CALL_ALLOCA_FOR_VAR_P state. * tree-inline.c (inline_forbidden_p_stmt): Don't reject alloca calls if they were for VLA objects. From-SVN: r172516
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r--gcc/cfgexpand.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index c2d71f4..365f061 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -1879,7 +1879,12 @@ expand_call_stmt (gimple stmt)
CALL_EXPR_TAILCALL (exp) = gimple_call_tail_p (stmt);
CALL_EXPR_RETURN_SLOT_OPT (exp) = gimple_call_return_slot_opt_p (stmt);
- CALL_FROM_THUNK_P (exp) = gimple_call_from_thunk_p (stmt);
+ if (decl
+ && DECL_BUILT_IN_CLASS (decl) == BUILT_IN_NORMAL
+ && DECL_FUNCTION_CODE (decl) == BUILT_IN_ALLOCA)
+ CALL_ALLOCA_FOR_VAR_P (exp) = gimple_call_alloca_for_var_p (stmt);
+ else
+ CALL_FROM_THUNK_P (exp) = gimple_call_from_thunk_p (stmt);
CALL_CANNOT_INLINE_P (exp) = gimple_call_cannot_inline_p (stmt);
CALL_EXPR_VA_ARG_PACK (exp) = gimple_call_va_arg_pack_p (stmt);
SET_EXPR_LOCATION (exp, gimple_location (stmt));