This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Introduce a new parallel region entry point
Needs ReviewPublic

Authored by jdoerfert on Jan 8 2021, 12:33 PM.

Details

Summary
NOTE: Tests and follow up patches missing.

The old parallel region entry point, __kmpc_fork_call, provided a
variadic interface and did not allow to pass information associated
with the parallel. This has various downsides. Handling of variadic
functions is much harder and can be more expensive. Since the if
condition, the num_threads expression, and the proc_bind choice could
not be passed to the old entry point, the frontend needed to setup
the runtime state explicitly "in user code". This makes user code
more complex and is in itself a bad idea as the runtime internals
are now exposed to all the frontends.

The new entry point takes all the values that can be associated with a
omp parallel in OpenMP 5.X and handles the runtime setup internally.

Diff Detail