Commit f9faea37 by Jakub Jelinek Committed by Jakub Jelinek

gimplify.c (gimplify_bind_expr): Handle oacc_declare_returns even for…

gimplify.c (gimplify_bind_expr): Handle oacc_declare_returns even for -fstack-reuse=none, or for volatile vars etc.

	* gimplify.c (gimplify_bind_expr): Handle oacc_declare_returns
	even for -fstack-reuse=none, or for volatile vars etc.

From-SVN: r241407
parent e2ce9e83
2016-10-21 Jakub Jelinek <jakub@redhat.com>
* gimplify.c (gimplify_bind_expr): Handle oacc_declare_returns
even for -fstack-reuse=none, or for volatile vars etc.
2016-10-21 David Malcolm <dmalcolm@redhat.com> 2016-10-21 David Malcolm <dmalcolm@redhat.com>
* print-rtl-function.c (flag_compact): Move extern decl to... * print-rtl-function.c (flag_compact): Move extern decl to...
......
...@@ -1192,12 +1192,14 @@ gimplify_bind_expr (tree *expr_p, gimple_seq *pre_p) ...@@ -1192,12 +1192,14 @@ gimplify_bind_expr (tree *expr_p, gimple_seq *pre_p)
{ {
if (VAR_P (t) if (VAR_P (t)
&& !is_global_var (t) && !is_global_var (t)
&& DECL_CONTEXT (t) == current_function_decl && DECL_CONTEXT (t) == current_function_decl)
&& !DECL_HARD_REGISTER (t) {
if (!DECL_HARD_REGISTER (t)
&& !TREE_THIS_VOLATILE (t) && !TREE_THIS_VOLATILE (t)
&& !DECL_HAS_VALUE_EXPR_P (t) && !DECL_HAS_VALUE_EXPR_P (t)
/* Only care for variables that have to be in memory. Others /* Only care for variables that have to be in memory. Others
will be rewritten into SSA names, hence moved to the top-level. */ will be rewritten into SSA names, hence moved to the
top-level. */
&& !is_gimple_reg (t) && !is_gimple_reg (t)
&& flag_stack_reuse != SR_NONE) && flag_stack_reuse != SR_NONE)
{ {
...@@ -1207,6 +1209,7 @@ gimplify_bind_expr (tree *expr_p, gimple_seq *pre_p) ...@@ -1207,6 +1209,7 @@ gimplify_bind_expr (tree *expr_p, gimple_seq *pre_p)
clobber_stmt = gimple_build_assign (t, clobber); clobber_stmt = gimple_build_assign (t, clobber);
gimple_set_location (clobber_stmt, end_locus); gimple_set_location (clobber_stmt, end_locus);
gimplify_seq_add_stmt (&cleanup, clobber_stmt); gimplify_seq_add_stmt (&cleanup, clobber_stmt);
}
if (flag_openacc && oacc_declare_returns != NULL) if (flag_openacc && oacc_declare_returns != NULL)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment