diff mbox

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

Message ID 550C06BB.1050500@mentor.com
State New
Headers show

Commit Message

Tom de Vries March 20, 2015, 11:38 a.m. UTC
On 19-03-15 12:05, Tom de Vries wrote:
> 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.
>

Updated to eliminate mark_parallelized_function.

Bootstrapped and reg-tested on x86_64.

OK for stage4?

Thanks,
- Tom

Comments

Tom de Vries March 21, 2015, 10:30 p.m. UTC | #1
On 20-03-15 12:38, Tom de Vries wrote:
> On 19-03-15 12:05, Tom de Vries wrote:
>> 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.
>>
>
> Updated to eliminate mark_parallelized_function.
>
> Bootstrapped and reg-tested on x86_64.
>
> OK for stage4?
>

Thomas,

as requested, applied to gomp-4_0-branch.

Thanks,
- Tom
Tom de Vries April 17, 2015, 10:08 a.m. UTC | #2
On 20-03-15 12:38, Tom de Vries wrote:
> On 19-03-15 12:05, Tom de Vries wrote:
>> 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.
>>
>
> Updated to eliminate mark_parallelized_function.
>
> Bootstrapped and reg-tested on x86_64.
>
> OK for stage4?
>

ping.

OK for stage1?

Thanks,
- Tom
Tom de Vries June 8, 2015, 12:21 p.m. UTC | #3
On 17/04/15 12:08, Tom de Vries wrote:
> On 20-03-15 12:38, Tom de Vries wrote:
>> On 19-03-15 12:05, Tom de Vries wrote:
>>> 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.
>>>
>>
>> Updated to eliminate mark_parallelized_function.
>>
>> Bootstrapped and reg-tested on x86_64.
>>
>> OK for stage4?
>>
>
> ping.

ping^2. Original post at 
https://gcc.gnu.org/ml/gcc-patches/2015-03/msg01063.html .

>
> OK for stage1?
>

Thanks,
- Tom
Richard Biener June 9, 2015, 11:07 a.m. UTC | #4
On Mon, 8 Jun 2015, Tom de Vries wrote:

> On 17/04/15 12:08, Tom de Vries wrote:
> > On 20-03-15 12:38, Tom de Vries wrote:
> > > On 19-03-15 12:05, Tom de Vries wrote:
> > > > 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.
> > > > 
> > > 
> > > Updated to eliminate mark_parallelized_function.
> > > 
> > > Bootstrapped and reg-tested on x86_64.
> > > 
> > > OK for stage4?
> > > 
> > 
> > ping.
> 
> ping^2. Original post at
> https://gcc.gnu.org/ml/gcc-patches/2015-03/msg01063.html .

Ok, but shouldn't it be set before calling add_new_function as
add_new_function might run passes that wouldn't identify the
function as parallelized?

Richard.

> > 
> > OK for stage1?
> > 
> 
> Thanks,
> - Tom
> 
> 
>
diff mbox

Patch

Mark offloaded functions as parallelized

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

	PR tree-optimization/65460
	* omp-low.c (expand_omp_target): Set parallelized_function on
	cgraph_node 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 5ca9e84..9be39b7 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -8937,6 +8937,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);
+      cgraph_node::get (child_fn)->parallelized_function = 1;
 
 #ifdef ENABLE_OFFLOADING
       /* Add the new function to the offload table.  */
-- 
1.9.1