llvm-project/flang/lib/Lower
Mats Petersson dc4bf2c33c [flang][OpenMP]Make omp.wsloop arguments appear in memory (#1277)
As per issue #1196, the loop induction variable, which is an argument
in the omp.wsloop operation, does not have a memory location, so when
passed to a function or subroutine, the reference to the value is not
a memory location, but the value of the induction variable. The callee
function/subroutine is then trying to dereference memory at address 1
or some other "not a good memory location".

This is fixed by creating a temporary memory location and storing the
value of the induction variable in that.

Test fixes as a consequence of the changed code generated.

Add checking for some of the omp-unstructured.f90 to check for alloca,
store and load operations, to ensure the correct flow. Add a test
for CYCLE inside a omp-do loop.

Also convert to use -emit-fir in the omp-unstructrued, and make
the symbol matching consistent in the omp-wsloop-variable test.

Reviewed By: peixin

Differential Revision: https://reviews.llvm.org/D126711
2022-06-01 17:20:06 +01:00
..
.clang-format
.clang-tidy [flang] Add clang-tidy check for braces around if 2021-06-16 09:13:53 +00:00
Allocatable.cpp Upstream support for POINTER assignment in FORALL. 2022-05-06 19:52:47 -07:00
Bridge.cpp [Flang] Lower the infinite do loop 2022-06-01 12:06:40 +00:00
CMakeLists.txt [flang] Lower IO input with vector subscripts 2022-03-16 17:13:23 +01:00
CallInterface.cpp [flang] Do not pass derived type by descriptor when not needed 2022-04-20 10:00:34 +02:00
Coarray.cpp [flang][NFC] Use TODO with location 2022-03-14 11:50:06 +01:00
ComponentPath.cpp Upstream support for POINTER assignment in FORALL. 2022-05-06 19:52:47 -07:00
ConvertExpr.cpp Fixes a performance problem with lowering of forall loops and creating 2022-05-12 08:11:58 -07:00
ConvertType.cpp [flang] Alternate entry points with unused arguments 2022-05-24 10:56:04 -07:00
ConvertVariable.cpp [flang] Alternate entry points with unused arguments 2022-05-24 10:56:04 -07:00
CustomIntrinsicCall.cpp [flang] Lower sum intrinsic 2022-03-08 18:50:34 +01:00
DumpEvaluateExpr.cpp [flang] Simple array assignment lowering 2022-02-24 21:23:30 +01:00
HostAssociations.cpp [mlir:NFC] Remove the forward declaration of FuncOp in the mlir namespace 2022-04-18 12:01:55 -07:00
IO.cpp [flang][runtime] Clean up asynchronous I/O APIs 2022-05-24 07:54:57 -07:00
IntrinsicCall.cpp [flang] fix LBOUND lowering with KIND and no DIM arguments 2022-04-25 09:20:51 +02:00
IterationSpace.cpp [flang] Simple array assignment lowering 2022-02-24 21:23:30 +01:00
Mangler.cpp [flang] Lower more array character cases 2022-03-09 19:50:57 +01:00
OpenACC.cpp [flang] Add lowering stubs for OpenMP/OpenACC declarative constructs 2022-04-28 09:40:30 +08:00
OpenMP.cpp [flang][OpenMP]Make omp.wsloop arguments appear in memory (#1277) 2022-06-01 17:20:06 +01:00
PFTBuilder.cpp [flang] Alternate entry points with unused arguments 2022-05-24 10:56:04 -07:00
Runtime.cpp [mlir:NFC] Remove the forward declaration of FuncOp in the mlir namespace 2022-04-18 12:01:55 -07:00
SymbolMap.cpp [flang] Lower more pointer assignments/disassociation cases 2022-03-15 21:58:33 +01:00
VectorSubscripts.cpp [flang] Lower IO input with vector subscripts 2022-03-16 17:13:23 +01:00