#
0f973ac7 |
| 02-Oct-2024 |
Peter Klausler <pklausler@nvidia.com> |
[flang] Tag warnings with LanguageFeature or UsageWarning (#110304)
(This is a big patch, but it's nearly an NFC. No test results have
changed and all Fortran tests in the LLVM test suites work as
[flang] Tag warnings with LanguageFeature or UsageWarning (#110304)
(This is a big patch, but it's nearly an NFC. No test results have
changed and all Fortran tests in the LLVM test suites work as expected.)
Allow a parser::Message for a warning to be marked with the
common::LanguageFeature or common::UsageWarning that controls it. This
will allow a later patch to add hooks whereby a driver will be able to
decorate warning messages with the names of its options that enable each
particular warning, and to add hooks whereby a driver can map those
enumerators by name to command-line options that enable/disable the
language feature and enable/disable the messages.
The default settings in the constructor for LanguageFeatureControl were
moved from its header file into its C++ source file.
Hooks for a driver to use to map the name of a feature or warning to its
enumerator were also added.
To simplify the tagging of warnings with their corresponding language
feature or usage warning, to ensure that they are properly controlled by
ShouldWarn(), and to ensure that warnings never issue at code sites in
module files, two new Warn() member function templates were added to
SemanticsContext and other contextual frameworks. Warn() can't be used
before source locations can be mapped to scopes, but the bulk of
existing code blocks testing ShouldWarn() and FindModuleFile() before
calling Say() were convertible into calls to Warn(). The ones that were
not convertible were extended with explicit calls to
Message::set_languageFeature() and set_usageWarning().
show more ...
|
#
505f6da1 |
| 01-May-2024 |
Peter Klausler <35819229+klausler@users.noreply.github.com> |
[flang] Ensure all warning/portability messages are guarded by Should… (#90518)
…Warn()
Many warning messages were being emitted unconditionally. Ensure that
all warnings are conditional on a tr
[flang] Ensure all warning/portability messages are guarded by Should… (#90518)
…Warn()
Many warning messages were being emitted unconditionally. Ensure that
all warnings are conditional on a true result from a call to
common::LanguageFeatureControl::ShouldWarn() so that it is easy for a
driver to disable them all, or, in the future, to provide per-warning
control over them.
show more ...
|
#
0fdf9123 |
| 14-Nov-2023 |
Peter Klausler <35819229+klausler@users.noreply.github.com> |
[flang] Fold MATMUL() (#72176)
Implements constant folding for matrix multiplication for all four
accepted type categories.
|
#
f025e411 |
| 18-Sep-2023 |
Peter Klausler <35819229+klausler@users.noreply.github.com> |
[flang] Accept pointer-valued function results as ASSOCIATED() arguments (#66238)
The POINTER= and TARGET= arguments to the intrinsic function
ASSOCIATED() can be the results of references to funct
[flang] Accept pointer-valued function results as ASSOCIATED() arguments (#66238)
The POINTER= and TARGET= arguments to the intrinsic function
ASSOCIATED() can be the results of references to functions that return
object pointers or procedure pointers. NULL() was working well but not
program-defined pointer-valued functions. Correct the validation of
ASSOCIATED() and extend the infrastructure used to detect and
characterize procedures and pointers.
show more ...
|
#
8926f0fe |
| 04-Aug-2023 |
Peter Klausler <pklausler@nvidia.com> |
[flang] Fold MERGE() of derived type values
Generalize FoldMerge() to accommodate derived type arguments and results, rename it into Folder<T>::MERGE(), and remove it from the various FoldIntrinsicF
[flang] Fold MERGE() of derived type values
Generalize FoldMerge() to accommodate derived type arguments and results, rename it into Folder<T>::MERGE(), and remove it from the various FoldIntrinsicFunction() routines for intrinsic types.
Fixes llvm-test-suite/Fortran/gfortran/regression/merge_init_expr_2.f90.
Differential Revision: https://reviews.llvm.org/D157345
show more ...
|
#
e723c69b |
| 28-Oct-2021 |
Peter Klausler <pklausler@nvidia.com> |
[flang] Fold DOT_PRODUCT()
Implement constant folding of the intrinsic function DOT_PRODUCT().
Differential Revision: https://reviews.llvm.org/D132688
|
#
ae93d8ea |
| 05-Jul-2022 |
Peter Klausler <pklausler@nvidia.com> |
[flang] Fold TRANSFER()
Fold usage of the raw data reinterpretation intrinsic function TRANSFER().
Differential Revision: https://reviews.llvm.org/D129671
|
#
a53967cd |
| 07-Mar-2022 |
Peter Klausler <pklausler@nvidia.com> |
[flang] Distinguish usage and portability warning messages
Using recently established message severity codes, upgrade non-fatal messages to usage and portability warnings as appropriate.
Differenti
[flang] Distinguish usage and portability warning messages
Using recently established message severity codes, upgrade non-fatal messages to usage and portability warnings as appropriate.
Differential Revision: https://reviews.llvm.org/D121246
show more ...
|
#
bc699ed0 |
| 02-Feb-2022 |
Jean Perier <jperier@nvidia.com> |
[flang] prevent rewrite of CMPLX with dynamically optional Y argument
CMPLX was always rewritten as a complex constructor, but the second operand of a complex constructor cannot be dynamically absen
[flang] prevent rewrite of CMPLX with dynamically optional Y argument
CMPLX was always rewritten as a complex constructor, but the second operand of a complex constructor cannot be dynamically absent (i.e., a disassociated pointer, an unallocated allocatable or an absent OPTIONAL dummy argument), while the second argument of CMPLX can be dynamically absent.
To avoid having to generate branches in complex constructor lowering when Y is a pointer, keep the distinction between CMPLX and a complex constructor when Y is a pointer, an allocatable, or an OPTIONAL entity.
Differential Revision: https://reviews.llvm.org/D118784
show more ...
|
#
5c5bde1b |
| 30-Dec-2021 |
Peter Klausler <pklausler@nvidia.com> |
[flang] Fold SCALE()
Fold references to the intrinsic function SCALE().
(Also work around some MSVC headaches somehow exposed by this patch: disable a bogus MSVC warning that began to appear in unr
[flang] Fold SCALE()
Fold references to the intrinsic function SCALE().
(Also work around some MSVC headaches somehow exposed by this patch: disable a bogus MSVC warning that began to appear in unrelated source files, and avoid the otherwise-necessary use of the "template" keyword in a call to a template member function of a class template.)
Differential Revision: https://reviews.llvm.org/D117150
show more ...
|
#
0bbb2d00 |
| 07-Jul-2021 |
peter klausler <pklausler@nvidia.com> |
[flang] Fold CSHIFT
Implement folding of the transformational intrinsic function CSHIFT for all types.
Differential Revision: https://reviews.llvm.org/D108931
|
#
503c085e |
| 18-Jun-2021 |
peter klausler <pklausler@nvidia.com> |
[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 intrinsi
[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
show more ...
|
#
6fa5353a |
| 02-Jun-2021 |
peter klausler <pklausler@nvidia.com> |
[flang] Fix folding of CMPLX
The code for folding calls to the intrinsic function CMPLX was incorrectly dependent on the number of arguments to distinguish its two cases (conversion from one kind of
[flang] Fix folding of CMPLX
The code for folding calls to the intrinsic function CMPLX was incorrectly dependent on the number of arguments to distinguish its two cases (conversion from one kind of complex to another, and composition of a complex value from real & imaginary parts). This was wrong since the optional KIND= argument has already been taken into account by intrinsic processing; instead, the type of the first argument should decide the issue.
Differential Revision: https://reviews.llvm.org/D103568
show more ...
|
#
94d9a4fd |
| 14-Oct-2020 |
Jean Perier <jperier@nvidia.com> |
[flang] Rework host runtime folding and enable REAL(2) folding with it.
- Rework the host runtime table so that it is constexpr to avoid having to construct it and to store/propagate it. - Make th
[flang] Rework host runtime folding and enable REAL(2) folding with it.
- Rework the host runtime table so that it is constexpr to avoid having to construct it and to store/propagate it. - Make the interface simpler (remove many templates and a file) - Enable 16bits float folding using 32bits float host runtime - Move StaticMultimapView into its own header to use it for host folding
Reviewed By: klausler, PeteSteinfeld
Differential Revision: https://reviews.llvm.org/D88981
show more ...
|
#
a50cec71 |
| 31-Jul-2020 |
Jean Perier <jperier@nvidia.com> |
[flang] Fix CMPLX folding with complex arguments
CMPLX folding was expecting only one arguments in case X argument is complex. This is wrong since there is also the optional KIND argument.
Reviewed
[flang] Fix CMPLX folding with complex arguments
CMPLX folding was expecting only one arguments in case X argument is complex. This is wrong since there is also the optional KIND argument.
Reviewed By: schweitz
Differential Revision: https://reviews.llvm.org/D84936
show more ...
|
#
1f879005 |
| 29-Mar-2020 |
Tim Keith <tkeith@nvidia.com> |
[flang] Reformat with latest clang-format and .clang-format
Original-commit: flang-compiler/f18@9fe84f45d7fd685051004678d6b5775dcc4c6f8f Reviewed-on: https://github.com/flang-compiler/f18/pull/1094
|
#
64ab3302 |
| 25-Feb-2020 |
CarolineConcatto <51754594+CarolineConcatto@users.noreply.github.com> |
[flang] [LLVMify F18] Compiler module folders should have capitalised names (flang-compiler/f18#980)
This patch renames the modules in f18 to use a capital letter in the
module name
Signed-off-b
[flang] [LLVMify F18] Compiler module folders should have capitalised names (flang-compiler/f18#980)
This patch renames the modules in f18 to use a capital letter in the
module name
Signed-off-by: Caroline Concatto <caroline.concatto@arm.com>
Original-commit: flang-compiler/f18@d2eb7a1c443d1539ef12b6f027074a0eb15b1ea0 Reviewed-on: https://github.com/flang-compiler/f18/pull/980
show more ...
|