This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Support for the num_threads-clause on 'target parallel'.
ClosedPublic

Authored by arpith-jacob on Jan 24 2017, 6:55 AM.

Details

Summary

The num_threads-clause on the combined directive applies to the
'parallel' region of this construct. We modify the NumThreadsClause
class to capture the clause expression within the 'target' region.

The offload runtime call for 'target parallel' is changed to
__tgt_target_teams() with 1 team and the number of threads set by
this clause or a default if none.

Diff Detail

Repository
rL LLVM

Event Timeline

arpith-jacob created this revision.Jan 24 2017, 6:55 AM
ABataev accepted this revision.Jan 24 2017, 9:05 AM

LG with a nit

lib/CodeGen/CGOpenMPRuntime.cpp
4996 ↗(On Diff #85582)

Specify llvm::Value * instead of auto here.

This revision is now accepted and ready to land.Jan 24 2017, 9:05 AM
This revision was automatically updated to reflect the committed changes.