This is an archive of the discontinued LLVM Phabricator instance.

[flang[OpenACC] Lower wait directive
ClosedPublic

Authored by clementval on Mar 24 2022, 6:50 AM.

Details

Summary

This patch adds lowering for the !$acc wait directive
from the PFT to OpenACC dialect.

This patch is part of the upstreaming effort from fir-dev branch.

Diff Detail

Event Timeline

clementval created this revision.Mar 24 2022, 6:50 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMar 24 2022, 6:50 AM
Herald added a subscriber: mehdi_amini. · View Herald Transcript
clementval requested review of this revision.Mar 24 2022, 6:50 AM
PeteSteinfeld requested changes to this revision.Mar 24 2022, 7:18 AM

I get errors when I try to build this patch. Here's the first error:

[5791/5857] Building CXX object tools/flang/lib/Lower/CMakeFiles/obj.FortranLower.dir/OpenACC.cpp.o
FAILED: tools/flang/lib/Lower/CMakeFiles/obj.FortranLower.dir/OpenACC.cpp.o
/usr/bin/c++ -DFLANG_LITTLE_ENDIAN=1 -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/local/home/psteinfeld/main/wait/build/tools/flang/lib/Lower -I/local/home/psteinfeld/main/wait/flang/lib/Lower -I/local/home/psteinfeld/main/wait/flang/include -I/local/home/psteinfeld/main/wait/build/tools/flang/include -I/local/home/psteinfeld/main/wait/build/include -I/local/home/psteinfeld/main/wait/llvm/include -isystem /local/home/psteinfeld/main/wait/llvm/../mlir/include -isystem /local/home/psteinfeld/main/wait/build/tools/mlir/include -isystem /local/home/psteinfeld/main/wait/build/tools/clang/include -isystem /local/home/psteinfeld/main/wait/llvm/../clang/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wmisleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -Werror -Wno-deprecated-copy -fno-strict-aliasing -fno-semantic-interposition -O3 -DNDEBUG  -fno-exceptions -fno-rtti -UNDEBUG -std=c++17 -MD -MT tools/flang/lib/Lower/CMakeFiles/obj.FortranLower.dir/OpenACC.cpp.o -MF tools/flang/lib/Lower/CMakeFiles/obj.FortranLower.dir/OpenACC.cpp.o.d -o tools/flang/lib/Lower/CMakeFiles/obj.FortranLower.dir/OpenACC.cpp.o -c /local/home/psteinfeld/main/wait/flang/lib/Lower/OpenACC.cpp
/local/home/psteinfeld/main/wait/flang/lib/Lower/OpenACC.cpp: In function ‘void genACC(Fortran::lower::AbstractConverter&, Fortran::lower::pft::Evaluation&, const Fortran::parser::OpenACCWaitConstruct&)’:
/local/home/psteinfeld/main/wait/flang/lib/Lower/OpenACC.cpp:972:7: error: ‘genIfClause’ was not declared in this scope
       genIfClause(converter, ifClause, ifCond, stmtCtx);
       ^~~~~~~~~~~
/local/home/psteinfeld/main/wait/flang/lib/Lower/OpenACC.cpp:972:7: note: suggested alternative: ‘ifClause’
       genIfClause(converter, ifClause, ifCond, stmtCtx);
       ^~~~~~~~~~~
       ifClause
/local/home/psteinfeld/main/wait/flang/lib/Lower/OpenACC.cpp:975:7: error: ‘genAsyncClause’ was not declared in this scope
       genAsyncClause(converter, asyncClause, async, addAsyncAttr, stmtCtx);
       ^~~~~~~~~~~~~~
/local/home/psteinfeld/main/wait/flang/lib/Lower/OpenACC.cpp:975:7: note: suggested alternative: ‘asyncClause’
       genAsyncClause(converter, asyncClause, async, addAsyncAttr, stmtCtx);
       ^~~~~~~~~~~~~~
       asyncClause
At global scope:
cc1plus: error: unrecognized command line option ‘-Wno-deprecated-copy’ [-Werror]
cc1plus: all warnings being treated as errors
This revision now requires changes to proceed.Mar 24 2022, 7:18 AM
PeteSteinfeld accepted this revision.Mar 24 2022, 8:48 AM

All builds and tests correctly and looks good.

This revision is now accepted and ready to land.Mar 24 2022, 8:48 AM
This revision was automatically updated to reflect the committed changes.