#
a51d13f5 |
| 26-Mar-2024 |
Carlos Seo <carlos.seo@linaro.org> |
[Flang] Add new CHECK_MSG() function (#86576)
Added a new variant of the CHECK() function that takes a custom message
as a parameter. This is useful for more meaninful error messages when
the comp
[Flang] Add new CHECK_MSG() function (#86576)
Added a new variant of the CHECK() function that takes a custom message
as a parameter. This is useful for more meaninful error messages when
the compiler is expected to crash.
Fixes #78931
show more ...
|
#
7358c26d |
| 30-Oct-2023 |
Leandro Lupori <leandro.lupori@linaro.org> |
[flang] Check for overflows in RESHAPE folding (#68342)
TotalElementCount() was modified to return std::optional<uint64_t>,
where std::nullopt means overflow occurred. Besides the additional
check
[flang] Check for overflows in RESHAPE folding (#68342)
TotalElementCount() was modified to return std::optional<uint64_t>,
where std::nullopt means overflow occurred. Besides the additional
check in RESHAPE folding, all callers of TotalElementCount() were
changed, to also check for overflows.
show more ...
|
#
c3859818 |
| 17-Oct-2023 |
Leandro Lupori <leandro.lupori@linaro.org> |
[flang] Fix constant subscript operations (#68352)
Modify ConstantBounds' methods that handle subscripts and bounds to
avoid integer overflows. This is needed to properly handle arrays
with the ma
[flang] Fix constant subscript operations (#68352)
Modify ConstantBounds' methods that handle subscripts and bounds to
avoid integer overflows. This is needed to properly handle arrays
with the maximum possible upper bound (INT64_MAX).
show more ...
|
#
16c4b320 |
| 25-Jul-2023 |
Peter Klausler <pklausler@nvidia.com> |
[flang] Correct handling of non-default lower bounds in ASSOCIATE with named constants
Work through several issues with LBOUND() and UBOUND() of ASSOCIATE construct entities that have been associate
[flang] Correct handling of non-default lower bounds in ASSOCIATE with named constants
Work through several issues with LBOUND() and UBOUND() of ASSOCIATE construct entities that have been associated with named constants or subobjects of named constants that are sporting non-default lower bounds. Sometimes the non-default lower bounds matter, sometimes they don't. Add a fairly exhaustive test to work through the possibilities.
Differential Revision: https://reviews.llvm.org/D156756
show more ...
|
#
e47fbb7c |
| 16-May-2023 |
Slava Zakharin <szakharin@nvidia.com> |
[flang] Fixed comparison for derived types constants.
The two constants should be equal only if their derived types are the same. This fixes regression caused by D150380.
Differential Revision: htt
[flang] Fixed comparison for derived types constants.
The two constants should be equal only if their derived types are the same. This fixes regression caused by D150380.
Differential Revision: https://reviews.llvm.org/D150634
show more ...
|
#
d8b4ea48 |
| 27-Apr-2022 |
Mike Kashkarov <fruitclover@gmail.com> |
[flang] Fix UBOUND() folding for constant arrays
Similarly to LBOUND in https://reviews.llvm.org/D123237, fix UBOUND() folding for constant arrays (for both w/ and w/o DIM=): convert GetConstantArra
[flang] Fix UBOUND() folding for constant arrays
Similarly to LBOUND in https://reviews.llvm.org/D123237, fix UBOUND() folding for constant arrays (for both w/ and w/o DIM=): convert GetConstantArrayLboundHelper into common helper class for both lower/upper bounds.
Reviewed By: jeanPerier
Differential Revision: https://reviews.llvm.org/D123520
show more ...
|
#
3b61587c |
| 09-Mar-2022 |
Peter Klausler <pklausler@nvidia.com> |
[flang] LBOUND() edge case: empty dimension
LBOUND must return 1 for an empty dimension, no matter what explicit expression might appear in a declaration or arrive in a descriptor.
Differential Rev
[flang] LBOUND() edge case: empty dimension
LBOUND must return 1 for an empty dimension, no matter what explicit expression might appear in a declaration or arrive in a descriptor.
Differential Revision: https://reviews.llvm.org/D121488
show more ...
|
#
4133a85c |
| 18-Feb-2022 |
Peter Klausler <pklausler@nvidia.com> |
[flang] Accommodate arrays with a zero-extent dimension in location folding
The index incrementation code used for FINDLOC, MAXLOC, and MINLOC folding would crash if the array had a zero extent on t
[flang] Accommodate arrays with a zero-extent dimension in location folding
The index incrementation code used for FINDLOC, MAXLOC, and MINLOC folding would crash if the array had a zero extent on the dimension selected with a DIM= argument since the subscript passed to IncrementSubscripts would have a value less than the lower bound. Fix, and add tests.
Differential Revision: https://reviews.llvm.org/D121125
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 ...
|
#
bd859cb4 |
| 06-Jan-2022 |
Peter Klausler <pklausler@nvidia.com> |
[flasg] Debug folding of substring references
Character substrings weren't being folded correctly; add tests and rework the implementation so that substrings of literals and named constant character
[flasg] Debug folding of substring references
Character substrings weren't being folded correctly; add tests and rework the implementation so that substrings of literals and named constant character scalars & arrays are properly folded for use in constant expressions.
Differential Revision: https://reviews.llvm.org/D117343
show more ...
|
#
85ec4493 |
| 10-Nov-2021 |
Peter Klausler <pklausler@nvidia.com> |
[flang] Fix ORDER= argument to RESHAPE
The ORDER= argument to the transformational intrinsic function RESHAPE was being misinterpreted in an inverted way that could be detected only with 3-d or high
[flang] Fix ORDER= argument to RESHAPE
The ORDER= argument to the transformational intrinsic function RESHAPE was being misinterpreted in an inverted way that could be detected only with 3-d or higher rank array. Fix in both folding and the runtime, and extend tests.
Differential Revision: https://reviews.llvm.org/D113699
show more ...
|
#
82568675 |
| 28-Sep-2021 |
Peter Klausler <pklausler@nvidia.com> |
[flang] Fold FINDLOC()
Fold the transformational intrinsic function FINDLOC() for all combinations of optional arguments and data types.
Differential Revision: https://reviews.llvm.org/D110757
|
#
0d8331c0 |
| 18-Mar-2021 |
peter klausler <pklausler@nvidia.com> |
[flang] Refine symbol sorting
Replace semantics::SymbolSet with alternatives that clarify whether the set should order its contents by source position or not. This matters because positionally-orde
[flang] Refine symbol sorting
Replace semantics::SymbolSet with alternatives that clarify whether the set should order its contents by source position or not. This matters because positionally-ordered sets must not be used for Symbols that might be subjected to name replacement during name resolution, and address-ordered sets must not be used (without sorting) in circumstances where the order of their contents affects the output of the compiler.
All set<> and map<> instances in the compiler that are keyed by Symbols now have explicit Compare types in their template instantiations. Symbol::operator< is no more.
Differential Revision: https://reviews.llvm.org/D98878
show more ...
|
#
2cf52504 |
| 29-Jul-2020 |
Peter Steinfeld <psteinfeld@nvidia.com> |
[flang] Fixes for RESHAPE()
I fixed an assert caused by passing an empty array as the source= argument to RESHAPE(). In the process, I noticed that there were no tests for RESHAPE(), so I wrote a t
[flang] Fixes for RESHAPE()
I fixed an assert caused by passing an empty array as the source= argument to RESHAPE(). In the process, I noticed that there were no tests for RESHAPE(), so I wrote a test that covers all the description in 16.9.163. In the process, I made the error messages more consistent and descriptive. I also changed the test to see if a reference to an intrinsic function was a constant to say that it is a constant if it's a refererence to an invalid intrinsic. This avoids emitting multiple messages for the same erroneous source.
Differential Revision: https://reviews.llvm.org/D84904
show more ...
|
#
f72106e2 |
| 22-Jul-2020 |
Pete Steinfeld <psteinfeld@nvidia.com> |
[flang] Fix an assert when RESHAPE() is called on empty strings
Summary: When a constant array of empty strings goes through contant folding, the result is something that contains no bytes. If this
[flang] Fix an assert when RESHAPE() is called on empty strings
Summary: When a constant array of empty strings goes through contant folding, the result is something that contains no bytes. If this array is passed to the intrinsic function `RESHAPE()`, we were not handling things correctly. I fixed this by checking for an empty destination when calling the function `CopyFrom()` on an array of strings.
I also added a test with a couple of different examples that trigger the problem.
Reviewers: klausler, tskeith, DavidTruby
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D84352
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 ...
|