This is an archive of the discontinued LLVM Phabricator instance.

[OPENMP] Codegen for 'firstprivate' clause in 'sections' directive.
ClosedPublic

Authored by ABataev on Apr 23 2015, 4:21 AM.

Details

Summary

If there are 2 or more sections in a 'section' directive the following code is generated:

<init for firstprivates>
@__kmpc_cancel_barrier();// To avoid data race in firstprivate init
@__kmpc_for_static_init_4();
<BODY for sections directive>
@__kmpc_for_static_fini()

If there is only one section, the following code is generated:

if (@__kmpc_single()) {
<init for firstprivates>
@__kmpc_end_single();
}
@__kmpc_cancel_barrier(); // To avoid data race in firstprivate init

Diff Detail

Repository
rL LLVM

Event Timeline

ABataev updated this revision to Diff 24283.Apr 23 2015, 4:21 AM
ABataev retitled this revision from to [OPENMP] Coegen for 'firstprivate' clause in 'sections' directive..
ABataev updated this object.
ABataev edited the test plan for this revision. (Show Details)
ABataev added reviewers: rjmccall, hfinkel.
ABataev added subscribers: fraggamuffin, ejstotzer, Unknown Object (MLST).
ABataev retitled this revision from [OPENMP] Coegen for 'firstprivate' clause in 'sections' directive. to [OPENMP] Codegen for 'firstprivate' clause in 'sections' directive..Apr 23 2015, 6:53 AM
ABataev updated this object.
This revision was automatically updated to reflect the committed changes.