Commit d7823208 by Bernd Schmidt Committed by Bernd Schmidt

Add entrypoint attribute for the use of nvptx.

	* omp-low.c (create_omp_child_function): Tag entrypoint
	functions with a special attribute.

From-SVN: r220950
parent f8571677
2015-02-24 Bernd Schmidt <bernds@codesourcery.com>
* omp-low.c (create_omp_child_function): Tag entrypoint
functions with a special attribute.
2015-02-24 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
PR target/65058
......
......@@ -2176,6 +2176,13 @@ create_omp_child_function (omp_context *ctx, bool task_copy)
}
}
if (cgraph_node::get_create (decl)->offloadable
&& !lookup_attribute ("omp declare target",
DECL_ATTRIBUTES (current_function_decl)))
DECL_ATTRIBUTES (decl)
= tree_cons (get_identifier ("omp target entrypoint"),
NULL_TREE, DECL_ATTRIBUTES (decl));
t = build_decl (DECL_SOURCE_LOCATION (decl),
RESULT_DECL, NULL_TREE, void_type_node);
DECL_ARTIFICIAL (t) = 1;
......
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