Commit 636542ef by Martin Jambor Committed by Martin Jambor

[PR 70857] Copy RESULT_DECL of HSA outlined kernel function

2016-05-16  Martin Jambor  <mjambor@suse.cz>

	PR hsa/70857
	* omp-low.c (grid_expand_target_grid_body): Copy RESULT_DECL of
	the outlined kernel function.

From-SVN: r236291
parent 704b85c7
2016-05-16 Martin Jambor <mjambor@suse.cz>
PR hsa/70857
* omp-low.c (grid_expand_target_grid_body): Copy RESULT_DECL of
the outlined kernel function.
2016-05-16 Robert Suchanek <robert.suchanek@imgtec.com> 2016-05-16 Robert Suchanek <robert.suchanek@imgtec.com>
* config/mips/mips.h (ISA_HAS_LSA): Enable for -mmsa. * config/mips/mips.h (ISA_HAS_LSA): Enable for -mmsa.
......
...@@ -13681,6 +13681,9 @@ grid_expand_target_grid_body (struct omp_region *target) ...@@ -13681,6 +13681,9 @@ grid_expand_target_grid_body (struct omp_region *target)
tree new_parm_decl = copy_node (DECL_ARGUMENTS (kern_fndecl)); tree new_parm_decl = copy_node (DECL_ARGUMENTS (kern_fndecl));
DECL_CONTEXT (new_parm_decl) = kern_fndecl; DECL_CONTEXT (new_parm_decl) = kern_fndecl;
DECL_ARGUMENTS (kern_fndecl) = new_parm_decl; DECL_ARGUMENTS (kern_fndecl) = new_parm_decl;
gcc_assert (VOID_TYPE_P (TREE_TYPE (DECL_RESULT (kern_fndecl))));
DECL_RESULT (kern_fndecl) = copy_node (DECL_RESULT (kern_fndecl));
DECL_CONTEXT (DECL_RESULT (kern_fndecl)) = kern_fndecl;
struct function *kern_cfun = DECL_STRUCT_FUNCTION (kern_fndecl); struct function *kern_cfun = DECL_STRUCT_FUNCTION (kern_fndecl);
kern_cfun->curr_properties = cfun->curr_properties; kern_cfun->curr_properties = cfun->curr_properties;
......
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