This is an archive of the discontinued LLVM Phabricator instance.

[flang]Add support for do concurrent
ClosedPublic

Authored by Leporacanthicus on Jun 7 2022, 11:34 AM.

Details

Summary

[flang]Add support for do concurrent

Upstreaming from fir-dev on https://github.com/flang-compiler/f18-llvm-project

Support for concurrent execution in do-loops.

A selection of tests are also added.

Co-authored-by: V Donaldson <vdonaldson@nvidia.com>

Diff Detail

Event Timeline

Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJun 7 2022, 11:34 AM
Herald added a subscriber: mehdi_amini. · View Herald Transcript
Leporacanthicus requested review of this revision.Jun 7 2022, 11:34 AM

To fix the bot, you probably have to do something like the following in omp-unstructured.f90.

 ! CHECK-LABEL: func @_QPss3{{.*}} {
-! CHECK:     %[[ALLOCA_K:.*]] = fir.alloca i32 {bindc_name = "k", {{.*}}}
 ! CHECK:   omp.parallel {
+! CHECK:     %[[ALLOCA_K:.*]] = fir.alloca i32 {bindc_name = "k", {{.*}}}

Fix broken test

flang/lib/Lower/Bridge.cpp
1151

Nit: Remove commented code.

1178–1188

Nit: Is there a test for this condition?

1232–1251

Nit: Is there a test for this condition?

flang/test/Lower/loops.f90
2

Nit: test with the driver as well.

Is this part of upstreaming from fir-dev? If so, can you mention this in the description.

Leporacanthicus marked an inline comment as done.

Updated commit message.

Removed commented out code.

flang/lib/Lower/Bridge.cpp
1178–1188

This section gets hit three times when running the supplied test, so yes.

1232–1251

This section gets hit once for the supplied test.

Leporacanthicus edited the summary of this revision. (Show Details)Jun 10 2022, 9:58 AM
This revision is now accepted and ready to land.Jun 10 2022, 10:00 AM
This revision was automatically updated to reflect the committed changes.