diff mbox

[3/3,PR65460] Mark offloaded functions as parallelized

Message ID 550AAD8B.9080900@mentor.com
State New
Headers show

Commit Message

Tom de Vries March 19, 2015, 11:05 a.m. UTC
On 18-03-15 18:22, Tom de Vries wrote:
> Hi,
>
> this patch fixes PR65460.
>
> The patch marks offloaded functions as parallelized, which means the parloops
> pass no longer attempts to modify that function.

Updated patch to postpone mark_parallelized_function until the corresponding 
cgraph_node is available, to ensure it works with the updated 
mark_parallelized_function from patch 2/3.

Bootstrapped and reg-tested on x86_64.

OK for stage4 trunk?

Thanks,
- Tom
diff mbox

Patch

Mark offloaded functions as parallelized

2015-03-18  Tom de Vries  <tom@codesourcery.com>

	PR tree-optimization/65460
	* omp-low.c (expand_omp_target): Call mark_parallelized_function for
	child_fn.
---
 gcc/omp-low.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index a49a6eb..7195aa3 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -8938,6 +8938,7 @@  expand_omp_target (struct omp_region *region)
       /* Inform the callgraph about the new function.  */
       DECL_STRUCT_FUNCTION (child_fn)->curr_properties = cfun->curr_properties;
       cgraph_node::add_new_function (child_fn, true);
+      mark_parallelized_function (child_fn);
 
 #ifdef ENABLE_OFFLOADING
       /* Add the new function to the offload table.  */
-- 
1.9.1