[flang-commits] [PATCH] D110356: [flang] Make builtin types more easily accessible; use them

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Thu Sep 23 11:10:11 PDT 2021


klausler created this revision.
klausler added reviewers: jeanPerier, craig.rasmussen.
Herald added a subscriber: mgorny.
Herald added a reviewer: sscalpone.
Herald added a reviewer: awarzynski.
klausler requested review of this revision.

Rearrange the contents of __builtin_* module files a little and
make sure that semantics implicitly USEs the module __Fortran_builtins
before processing each source file.  This ensures that the special derived
types for TEAM_TYPE, EVENT_TYPE, LOCK_TYPE, &c. exist in the symbol table
where they will be available for use in coarray intrinsic function
processing.

Update IsTeamType() to exploit access to the __Fortran_builtins
module rather than applying ad hoc name tests.  Move it and some
other utilities from Semantics/tools.* to Evaluate/tools.* to make
them available to intrinsics processing.

Add/correct the intrinsic table definitions for GET_TEAM, TEAM_NUMBER,
and THIS_IMAGE to exercise the built-in TEAM_TYPE as an argument and
as a result.

Add/correct/extend tests accordingly.


https://reviews.llvm.org/D110356

Files:
  flang/include/flang/Evaluate/intrinsics.h
  flang/include/flang/Evaluate/tools.h
  flang/include/flang/Evaluate/variable.h
  flang/include/flang/Semantics/semantics.h
  flang/include/flang/Semantics/tools.h
  flang/lib/Evaluate/intrinsics.cpp
  flang/lib/Evaluate/tools.cpp
  flang/lib/Semantics/check-declarations.cpp
  flang/lib/Semantics/expression.cpp
  flang/lib/Semantics/mod-file.cpp
  flang/lib/Semantics/mod-file.h
  flang/lib/Semantics/resolve-names.cpp
  flang/lib/Semantics/runtime-type-info.cpp
  flang/lib/Semantics/semantics.cpp
  flang/lib/Semantics/tools.cpp
  flang/module/__fortran_builtins.f90
  flang/module/__fortran_type_info.f90
  flang/test/Semantics/misc-declarations.f90
  flang/test/Semantics/resolve88.f90
  flang/test/Semantics/this_image.f90
  flang/tools/f18/CMakeLists.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110356.374628.patch
Type: text/x-patch
Size: 34233 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20210923/73bd85f9/attachment-0001.bin>


More information about the flang-commits mailing list