aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple.c
diff options
context:
space:
mode:
authorTom de Vries <tom@codesourcery.com>2011-10-07 12:49:49 +0000
committerTom de Vries <tom@codesourcery.com>2011-10-07 12:49:49 +0000
commita64e7ed2996c4403e024e07b44003af19083f6ff (patch)
tree274fa9d31e31f79687aa8785b52bbd7532b95632 /gcc/gimple.c
parent841e7793f863896875873cdf8078cdadcfc7e5f0 (diff)
2011-10-07 Tom de Vries <tom@codesourcery.com>
PR middle-end/50527 * tree.c (build_common_builtin_nodes): Add local_define_builtin for BUILT_IN_ALLOCA_WITH_ALIGN. Mark that BUILT_IN_ALLOCA_WITH_ALIGN can throw. * builtins.c (expand_builtin_alloca): Handle BUILT_IN_ALLOCA_WITH_ALIGN arglist. Set align for BUILT_IN_ALLOCA_WITH_ALIGN. (expand_builtin): Handle BUILT_IN_ALLOCA_WITH_ALIGN. (is_inexpensive_builtin): Handle BUILT_IN_ALLOCA_WITH_ALIGN. * tree-ssa-ccp.c (evaluate_stmt): Set align for BUILT_IN_ALLOCA_WITH_ALIGN. (fold_builtin_alloca_for_var): Rename to ... (fold_builtin_alloca_with_align): Set DECL_ALIGN from 2nd BUILT_IN_ALLOCA_WITH_ALIGN argument. (ccp_fold_stmt): Try folding BUILT_IN_ALLOCA_WITH_ALIGN using fold_builtin_alloca_with_align. (optimize_stack_restore): Handle BUILT_IN_ALLOCA_WITH_ALIGN. * builtins.def (BUILT_IN_ALLOCA_WITH_ALIGN): Declare using DEF_BUILTIN_STUB. * ipa-pure-const.c (special_builtin_state): Handle BUILT_IN_ALLOCA_WITH_ALIGN. * tree-ssa-alias.c (ref_maybe_used_by_call_p_1) (call_may_clobber_ref_p_1): Same. * function.c (gimplify_parameters): Lower vla to BUILT_IN_ALLOCA_WITH_ALIGN. * gimplify.c (gimplify_vla_decl): Same. * cfgexpand.c (expand_call_stmt): Handle BUILT_IN_ALLOCA_WITH_ALIGN. * tree-mudflap.c (mf_xform_statements): Same. * tree-ssa-dce.c (mark_stmt_if_obviously_necessary) (mark_all_reaching_defs_necessary_1, propagate_necessity): Same. * varasm.c (incorporeal_function_p): Same. * tree-object-size.c (alloc_object_size): Same. * gimple.c (gimple_build_call_from_tree): Same. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@179655 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimple.c')
-rw-r--r--gcc/gimple.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/gimple.c b/gcc/gimple.c
index e4dfd467d75..2c655cd3ef6 100644
--- a/gcc/gimple.c
+++ b/gcc/gimple.c
@@ -374,7 +374,8 @@ gimple_build_call_from_tree (tree t)
gimple_call_set_return_slot_opt (call, CALL_EXPR_RETURN_SLOT_OPT (t));
if (fndecl
&& DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL
- && DECL_FUNCTION_CODE (fndecl) == BUILT_IN_ALLOCA)
+ && (DECL_FUNCTION_CODE (fndecl) == BUILT_IN_ALLOCA
+ || DECL_FUNCTION_CODE (fndecl) == BUILT_IN_ALLOCA_WITH_ALIGN))
gimple_call_set_alloca_for_var (call, CALL_ALLOCA_FOR_VAR_P (t));
else
gimple_call_set_from_thunk (call, CALL_FROM_THUNK_P (t));