Commit graph

3389 commits

Author SHA1 Message Date
Chirag Khandelwal 77ebfba68b [Flang][Openmp] Upgrade TASKGROUP construct to 5.0.
In OMP 5.0 specification clause-list with
* task_reduction
* allocate
were allowed on taskgroup construct.

Fix XFAIL - omp-taskloop01.f90.

Reviewed By: kiranchandramohan

Differential Revision: https://reviews.llvm.org/D93373
2021-08-03 10:27:47 +05:30
Andrzej Warzynski ad2e830fe2 [flang][nfc] Add a regression test for #50993
https://bugs.llvm.org/show_bug.cgi?id=50993 was effectively fixed in
https://reviews.llvm.org/D106727. This patch adds a regression
test specifically for the use case reported in 50993.

Differential Revision: https://reviews.llvm.org/D107260
2021-08-02 18:21:23 +00:00
peter klausler c4a65434d8 [flang] Symbol representation for dummy SubprogramDetails
Dummy procedures can be defined as subprograms with explicit
interfaces, e.g.

  subroutine subr(dummy)
    interface
      subroutine dummy(x)
        real :: x
      end subroutine
    end interface
    ! ...
  end subroutine

but the symbol table had no means of marking such symbols as dummy
arguments, so predicates like IsDummy(dummy) would fail.  Add an
isDummy_ flag to SubprogramNameDetails, analogous to the corresponding
flag in EntityDetails, and set/test it as needed.

Differential Revision: https://reviews.llvm.org/D106697
2021-08-02 10:44:27 -07:00
peter klausler bab86463df [flang] Fix IsSimplyContiguous() for the case of a pointer component
The result expression for the analysis of a Component is not (longer)
valid in the expression traversal framework used by IsSimplyContiguousHelper
now that it has a tri-state result.  Fix so that any result of
analyzing the component symbol is required to be true, not just
present.

Differential Revision: https://reviews.llvm.org/D106693
2021-08-02 09:43:43 -07:00
Andrzej Warzynski 23d4c4f3fb [flang][nfc] Fix variable names in FrontendOptions & PreprocessorOptions
As all member variables in `FrontendOptions` and `PreprocessorOptions`
are public, we should be naming them as `variable` rather than
`variable_` [1]. This patch fixes that.

Also, `FrontendOptions` & `PreprocessorOptions` are re-defined as a
structs rather than classes (all fields are meant to be public).

[1]
https://github.com/llvm/llvm-project/blob/main/flang/docs/C%2B%2Bstyle.md#naming

Differential Revision: https://reviews.llvm.org/D107062
2021-08-02 10:08:31 +00:00
peter klausler 3338ef93b0 [flang] Produce proper "preprocessor output" for -E option
Rename the current -E option to "-E -Xflang -fno-reformat".

Add a new Parsing::EmitPreprocessedSource() routine to convert the
cooked character stream output of the prescanner back to something
more closely resembling output from a traditional preprocessor;
call this new routine when -E appears.

The new -E output is suitable for use as fixed form Fortran source to
compilation by (one hopes) any Fortran compiler.  If the original
top-level source file had been free form source, the output will be
suitable for use as free form source as well; otherwise there may be
diagnostics about missing spaces if they were indeed absent in the
original fixed form source.

Unless the -P option appears, #line directives are interspersed
with the output (but be advised, f18 will ignore these if presented
with them in a later compilation).

An effort has been made to preserve original alphabetic character case
and source indentation.

Add -P and -fno-reformat to the new drivers.

Tweak test options to avoid confusion with prior -E output; use
-fno-reformat where needed, but prefer to keep -E, sometimes
in concert with -P, on most, updating expected results accordingly.

Differential Revision: https://reviews.llvm.org/D106727
2021-07-30 15:13:56 -07:00
Asher Mancinelli 65436e6ba1 [flang] Move External IO tests to use GTest
Port external-io test to use GTest. Remove Runtime tests directory.
Rename RuntimeGTest directory to Runtime.

This is the last in a series of patches which ported tests from the old
flang/unittests/Runtime test directory to use GTest in a temporary
unittest directory under flang/unittests/RuntimeGTest. Now that all the
tests in the old directory have been ported to use GTest, the old
directory has been removed and the GTest directory has been renamed to
flang/unittests/Runtime.

Differential Revision: https://reviews.llvm.org/D105315
Reviewed by: Meinersbur, awarzynski
2021-07-30 10:22:01 -06:00
Andrzej Warzynski 1a7ed9561a [flang] Fix flang (the bash wrapper script for the Flang driver)
Remove erroneous `||` at the end of an `if` condition. This was
introduced in https://reviews.llvm.org/D106871.
2021-07-30 09:02:35 +01:00
Mark Leair dfe9895a52 Fix scalar unit tests for all, any, maxloc, etc. that caused the ARM build
to fail due to warnings as errors. Note that I could not reproduce the
problem locally, but based on the messages, I think this change will fix
the errors.

Differential Revision: https://reviews.llvm.org/D107120
2021-07-29 21:15:57 -07:00
Mark Leair 2ca8295c86 Fix unit test checks for the scalar cases of all/any intrinsics. I
accidentally used int64 when they should have been int32. This lead to
a Windows build unit test error (Linux did not catch the problem).

Differential Revision: https://reviews.llvm.org/D107107
2021-07-29 15:07:19 -07:00
Mark Leair 1dbc9b534b Fix runtime internal error with certain intrinsics that can take a scalar
result descriptor (e.g., maxloc, minloc, maxval, minval, all, any, count,
parity, findloc, etc.)

Also add a scalar case for these intrinsic unit tests.

Differential Revision: https://reviews.llvm.org/D106820
2021-07-29 13:08:41 -07:00
Fangrui Song 72a83674dd Replace LLVM_ATTRIBUTE_NORETURN with C++11 [[noreturn]]. NFC
[[noreturn]] can be used since Oct 2016 when the minimum compiler requirement was bumped to GCC 4.8/MSVC 2015.
2021-07-29 09:59:45 -07:00
Andrzej Warzynski 8bf0a40608 [flang][driver] Forward -fopenmp/-fopenacc to the host compiler
This patch only modifies `flang` - the bash wrapper script.

`-fopenmp`/`-fopenacc` are required to enable the OpenMP/OpenACC
extension in the frontend and to make sure that the required libraries
are linked when generating the final binary. This patch makes sure that
`-fopnemp`/`-fopenacc` is used for both unparsing and the code
generation (via the host compiler).

Differential Revision: https://reviews.llvm.org/D106871
2021-07-29 11:21:56 +01:00
River Riddle f8479d9de5 [mlir] Set the namespace of the BuiltinDialect to 'builtin'
Historically the builtin dialect has had an empty namespace. This has unfortunately created a very awkward situation, where many utilities either have to special case the empty namespace, or just don't work at all right now. This revision adds a namespace to the builtin dialect, and starts to cleanup some of the utilities to no longer handle empty namespaces. For now, the assembly form of builtin operations does not require the `builtin.` prefix. (This should likely be re-evaluated though)

Differential Revision: https://reviews.llvm.org/D105149
2021-07-28 21:00:10 +00:00
Peter Steinfeld 571673ce39 [flang] Disallow BOZ literal constants as output list items
According to C7109, "A boz-literal-constant shall appear only as a
data-stmt-constant in a DATA statement, or where explicitly allowed in
16.9 as an actual argument of an intrinsic procedure."  This change
enforces that constraint for output list items.

I also added a general interface to determine if an expression is a BOZ
literal constant and changed all of the places I could find where it
could be used.

I also added a test.

This change stemmed from the following issue --
  https://gitlab-master.nvidia.com/fortran/f18-stage/issues/108

Differential Revision: https://reviews.llvm.org/D106893
2021-07-27 13:01:26 -07:00
Andrzej Warzynski cad2affb78 [flang][driver] Make flang ignore -Mfree/-Mfixed
`-Mfixed` is not supported by the new driver and hence
`flang`, the bash wrapper script, forwards it to the host compiler.
The forwarded options are used by the host compiler when compiling the
unparsed files. As the unparsed source files are always in the free
form, forwarding `-Mfixed` is problematic.

With this patch, `-Mfixed` (and `-Mfree` for consistency) will be
ignored altogether. The user will only see a warning. This is not a
particularly sound approach, but `flang` is only a temporary solution
for us and this workaround is a fair compromise.

Differential Revision: https://reviews.llvm.org/D106428
2021-07-27 13:12:28 +01:00
Diana Picus dc721064b4 [flang] Fix minor style issues. NFC 2021-07-27 10:29:50 +00:00
Diana Picus a5b2ec9c26 [flang] Fix thinko in CPU_TIME test
We used to test that end > start, but it can well be >= (otherwise the
loop doesn't make sense).
2021-07-27 10:29:50 +00:00
Peter Steinfeld 8f41431654 [flang] Disallow BOZ literal constants as arguments of implicit interfaces
Since BOZ literal arguments are typeless, we cannot know how to pass them as
actual arguments to procedures with implicit interfaces.  This change avoids
the problem by emitting an error message in such situations.

This change stemmed from the following issue --
  https://github.com/flang-compiler/f18-llvm-project/issues/794

Differential Revision: https://reviews.llvm.org/D106831
2021-07-26 15:04:05 -07:00
Michael Kruse cbad57613e [flang][msvc] Fix external-io unittest.
Fix the external-io unittest under Windows.

In particular, fixes the following issues:

 1.  When creating a temporary file, open it with read+write permissions
     using the _O_RDWR flag. _S_IREAD and _S_IWRITE are for the file
     permissions of the created file.

 2. _chsize returns 0 on success (just like ftruncate).

 3. To set a std::optional, use its assign-operator overload instead of
    getting a reference to its value and overwrite that. The latter is
    invalid if the std::optional has no value, and is caught by
    msvc's debug STL.

The non-GTest unittest is currently not executed under Windows because
of the added .exe extension to the output file: external-io.text.exe.
llvm-lit skips the file because .exe is not in the lists of test
suffixes (.test is). D105315 is going to change that by converting it
to a GTest-test.

Reviewed By: awarzynski

Differential Revision: https://reviews.llvm.org/D106726
2021-07-26 15:34:35 -05:00
peter klausler 4d42e16eb8 [flang] runtime: fix problems with I/O around EOF & delimited characters
When a WRITE overwrites an endfile record, we need to forget
that there was an endfile record.  When doing a BACKSPACE
after an explicit ENDFILE statement, the position afterwards
must be upon the endfile record.

Attempts to join list-directed delimited character input across
record boundaries was due to a bad reading of the standard
and has been deleted, now that the requirements are better understood.
This problem would cause a read attempt past EOF if a delimited
character input value was at the end of a record.

It turns out that delimited list-directed (and NAMELIST) character
output is required to emit contiguous doubled instances of the
delimiter character when it appears in the output value.  When
fixed-size records are being emitted, as is the case with internal
output, this is not possible when the problematic character falls
on the last position of a record.  No two other Fortran compilers
do the same thing in this situation so there is no good precedent
to follow.

Because it seems least wrong, with this patch we now emit one copy
of the delimiter as the last character of the current record and
another as the first character of the next record.  (The
second-least-wrong alternative might be to flag a runtime error,
but that seems harsh since it's not an explicit error in the standard,
and the output may not have to be usable later as input anyway.)
Consequently, the output is not suitable for use as list-directed or
NAMELIST input.

If a later standard were to clarify this case, this behavior will of
course change as needed to conform.

Differential Revision: https://reviews.llvm.org/D106695
2021-07-23 18:23:26 -07:00
peter klausler e093cbb7ae [flang] Runtime: Reset list-directed input state for each NAMELIST item
NAMELIST I/O formatting uses the runtime infrastructure for
list-directed I/O.  List-directed input processing has same state
that requires reinitialization for each successive NAMELIST input
item.  This patch fixes bugs with "null" items and repetition counts
on NAMELIST input items after the first in the group.

Differential Revision: https://reviews.llvm.org/D106694
2021-07-23 18:21:33 -07:00
Peter Steinfeld 7898e7c82d [flang] Implement the runtime portion of the CSHIFT intrinsic
This change fixes a bug in  the runtime portion of the CSHIFT intrinsic
that happens when the value of the SHIFT argument is negative.

Differential Revision: https://reviews.llvm.org/D106292
2021-07-21 13:39:21 -07:00
Peter Steinfeld ece9aa29ff [flang] Implement the runtime portion of the UNPACK intrinsic
I'd previously merged this into the fir-dev branch.  This change is to
do the same thing to the main branch of llvm-project.

Differential Revision: https://reviews.llvm.org/D106294
2021-07-21 08:03:49 -07:00
peter klausler 13e08de91d [flang] Two tweaks to mollify buildbots
One test's expected output needs adjustment, and one new compiler
warning needs to be silenced.
2021-07-20 19:42:05 -07:00
peter klausler 0fab536900 [flang] Remove now-unused private data member, silence warning
A field in DescriptorAddendum became unused during a recent
change but was not removed from the definition; it now elicits
a legitimate warning that's affecting some buildbots.  Remove it.
2021-07-20 17:24:39 -07:00
peter klausler b43e083bb6 [flang] Don't require newline at EOF in unformatted sequential runtime input
F18 was sigalling an end-of-file error condition when reading an
unformatted sequential input file without an ultimate newline
(or CR-LF). Other Fortran implementations can handle it, so change
the runtime to support it.

Differential Revision: https://reviews.llvm.org/D106321
2021-07-20 15:25:09 -07:00
peter klausler a48e41683a [flang] Run-time derived type initialization and destruction
Use derived type information tables to drive default component
initialization (when needed), component destruction, and calls to
final subroutines.  Perform these operations automatically for
ALLOCATE()/DEALLOCATE() APIs for allocatables, automatics, and
pointers.  Add APIs for use in lowering to perform these operations
for non-allocatable/automatic non-pointer variables.
Data pointer component initialization supports arbitrary constant
designators, a F'2008 feature, which may be a first for Fortran
implementations.

Differential Revision: https://reviews.llvm.org/D106297
2021-07-20 15:24:16 -07:00
peter klausler 4e92962127 [flang] Fix legitimate warning from latest GCC
A rank-0 static descriptor needs to be a vector; it's for
"v-list" values in defined derived type formatted I/O.

(Pushed without pre-review due to high confidence and an
unwell buildbot.)
2021-07-20 11:40:34 -07:00
peter klausler ad424cf1ed [flang] Runtime API for data pointers
Define and implement an API for use by lowering to
implement operations on pointers.

Differential Revision: https://reviews.llvm.org/D106170
2021-07-19 08:23:06 -07:00
Mark Leair d0f1ae6eb6 Add a scalar argument case for the Fortran spread intrinsic unit test. 2021-07-16 12:19:08 -07:00
Andrzej Warzynski aa06f34dac [flang][driver] Fix output filename generation in flang
In the `flang` bash script, we need to be careful _when_ to use <output>
from `flang -c -o <output> <input>` when generating the relocatable
output file name.

In particular, we should use it in this case:
```compilation only
flang -c -o <output> <input>
```
but leave it for the final executable here:
```compile, assemble and link
flang  -o <output> <input>
```
This change is implemented in `get_relocatable_name`.

I've also taken the liberty to fix how errors from sub-commands are
reported (without this change, `flang` always returns `0` on failure).
This is implemented in `main`.

Differential Revision: https://reviews.llvm.org/D105896
2021-07-16 17:06:06 +01:00
Andrzej Warzynski 9f6ff37a36 [flang][driver] Randomise the names of the unparsed files
This patch makes sure that the base name of the temporary unparsed files
(generated by the `flang` bash script) are randomised and unique to a
particular invocation of the script. Otherwise, we cannot reliably run
the script in parallel.

Differential Revision: https://reviews.llvm.org/D106052
2021-07-15 17:17:50 +01:00
Peixin Qiao 67002b5f20 [flang][OpenMP] Fix semantic check of test case in taskloop simd construct
The following semantic check is removed in OpenMP Version 5.0:
```
Taskloop simd construct restrictions: No reduction clause can be specified.
```

Also fix several typos.

Reviewed By: kiranchandramohan

Differential Revision: https://reviews.llvm.org/D105874
2021-07-14 10:34:17 -04:00
Andrzej Warzynski fe892114e3 [flang][nfc] Simplify CMake
Folds `list(APPEND <list> [<element>...])` into the definition of
`<list>`.
2021-07-12 17:11:33 +00:00
Andrzej Warzynski 739f49ed12 [flang][driver] Fix how output filename is generated
Currently, `flang -c file.f` generates `flang_unparsed_source_file_0.o`.
This is incorrect. This patch:
  * simplifies the logic around output filename generation, and
  * makes sure that `file.o` is produced instead of e.g.
    `flang_unparsed_source_file_0.o` when using the `-c` flag

The output filename generation is moved to a dedicated function. I've
also made a few minor improvements, e.g. marked variables as local,
added comments, refined error messages.

Differential Revision: https://reviews.llvm.org/D105546
2021-07-09 19:15:12 +01:00
Johannes Doerfert d8fc4e9c0d [Flang][Docs] Update meeting URL 2021-07-07 10:35:35 -05:00
Jean Perier c2d4d6a1fd [flang] Create HostAssocDetails symbols when needed for mis-parsed ArrayRef
Name resolution is always creating symbols with HostAssocDetails
for host variable names inside internal procedures. This helps lowering
identifying and dealing with such variables inside internal procedures.

However, the case where the variable appears in an ArrayRef mis-parsed
as a FunctionRef goes through a different name resolution path that did
not create such HostAssocDetails when needed. Pointer assignment RHS
are also skipping this path.

Add the logic to create HostAssocDetails for host symbols inisde internal
procedures that appear in mis-parsed ArrayRef or in pointer assignment RHS.

Differential Revision: https://reviews.llvm.org/D105464
2021-07-07 10:07:19 +02:00
Andrzej Warzynski 45e5214b43 [flang][driver] Add support for --version in the bash wrapper
The bash wrapper script, `flang`, calls `flang-new -fc1` under the hood,
which does not support `--version` (this is consistent with `clang -cc1
--version`). This change is needed for `flang --version` to work as
expected.

Note that `flang --version` (the Flang bash wrapper script for the
compiler driver) gives rather minimal output compared to `flang-new
--version` (the Flang compiler driver). As the wrapper script is just a
temporary solution for us, this should be sufficient.

Differential Revision: https://reviews.llvm.org/D105352
2021-07-03 10:47:41 +01:00
Andrzej Warzynski e77191c35e [flang][driver] Extend the flang bash script to act as a driver
Until now, `f18` would:
  1. Use Flang to unparse the input files
  2. Call an external Fortran compiler to compile the unparsed source
  files (generated in step 1)

With this patch, `f18` will stop after unparsing the input source files,
i.e. step 1 above. The `flang` bash script will take care of step 2,
i.e. calling an external Fortran compiler driver to compile them. This
way:
  * the functionality of `f18` is reduced - it will only drive Flang (as
  opposed to delegating code-generation to an external tool on top of
  this)
  * we will able to switch between `f18` and `flang-new` for unparsing before
  an external Fortran compiler is called for code-generation

The updated `flang` bash script needs to specify the output file when
using the `-fdebug-unparse` action. Both `f18` and `flang-new` have been
updated accordingly.

These changes were discussed in [1] as a requirement for replacing `f18`
with `flang-new`.

[1] https://lists.llvm.org/pipermail/flang-dev/2021-April/000677.html

Differential Revision: https://reviews.llvm.org/D103177
2021-07-01 13:56:38 +01:00
Andrzej Warzynski c1f068b8f1 [flang] Revert "PoC for Flang Driver Plugins"
This patch has not been reviewed and was commited by accident.

This reverts commit 788a5d4afe.
2021-07-01 08:27:31 +00:00
Andrzej Warzynski ea3698ded3 [flang][docs] Add documentation for the new Flang driver
Differential Revision: https://reviews.llvm.org/D104229
2021-07-01 08:14:54 +00:00
Stuart Ellis 788a5d4afe PoC for Flang Driver Plugins 2021-07-01 08:10:40 +00:00
Michael Kruse 5d933c0b0c [Flang][test] Fix Windows buildbot after D104930.
Add

    REQUIRES: shell

to the unpack.f90 test that executes a UNIX shell script.
2021-06-29 17:01:45 +00:00
Diana Picus b8bac6b33c [flang] Add runtime interface for SYSTEM_CLOCK
SYSTEM_CLOCK may take up to 3 optional parameters, all of which are
INTENT(OUT). The COUNT and COUNT_MAX parameters are integer scalars,
while COUNT_RATE may be a real or integer scalar.

This patch breaks up the interface into 3 different functions, one for
each parameter. All 3 return integers. It is up to lowering to convert
the results to the preferred type.

Differential Revision: https://reviews.llvm.org/D104851
2021-06-29 08:25:01 +00:00
peter klausler cd0a1226b5 [flang] Fix "non-advancing" I/O, support $ in FORMAT
Non-advancing I/O was failing; ExternalFileUnit was losing
track of what writes had been committed to the file.  Fixed.
Also, support the common extension of $ and \ in a FORMAT
as being equivalent to ADVANCE=NO.

Differential Revision: https://reviews.llvm.org/D105046
2021-06-28 12:18:25 -07:00
peter klausler 43fadefb0e [flang] Implement user-defined derived type runtime I/O
With derived type description tables now available to the
runtime library, it is possible to implement the concept
of "child" I/O statements in the runtime and use them to
convert instances of derived type I/O data transfers into
calls to user-defined subroutines when they have been specified
for a type.  (See Fortran 2018, subclauses 12.6.4.8 & 13.7.6).

 - Support formatted, list-directed, and NAMELIST
   transfers to internal parent units; support these, and unformatted
   transfers, for external parent units.
 - Support nested child defined derived type I/O.
 - Parse DT'foo'(v-list) FORMAT data edit descriptors and passes
   their strings &/or v-list values as arguments to the defined
   formatted I/O routines.
 - Fix problems with this feature encountered in semantics and
   FORMAT valiation during development and end-to-end testing.
 - Convert typeInfo::SpecialBinding from a struct to a class
   after adding a member function.

Differential Revision: https://reviews.llvm.org/D104930
2021-06-28 11:36:19 -07:00
Peter Steinfeld 57e53f0130 [flang] Fix conformability for intrinsic procedures
There are situations where the arguments of intrinsics must be
conformable, which is defined in section 3.36.  This means they must
have "the same shape, or one being an array and the other being scalar".
But the check we were actually making was that their ranks were the same.

This change fixes that and adds a test for the UNPACK intrinsic, where
the FIELD argument "shall be conformable with MASK".

Differential Revision: https://reviews.llvm.org/D104936
2021-06-28 11:09:24 -07:00
naromero77 d6cb0143cc [flang][docs] Minor update to Fortran LLVM Tests-suite docs.
Updated Fortran LLVM Test-suite docs to reflect latest changes.

Reviewed By: Meinersbur, xgupta

Differential Revision: https://reviews.llvm.org/D104961
2021-06-28 10:01:29 -05:00
peter klausler 3cc5d4ff8e [flang] Fix generic/specific procedure confusion
A recent change that extended semantic analysis for actual arguments
that associate with procedure dummy arguments exposed some bugs in
regression test suites due to points of confusion in symbol table
handling in situations where a generic interface contains a specific
procedure of the same name.  When passing that name as an actual
argument, for example, it's necessary to take this possibility into
account because the symbol for the generic interface shadows the
symbol of the same name for the specific procedure, which is
what needs to be checked.  So add a small utility that bypasses
the symbol for a generic interface in this case, and use it
where needed.

Differential Revision: https://reviews.llvm.org/D104929
2021-06-25 11:54:29 -07:00
Andrzej Warzynski c3ebb53eab [flang][unittest] Add a missing dependency
In https://reviews.llvm.org/D103612, a definition of an instance of
`Fortran::parser::AnalyzedObjectsAsFortran` was moved (that object is
used in unparsing). That, in turn, introduced a dependency of the unit
tests on the `FortranEvaluate` library, which defines
`AnalyzedObjectsAsFortran`.

That dependency was missed in D103612 and has caused shared-library
builds to fail. I'm submitting this without a review, as it's rather
straightforward omission.
2021-06-25 16:42:45 +01:00
Andrzej Warzynski 2a7bb8494e [flang][driver] Add -fno-analyzed-objects-for-unparse
This patch adds a new option for the new Flang driver:
`-fno-analyzed-objects-for-unparse`. The semantics are similar to
`-funparse-typed-exprs-to-f18-fc` from `f18`. For consistency, the
latter is replaced with `-fno-analyzed-objects-for-unparse`.

The new option controls the behaviour of the unparser (i.e. the action
corresponding to `-fdebug-unparse`). The default behaviour is to use the
analyzed objects when unparsing. The new flag can be used to turn this
off, so that the original parse-tree objects are used. The analyzed
objects are generated during the semantic checks [1].

This patch also updates the semantics of
`-fno-analyzed-objects-for-unparse`/`-funparse-typed-exprs-to-f18-fc`
in `f18`, so that this flag is always taken into account when `Unparse`
is used (this way the semantics in `f18` and `flang-new` are identical).

The added test file is based on example from Peter Steinfeld.

[1]
https://github.com/llvm/llvm-project/blob/main/flang/docs/Semantics.md

Differential Revision: https://reviews.llvm.org/D103612
2021-06-25 13:28:12 +01:00
Mark Leair a103402288 Change the flang reshape runtime routine interface to use a result
argument instead of a result result object.

Change the reshape flang unit test to use the new interface. Also, add an
order argument to exercise the order subscript code in the rehsape runtime
routine.

Differential Revision: https://reviews.llvm.org/D104586
2021-06-24 17:05:12 -07:00
Fangrui Song f1e2d5851b [OptTable] Rename PrintHelp to printHelp
To be consistent with other member functions and match the coding standard.
2021-06-24 14:47:03 -07:00
Martin Storsjö 2716c6faa4 [flang] Tweak the conditions for the GCC 7/libstdc++ workaround
This adjusts the workaround from D104731.

The issue lies in libstdc++'s classes, not GCC itself, and manifests
itself in the same way if building e.g. with clang while using
libstdc++ headers from GCC 7 (e.g. if building with Clang on Ubuntu 18.04,
while using the system default C++ library).

Therefore, change the condition to look for the version of libstdc++
instead of the compiler.

Differential Revision: https://reviews.llvm.org/D104779
2021-06-23 23:19:32 +03:00
River Riddle 00c93d8801 Fix flang build after D104167 2021-06-23 18:18:54 +00:00
peter klausler e3b2f1b682 [flang] [NFC] Repair build with GCC 7.3
Work around two problems with GCC 7.3.
One is its inability to implement "constexpr operator=(...) = default;"
in a class with a std::optional<> component; another is a legitimate-
looking warning about an unused variable.

Differential Revision: https://reviews.llvm.org/D104731
2021-06-22 13:52:30 -07:00
peter klausler 503c085e3b [flang] Fold more reduction intrinsic function calls
Refactor the recently-implemented MAXVAL/MINVAL folding so
that the parts that can be used to implement other reduction
transformational intrinsic function folding are exposed.

Use them to implement folding of IALL, IANY, IPARITY,
SUM. and PRODUCT.  Replace the folding of ALL & ANY to
use the new infrastructure and become able to handle DIM=
arguments.

Differential Revision: https://reviews.llvm.org/D104562
2021-06-21 10:13:59 -07:00
Peter Steinfeld e7f78fb917 [flang] Implement constant folding for the NOT intrinsic
I implemented constant folding for the NOT intrinsic and added some tests.

Differential Revision: https://reviews.llvm.org/D104587
2021-06-20 07:25:05 -07:00
Michael Kruse f075760317 [Flang][test] Fix Windows buildbot.
Add

    REQUIRES: shell

to tests that execute a UNIX shell script to not run on Windows.
2021-06-19 22:23:02 -05:00
peter klausler b3c1f53c98 [flang] Recode a switch() to dodge a sketchy warning
One of the buildbots uses a compiler (can't tell which) that
doesn't approve of a "default:" in a switch statement whose
cases appear to completely cover all possible values of an
enum class.  But this switch is in raw data dumping code that
needs to allow for incorrect values in memory.  So rewrite it
as a cascade of if statements; performance doesn't matter here.
2021-06-18 16:58:44 -07:00
peter klausler 36f93fc594 [flang] Fix clang build (struct/class mismatch warning)
A recent patch changed a struct into a class, but missed a
forward definition.  GCC didn't warn, but clang does.  Fix.
2021-06-18 15:12:51 -07:00
Arnamoy Bhattacharyya 8fdd475c85 [flang][OpenMP] Add semantic checks for occurrence of nested Barrier regions
This patch adds the following nesting check for `barrier` constructs:

```
A barrier region may not be closely nested inside a worksharing, loop, task, taskloop, critical, ordered, atomic, or master region.
```

Also adds a test case for the check,

Reviewed By: kiranchandramohan

Differential Revision: https://reviews.llvm.org/D99888
2021-06-18 16:24:36 -04:00
peter klausler 79caf69cc0 [flang] Runtime implementation for default derived type formatted I/O
This is *not* user-defined derived type I/O, but rather Fortran's
built-in capabilities for using derived type data in I/O lists
and NAMELIST groups.

This feature depends on having the derived type description tables
that are created by Semantics available, passed through compilation
as initialized static objects to which pointers can be targeted
in the descriptors of I/O list items and NAMELIST groups.

NAMELIST processing now handles component references on input
(e.g., "&GROUP x%component = 123 /").

The C++ perspectives of the derived type information records
were transformed into proper classes when it was necessary to add
member functions to them.

The code in Semantics that generates derived type information
was changed to emit derived type components in component order,
not alphabetic order.

Differential Revision: https://reviews.llvm.org/D104485
2021-06-18 10:30:28 -07:00
Diana Picus 4498137bd7 [flang] Rewrite test for CPU_TIME
Don't rely on volatile writes to keep the CPU busy - it seems MSVC
optimizes them out, so we don't get different values for 'start' and
'end' on Windows. Rewrite the test to loop until we get a different
value for 'end'.

Fix suggested by Michael Kruse in
https://reviews.llvm.org/rG57e85622bbdb2eb18cc03df2ea457019c58f6912#inline-6002

Committing to fix the Windows buildbot, post-commit comments welcome!
2021-06-18 09:12:24 +00:00
Jean Perier 1a4af2e45e [flang] preserve symbol in DescriptorInquiry
Do not use ultimate symbols in DescriptorInquiry. Using the ultimate
symbol may lead to issues later for at least two reasons:

- The original symbols may have volatile/asynchronous attributes that
  the ultimate may not have. Later phases working on the DescriptorInquiry
  would then not apply potential care required by these attributes.
- HostAssociatedDetails symbols are used by OpenMP for symbols with
  special OpenMP attributes inside OpenMP region (e.g variables with
  private attribute), so it is very important to preserve this
  aspect in the DescriptorInquiry, that would otherwise apply on the
  symbol outside of the region.

Differential Revision: https://reviews.llvm.org/D104385
2021-06-17 12:42:08 +02:00
peter klausler 562bfe1274 [flang] Complain about more cases of calls to insufficiently defined procedures
When a function is called in a specification expression, it must be
sufficiently defined, and cannot be a recursive call (10.1.11(5)).
The best fix for this is to change the contract for the procedure
characterization infrastructure to catch and report such errors,
and to guarantee that it does emit errors on failed characterizations.
Some call sites were adjusted to avoid cascades.

Differential Revision: https://reviews.llvm.org/D104330
2021-06-16 18:20:59 -07:00
peter klausler fc4f457fcc [flang] Fix ARM/POWER test failure (folding20.f90)
Recent code for folding MINVAL() didn't allow for architectures
whose C/C++ char type is unsigned, so the value of the maximum
Fortran character was incorrect.  This was caught by the
folding20.f90 test.  The fix is to avoid numeric_limits<> and
use hard values for max signed integers of various character kinds.

Pushing into llvm-project/main to restore ARM/POWER buildbots.
2021-06-16 16:41:08 -07:00
peter klausler fdf33771fe [flang] Implement runtime for IALL & IANY
We had IPARITY (xor-reduction) but I missed IALL (and)
and IANY (or).

Differential Revision: https://reviews.llvm.org/D104339
2021-06-16 14:54:36 -07:00
peter klausler c375ec8613 [flang] Use a "double-double" accumulator in SUM
Use a "double-double" accumulator, a/k/a Kahan summation,
in the SUM intrinsic in the runtime for real & complex.
This seems to be the best-recommended technique for reducing
error, as opposed to the initial implementation of SUM's
distinct accumulators for positive and negative items.

Differential Revision: https://reviews.llvm.org/D104338
2021-06-16 14:29:39 -07:00
peter klausler 47f18af55f [flang] Fold MAXVAL & MINVAL
Implement constant folding for the reduction transformational
intrinsic functions MAXVAL and MINVAL.

In anticipation of more folding work to follow, with (I hope)
some common infrastructure, these two have been implemented in a
new header file.

Differential Revision: https://reviews.llvm.org/D104337
2021-06-16 14:06:34 -07:00
Andrzej Warzynski 46446e398b [flang][driver] Add missing ! REQUIRES LIT directive
The test added in https://reviews.llvm.org/D104305 will only work with
the new driver and should be marked as such.

Sending this without a review as it's fairly straightforward and fixes
test failures for developers that don't want to build the new driver.
2021-06-16 21:00:13 +00:00
peter klausler ec3049c79b [flang] Cope with errors with array constructors
When a program attempts to put something like a subprogram
into an array constructor, emit an error rather than crashing.

Differential Revision: https://reviews.llvm.org/D104336
2021-06-16 13:44:20 -07:00
peter klausler e5813a683a [flang] Fix crashes on calls to non-procedures
When a procedure reference is attempted to an entity that just
isn't a procedure, say so.

Differential Revision: https://reviews.llvm.org/D104329
2021-06-16 12:48:54 -07:00
peter klausler 3061334e0d [flang] Don't crash on some bogus expressions
Recover more gracefully from user errors in expressions.

Differential Revision: https://reviews.llvm.org/D104326
2021-06-16 12:26:39 -07:00
peter klausler 8ba9ee46e4 [flang] Correct the subscripts used for arguments to character intrinsics
When chasing down another unrelated bug, I noticed that the
implementations of various character intrinsic functions assume
that the lower bounds of (some of) their arguments were 1.
This isn't necessarily the case, so I've cleaned them up, tweaked
the unit tests to exercise the fix, and regularized the allocation
pattern used for results to use SetBounds() before Allocate() rather
than the old original Descriptor::Allocate() wrapper around
CFI_allocate().

Since there were few other remaining uses of the old original
Descriptor::Allocate() wrapper, I also converted them to the
new one and deleted the old one.

Differential Revision: https://reviews.llvm.org/D104325
2021-06-16 10:26:25 -07:00
Diana Picus 0ad051b5fc [flang] Check there's no dependency on C++ libs. NFC
Add a test to make sure the flang runtime doesn't pull in the C++
runtime libraries.

This is achieved by adding a C file that calls some functions from the
runtime (currently only CpuTime, but we should probably add anything
complicated enough, e.g. IO-related things). We force the C compiler to
use -std=c90 to make sure it's really in C mode (we don't really care
which version of the standard, this one is probably more widely
available). We only enable this test if CMAKE_C_COMPILER is set to
something (which is probably always true in practice).

This is a recommit of 7ddbf26, with 2 fixes:
* Replace C++ comments with C comments
* Only enable the test if libFortranRuntime.a exists (this might not be
the case if e.g. BUILD_SHARED_LIBS=On)

Differential Revision: https://reviews.llvm.org/D104290
2021-06-16 11:38:25 +00:00
Diana Picus dfa0f3ee0e Revert "[flang] Check there's no dependency on C++ libs"
This reverts commit 7ddbf26339.

This doesn't work if we're not building libFortranRuntime.a. I'll
recommit with a fix.
2021-06-16 11:09:08 +00:00
Diana Picus 10ae933b0b [flang] Fixup 7ddbf26339
Replace C++ comments with C-style comments (not sure why my C compiler
doesn't complain about this).
2021-06-16 09:43:07 +00:00
Diana Picus 45cd405dc0 [flang] Add clang-tidy check for braces around if
Flang diverges from the llvm coding style in that it requires braces
around the bodies of if/while/etc statements, even when the body is
a single statement.

This commit adds the readability-braces-around-statements check to
flang's clang-tidy config file. Hopefully the premerge bots will pick it
up and report violations in Phabricator.

We also explicitly disable the check in the directories corresponding to
the Lower and Optimizer libraries, which rely heavily on mlir and llvm
and therefore follow their coding style. Likewise for the tools
directory.

We also fix any outstanding violations in the runtime and in
lib/Semantics.

Differential Revision: https://reviews.llvm.org/D104100
2021-06-16 09:13:53 +00:00
Diana Picus 7ddbf26339 [flang] Check there's no dependency on C++ libs
Add a test to make sure the flang runtime doesn't pull in the C++
runtime libraries.

This is achieved by adding a C file that calls some functions from the
runtime (currently only CpuTime, but we should probably add anything
complicated enough, e.g. IO-related things). We force the C compiler to
use -std=c90 to make sure it's really in C mode (we don't really care
which version of the standard, this one is probably more widely
available). We only enable this test if CMAKE_C_COMPILER is set to
something (which is probably always true in practice).

Differential Revision: https://reviews.llvm.org/D104290
2021-06-16 08:23:43 +00:00
Andrzej Warzynski 062644bb39 [flang][nfc] Move external-hello-world to flang/examples
As `external-hello-world` is not really a test, I am moving it from
`flang/unittest/Runtime` to `flang/examples` (it makes a lot of sense as
an example). I've not modified the source code (apart from adjusting the
include paths).

Differential Revision: https://reviews.llvm.org/D104320
2021-06-16 08:00:50 +00:00
Andrzej Warzynski a6be6e31f1 [flang][driver] Add -fdebug-dump-all
The new option will run the semantic checks and then dump the parse tree
and all the symbols. This is equivalent to running the driver twice,
once with `-fdebug-dump-parse-tree` and then with
the `-fdebug-dump-symbols` action flag.

Currently we wouldn't be able to achieve the same by simply running:
```
flang-new -fc1 -fdebug-dump-parse-tree -fdebug-dump-symbols <input-file>
```
That's because the new driver will only run one frontend action per
invocation (both of the flags used here are action flags). Diverging
from this design would lead to costly compromises and it's best avoided.

We may want to consider re-designing our debugging actions (and action
options) in the future so that there's more code re-use. For now, I'm
focusing on making sure that we support all the major cases requested by
our users.

Differential Revision: https://reviews.llvm.org/D104305
2021-06-16 07:54:27 +00:00
Peter Steinfeld bda1f2936e [flang] Add semantic check for the RANDOM_SEED intrinsic
I added the only check that wasn't already tested along with tests for
many valid and invalid arguments.

Differential Revision: https://reviews.llvm.org/D104318
2021-06-15 21:27:54 -07:00
Isaac Perry 80ea006ef9 [flang] [openmp] Add Fortran specific semantic check 4 for OpenMP Allocate directive.
This patch adds the 4th Fortran specific semantic check for the OpenMP
allocate directive: "If a list item has the SAVE attribute, is a common
block name, or is declared in the scope of a module, then only predefined
memory allocator parameters can be used in the allocator clause".

Code in this patch was based on code from https://reviews.llvm.org/D93549/new/.

Differential Revision: https://reviews.llvm.org/D102400
2021-06-15 16:04:04 +01:00
Asher Mancinelli c58cf692f4 [flang] Move buffer runtime test to GTest
Move buffer unit test from Runtime directory to RuntimeGtest
directory and use GTest. Test coverage is only maintained.

Differential Revision: https://reviews.llvm.org/D102335
Reviewed By: awarzynski, klausler
2021-06-14 10:13:32 -07:00
Peter Steinfeld b88fa0e39f [flang] Fix compilation problem with rename of "MemRefDataFlow"
Revision https://reviews.llvm.org/D104190 renamed MemRefDataFlow -> AffineScalarReplacement.  After this rename, mlir failed to build.  With this change, all of clang, mlir, and flang build and test correctly.

Differential Revision: https://reviews.llvm.org/D104223
2021-06-14 07:01:11 -07:00
Diana Picus 166192eb78 [flang] Add POSIX implementation for CPU_TIME
Add an implementation for CPU_TIME using the POSIX function
clock_gettime. I think on most POSIX systems this will be included for
free via <ctime>, which corresponds to "time.h" (YMMV, we can fix the
code if the need arises).

Detecting that clock_gettime is available is tricky. For instance, commit
827407a86a used the following incantation in f18-parse-demo.cpp:

  #if _POSIX_C_SOURCE >= 199309L && _POSIX_TIMERS > 0 && _POSIX_CPUTIME && \
    defined CLOCK_PROCESS_CPUTIME_ID

This doesn't work on my AArch64 Ubuntu system, which provides
clock_gettime but doesn't define _POSIX_TIMERS. Since finding the right
combination of macros requires infinite time, patience and access to
sundry POSIX systems, we should probably try a different approach.

This patch attempts to use SFINAE instead of the preprocessor to choose
an implementation for CPU_TIME. We define a helper function template
which helps us check if clock_gettime is available (and has the
interface we expect). I hope the comments explain it well enough.

This approach has the advantage that it keeps the detection of
clock_gettime close to the code that uses it. An alternative would be to
use CMake to check for the symbol (I personally haven't used this before
so I don't know if there are any quirks).

Differential Revision: https://reviews.llvm.org/D104020
2021-06-14 09:41:11 +00:00
Diana Picus 57e85622bb [flang] Add initial implementation for CPU_TIME
Add an implementation for CPU_TIME based on std::clock(), which should
be available on all the platforms that we support.

Also add a test that's basically just a sanity check to make sure we
return positive values and that the value returned at the start of some
amount of work is larger than the one returned after the end.

Differential Revision: https://reviews.llvm.org/D104019
2021-06-14 07:48:09 +00:00
Michael Kruse dbc262968f [Flang][test] Fix Windows buildbot.
Commit 1b241b9b40 /
patch https://reviews.llvm.org/D104130 introduced an new test which
calls a UNIX shell script. Add
REQUIRES: shell
to not run it on Windows.
2021-06-11 23:25:33 -05:00
Peter Steinfeld 1b241b9b40 [flang] Handle multiple USE statements for the same module
It's possible to have several USE statements for the same module that
have different mixes of rename clauses and ONLY clauses.  The presence
of a rename cause has the effect of hiding a previously associated name,
and the presence of an ONLY clause forces the name to be visible even in
the presence of a rename.

I fixed this by keeping track of the names that appear on rename and ONLY
clauses.  Then, when processing the USE association of a name, I check to see
if it previously appeared in a rename clause and not in a USE clause.  If so, I
remove its USE associated symbol.  Also, when USE associating all of the names
in a module, I do not USE associate names that have appeared in rename clauses.

I also added a test.

Differential Revision: https://reviews.llvm.org/D104130
2021-06-11 12:27:19 -07:00
Michael Kruse 7836d058c7 [Flang] Compile fix after D99459.
Fix Flang build after addition of a new OpenMP clauses for a Clang
patch (D99459). Flang is using TableGen to generation the declaration
of clause checks and the new clause was missing a definiton.
2021-06-10 21:01:09 -05:00
Zachary Selk a0bd24453b [flang] Fixed simple typo in runtime code
Reviewed By: klausler

Differential Revision: https://reviews.llvm.org/D104034
2021-06-10 11:14:25 -06:00
Michael Kruse 0112f6ac71 [Flang][Runtime][tests] Escape regex special character.
The second argument of `ASSERT_DEATH` describes a regular expression, in
which parentheses have special meaning. Matches of literal parentheses
need to be escaped.

Fixes failure of InvalidFormatFailure.ParenMismatch and
InvalidFormatFailure.ParenMismatch when gtest is compiled with MSVC's
regex implementation.

Reviewed By: awarzynski

Differential Revision: https://reviews.llvm.org/D104011
2021-06-10 11:30:23 -05:00
Michael Kruse 58c3f20bbf [flang][windows] Run regression tests under Windows. NFCI.
Allow the lit test suite to run under Windows. This encompasses the following changes:

 * Define `lit_tools_dir` for flang's test configuration
 * Replace `(<command> || true)` idiom with `not <command>`
 * Add `REQUIRES: shell` on tests that invoke a shell script

Reviewed By: awarzynski

Differential Revision: https://reviews.llvm.org/D89368
2021-06-10 05:13:44 -05:00
Diana Picus 35b0ddab0e [flang] Define the API for CPU_TIME
CPU_TIME takes a single real scalar INTENT(OUT) argument. We can
therefore return a double and let lowering handle casting that to the
precision used for the default real kind.

Differential Revision: https://reviews.llvm.org/D103805
2021-06-09 08:20:58 +00:00
David Blaikie 49454ebc56 .clang-tidy: Disable misc-no-recursion in general/across the monorepo 2021-06-08 08:31:33 -07:00
David Blaikie c5d56fec50 NFC: .clang-tidy: Inherit configs from parents to improve maintainability
In the interests of disabling misc-no-recursion across LLVM (this seems
like a stylistic choice that is not consistent with LLVM's
style/development approach) this NFC preliminary change adjusts all the
.clang-tidy files to inherit from their parents as much as possible.

This change specifically preserves all the quirks of the current configs
in order to make it easier to review as NFC.

I validatad the change is NFC as follows:

for X in `cat ../files.txt`;
do
  mkdir -p ../tmp/$(dirname $X)
  touch $(dirname $X)/blaikie.cpp
  clang-tidy -dump-config $(dirname $X)/blaikie.cpp > ../tmp/$(dirname $X)/after
  rm $(dirname $X)/blaikie.cpp
done

(similarly for the "before" state, without this patch applied)

for X in `cat ../files.txt`;
do
  echo $X
  diff \
    ../tmp/$(dirname $X)/before \
    <(cat ../tmp/$(dirname $X)/after \
      | sed -e "s/,readability-identifier-naming\(.*\),-readability-identifier-naming/\1/" \
      | sed -e "s/,-llvm-include-order\(.*\),llvm-include-order/\1/" \
      | sed -e "s/,-misc-no-recursion\(.*\),misc-no-recursion/\1/" \
      | sed -e "s/,-clang-diagnostic-\*\(.*\),clang-diagnostic-\*/\1/")
done

(using sed to strip some add/remove pairs to reduce the diff and make it easier to read)

The resulting report is:
  .clang-tidy
  clang/.clang-tidy
  2c2
  < Checks:          'clang-diagnostic-*,clang-analyzer-*,-*,clang-diagnostic-*,llvm-*,misc-*,-misc-unused-parameters,-misc-non-private-member-variables-in-classes,-readability-identifier-naming,-misc-no-recursion'
  ---
  > Checks:          'clang-diagnostic-*,clang-analyzer-*,-*,clang-diagnostic-*,llvm-*,misc-*,-misc-unused-parameters,-misc-non-private-member-variables-in-classes,-misc-no-recursion'
  compiler-rt/.clang-tidy
  2c2
  < Checks:          'clang-diagnostic-*,clang-analyzer-*,-*,clang-diagnostic-*,llvm-*,-llvm-header-guard,misc-*,-misc-unused-parameters,-misc-non-private-member-variables-in-classes'
  ---
  > Checks:          'clang-diagnostic-*,clang-analyzer-*,-*,clang-diagnostic-*,llvm-*,misc-*,-misc-unused-parameters,-misc-non-private-member-variables-in-classes,-llvm-header-guard'
  flang/.clang-tidy
  2c2
  < Checks:          'clang-diagnostic-*,clang-analyzer-*,-*,llvm-*,-llvm-include-order,misc-*,-misc-no-recursion,-misc-unused-parameters,-misc-non-private-member-variables-in-classes'
  ---
  > Checks:          'clang-diagnostic-*,clang-analyzer-*,-*,llvm-*,misc-*,-misc-unused-parameters,-misc-non-private-member-variables-in-classes,-llvm-include-order,-misc-no-recursion'
  flang/include/flang/Lower/.clang-tidy
  flang/include/flang/Optimizer/.clang-tidy
  flang/lib/Lower/.clang-tidy
  flang/lib/Optimizer/.clang-tidy
  lld/.clang-tidy
  lldb/.clang-tidy
  llvm/tools/split-file/.clang-tidy
  mlir/.clang-tidy

The `clang/.clang-tidy` change is a no-op, disabling an option that was never enabled.
The compiler-rt and flang changes are no-op reorderings of the same flags.

(side note, the .clang-tidy file in parallel-libs is broken and crashes
clang-tidy because it uses "lowerCase" as the style instead of "lower_case" -
so I'll deal with that separately)

Differential Revision: https://reviews.llvm.org/D103842
2021-06-08 08:25:59 -07:00
Stuart Ellis e1da3297d2 [flang][driver] Add support for the "-init-only" option
Adding the `-init-only` option and corresponding frontend action to
generate a diagnostic.

`-init-only` vs `-test-io`:
`-init-only` ignores the input (it never calls the prescanner)
`-test-io` is similar to `-init-only`, but does read and print the input
without calling the prescanner.

This patch also adds a Driver test to check this action.

Reviewed By: awarzynski, AMDChirag

Differential Revision: https://reviews.llvm.org/D102849
2021-06-07 15:40:26 +01:00
Peter Steinfeld 2b795ec682 [flang] Check for undefined derived types
It's possible to specify refer to an undefined derived type as the type of a
component of another derived type and then never define the type of the
component.  We were not detecting this situation.  To fix this, I
changed the value of isForwardReferenced_ in the symbol's
DerivedTypeDetails and checked for it when performing other derived type
checks.

I also had to record the fact that error messages were previously
emitted for the same problem in some cases so that I could avoid
duplicate messages.

I also added a test.

Differential Revision: https://reviews.llvm.org/D103714
2021-06-04 14:33:52 -07:00