This is an archive of the discontinued LLVM Phabricator instance.

[flang] Upstream code to lower pointer assignment in FORALL constructs
ClosedPublic

Authored by schweitz on May 6 2022, 3:51 PM.

Details

Summary

This patch upstreams initial work to support the lowering of pointer assignments in a FORALL construct.

Also includes some other bug fixes that are related and need upstreaming as well.

Diff Detail

Event Timeline

schweitz created this revision.May 6 2022, 3:51 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald Transcript
Herald added a subscriber: mehdi_amini. · View Herald Transcript
schweitz requested review of this revision.May 6 2022, 3:51 PM
PeteSteinfeld accepted this revision.May 6 2022, 4:00 PM

All builds and tests correctly and looks good.

This revision is now accepted and ready to land.May 6 2022, 4:00 PM
This revision was automatically updated to reflect the committed changes.

This broke the msvs buildbot caused by the removal of the __SIZEOF_INT128__ conditional compilation: https://lab.llvm.org/buildbot/#/builders/172/builds/12046

peixin added a subscriber: peixin.May 8 2022, 7:25 PM
peixin added inline comments.
flang/lib/Lower/IO.cpp
84

This seems to be failed on X86.

https://buildkite.com/llvm-project/premerge-checks/builds/91903#b24dc0c7-8505-49f2-a757-ab5a0576c2f0

[3999/4207] Building CXX object tools\flang\lib\Lower\CMakeFiles\obj.FortranLower.dir\IO.cpp.obj
FAILED: tools/flang/lib/Lower/CMakeFiles/obj.FortranLower.dir/IO.cpp.obj
sccache C:\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe /nologo /TP -DBUILD_EXAMPLES -DFLANG_LITTLE_ENDIAN=1 -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -DSTDC_CONSTANT_MACROS -DSTDC_FORMAT_MACROS -DSTDC_LIMIT_MACROS -Itools\flang\lib\Lower -IC:\ws\w5\llvm-project\premerge-checks\flang\lib\Lower -IC:\ws\w5\llvm-project\premerge-checks\flang\include -Itools\flang\include -Iinclude -IC:\ws\w5\llvm-project\premerge-checks\llvm\include -IC:\ws\w5\llvm-project\premerge-checks\llvm\..\mlir\include -Itools\mlir\include -Itools\clang\include -IC:\ws\w5\llvm-project\premerge-checks\llvm\..\clang\include /DWIN32 /D_WINDOWS /Zc:inline /Zc:cplusplus /Zc:strictStrings /Oi /Zc:rvalueCast /bigobj /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd4324 -w14062 -we4238 /Gw /MD /O2 /Ob2 /EHs-c- /GR- -UNDEBUG -std:c++17 /showIncludes /Fotools\flang\lib\Lower\CMakeFiles\obj.FortranLower.dir\IO.cpp.obj /Fdtools\flang\lib\Lower\CMakeFiles\obj.FortranLower.dir\ /FS -c C:\ws\w5\llvm-project\premerge-checks\flang\lib\Lower\IO.cpp
C:\ws\w5\llvm-project\premerge-checks\flang\lib\Lower\IO.cpp(84): error C2065: '_FortranAioCheckUnitNumberInRange128': undeclared identifier
C:\ws\w5\llvm-project\premerge-checks\flang\lib\Lower\IO.cpp(84): error C3203: 'RuntimeTableKey': unspecialized class template can't be used as a template argument for template parameter '<unnamed-symbol>', expected a real type
C:\BuildTools\VC\Tools\MSVC\14.29.30133\include\tuple(189): error C2079: 'std::_Tuple_val<_This>::_Val' uses undefined struct 'fir::runtime::RuntimeTableEntry<int,std::integer_sequence<T,95,70,111,114,116,114,97,110,65,105,111,67,104,101,99,107,85,110,105,116,78,117,109,98,101,114,73,110,82,97,110,103,101,49,50,56>>'

with
[
    _This=fir::runtime::RuntimeTableEntry<int,std::integer_sequence<char,95,70,111,114,116,114,97,110,65,105,111,67,104,101,99,107,85,110,105,116,78,117,109,98,101,114,73,110,82,97,110,103,101,49,50,56>>
]
and
[
    T=char
]

C:\BuildTools\VC\Tools\MSVC\14.29.30133\include\tuple(730): note: see reference to class template instantiation 'std::_Tuple_val<_This>' being compiled