Skip to content

Commit 03d500e

Browse files
committed
[flang][OpenMP] Upstream first part of do concurrent mapping
This PR starts the effort to upstream AMD's internal implementation of `do concurrent` to OpenMP mapping. This replaces #77285 since we extended this WIP quite a bit on our fork over the past year. An important part of this PR is a document that describes the current status downstream, the upstreaming status, and next steps to make this pass much more useful. In addition to this document, this PR also contains the skeleton of the pass (no useful transformations are done yet) and some testing for the added command line options.
1 parent 8cb3d7b commit 03d500e

File tree

18 files changed

+720
-10
lines changed

18 files changed

+720
-10
lines changed

clang/include/clang/Driver/Options.td

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6901,6 +6901,10 @@ defm loop_versioning : BoolOptionWithoutMarshalling<"f", "version-loops-for-stri
69016901

69026902
def fhermetic_module_files : Flag<["-"], "fhermetic-module-files">, Group<f_Group>,
69036903
HelpText<"Emit hermetic module files (no nested USE association)">;
6904+
6905+
def do_concurrent_parallel_EQ : Joined<["-"], "fdo-concurrent-parallel=">,
6906+
HelpText<"Try to map `do concurrent` loops to OpenMP [none|host|device]">,
6907+
Values<"none,host,device">;
69046908
} // let Visibility = [FC1Option, FlangOption]
69056909

69066910
def J : JoinedOrSeparate<["-"], "J">,

clang/lib/Driver/ToolChains/Flang.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ void Flang::addCodegenOptions(const ArgList &Args,
153153
CmdArgs.push_back("-fversion-loops-for-stride");
154154

155155
Args.addAllArgs(CmdArgs,
156-
{options::OPT_flang_experimental_hlfir,
156+
{options::OPT_do_concurrent_parallel_EQ,
157+
options::OPT_flang_experimental_hlfir,
157158
options::OPT_flang_deprecated_no_hlfir,
158159
options::OPT_fno_ppc_native_vec_elem_order,
159160
options::OPT_fppc_native_vec_elem_order,

0 commit comments

Comments
 (0)