Revision tags: llvmorg-21-init, llvmorg-19.1.7 |
|
#
fc97d2e6 |
| 18-Dec-2024 |
Peter Klausler <pklausler@nvidia.com> |
[flang] Add UNSIGNED (#113504)
Implement the UNSIGNED extension type and operations under control of a
language feature flag (-funsigned).
This is nearly identical to the UNSIGNED feature that h
[flang] Add UNSIGNED (#113504)
Implement the UNSIGNED extension type and operations under control of a
language feature flag (-funsigned).
This is nearly identical to the UNSIGNED feature that has been available
in Sun Fortran for years, and now implemented in GNU Fortran for
gfortran 15, and proposed for ISO standardization in J3/24-116.txt.
See the new documentation for details; but in short, this is C's
unsigned type, with guaranteed modular arithmetic for +, -, and *, and
the related transformational intrinsic functions SUM & al.
show more ...
|
Revision tags: llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2 |
|
#
b1a1d4e0 |
| 02-Aug-2024 |
Peter Klausler <35819229+klausler@users.noreply.github.com> |
[flang][runtime] Don't emit excess digits for ES0.0E0 or EN0.0E0 (#101238)
Don't emit any digits after the decimal point.
|
Revision tags: llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7 |
|
#
1126657a |
| 24-May-2024 |
Slava Zakharin <szakharin@nvidia.com> |
[flang][runtime] Enable REAL printing in F18 offload runtime. (#87851)
|
#
93540455 |
| 20-May-2024 |
Slava Zakharin <szakharin@nvidia.com> |
[NFC][flang][runtime] Avoid recursion in EditCharacterOutput and EditLogicalOutput. (#92806)
|
Revision tags: llvmorg-18.1.6, llvmorg-18.1.5 |
|
#
fa465b47 |
| 24-Apr-2024 |
Peter Klausler <35819229+klausler@users.noreply.github.com> |
[flang][runtime] Improve confusing list-directed REAL(2) output (#89846)
List-directed output editing of REAL values will minimize the number of
digits that are emitted by calculating a decimal val
[flang][runtime] Improve confusing list-directed REAL(2) output (#89846)
List-directed output editing of REAL values will minimize the number of
digits that are emitted by calculating a decimal value that, if read
back in to a REAL variable of the same kind, would compare equal.
This behavior is causing some confusion when applied to list-directed
output of large REAL(2) values. Specifically, the value HUGE(0._2)
(which is 0x7bff in hex) is exactly 65504, but is edited to 65500. by
list-directed output, which selects F0 editing, minimizes the value to
6.55e4, and then formats it without the exponent.
This small patch changes that behavior for cases where the output of
digit-minimized F editing has no digits after the decimal point and
zeroes need to be emitted before it due to the decimal exponent. Digit
minimization is disabled in this case and the exact digits are emitted
instead.
show more ...
|
#
6fd475fe |
| 24-Apr-2024 |
Peter Klausler <35819229+klausler@users.noreply.github.com> |
[flang][runtime] 'A' output editing for LOGICAL (#89817)
We support 'A' output editing for INTEGER and REAL as an extension; it
turns out to be used as well for LOGICAL in application code.
|
Revision tags: llvmorg-18.1.4 |
|
#
2b86fb21 |
| 03-Apr-2024 |
Slava Zakharin <szakharin@nvidia.com> |
[flang][runtime] Avoid recursive calls in F18 runtime CUDA build. (#87428)
Recurrencies in the call graph (even if they are not executed)
prevent computing the minimal stack size required for a ker
[flang][runtime] Avoid recursive calls in F18 runtime CUDA build. (#87428)
Recurrencies in the call graph (even if they are not executed)
prevent computing the minimal stack size required for a kernel
execution. This change disables some functionality of F18 IO
to avoid recursive calls. A couple of functions are rewritten
to work without using recursion.
show more ...
|
Revision tags: llvmorg-18.1.3 |
|
#
8ebf7411 |
| 25-Mar-2024 |
Slava Zakharin <szakharin@nvidia.com> |
[flang][runtime] Prepare enabling PRINT of integer32 for device. (#86247)
This commit adds required files into the offload build closure,
which means adding RT_API_ATTRS and other markers.
The i
[flang][runtime] Prepare enabling PRINT of integer32 for device. (#86247)
This commit adds required files into the offload build closure,
which means adding RT_API_ATTRS and other markers.
The implementation does not work for CUDA yet, because of
std::variant,swap,reverse usage. These issues will be resolved
separately (e.g. by using libcudacxx header files).
show more ...
|
Revision tags: llvmorg-18.1.2 |
|
#
5e21fa23 |
| 15-Mar-2024 |
Peter Klausler <35819229+klausler@users.noreply.github.com> |
[flang][runtime] Fix off-by-one error in EX0.0 output editing (#85428)
The maximum number of significant hexadecimal digits in EX0.0 REAL
output editing is 29, not 28. Fix by computing it at build
[flang][runtime] Fix off-by-one error in EX0.0 output editing (#85428)
The maximum number of significant hexadecimal digits in EX0.0 REAL
output editing is 29, not 28. Fix by computing it at build time from the
precision of REAL(16).
show more ...
|
Revision tags: llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1 |
|
#
033b491c |
| 25-Jan-2024 |
Peter Klausler <35819229+klausler@users.noreply.github.com> |
[flang][runtime] Catch error on Ew.0 output editing (#78522)
An Ew.0(Ee) or Ew.0(Ee) output edit descriptor with a scale factor of
zero is an error condition, unless the output edit descriptor was
[flang][runtime] Catch error on Ew.0 output editing (#78522)
An Ew.0(Ee) or Ew.0(Ee) output edit descriptor with a scale factor of
zero is an error condition, unless the output edit descriptor was
originally Gw.0(Ee), list-directed, or just E0/D0 with no .d part.
Fixes https://github.com/llvm/llvm-project/issues/78390.
show more ...
|
Revision tags: llvmorg-19-init |
|
#
933882f7 |
| 26-Dec-2023 |
Peter Klausler <35819229+klausler@users.noreply.github.com> |
[flang][runtime] Fix trailing blanks for Gw.dEe output editing (#75263)
When generalized numeric output editing of real data maps to Fw.d output
editing, either two or four trailing blanks are emit
[flang][runtime] Fix trailing blanks for Gw.dEe output editing (#75263)
When generalized numeric output editing of real data maps to Fw.d output
editing, either two or four trailing blanks are emitted depending on the
presence and value of 'e'. The code that detects field width overflow
didn't take these trailing blanks into account, and sometimes the field
width adjustment was producing an F0.d output edit descriptor (no fixed
field width). Fix by retaining the original field width, but requiring
it to also accommodate the trailing blanks.
Fixes llvm-test-suite/Fortran/gfortran/regression/fmt_g.f.
show more ...
|
#
14e221aa |
| 26-Dec-2023 |
Peter Klausler <35819229+klausler@users.noreply.github.com> |
[flang][runtime] Correct EXw.0 output editing (#75121)
A zero 'd' digit count in EX output editing has a meaning that's
distinct from other numeric output editing descriptors, and I missed
this in
[flang][runtime] Correct EXw.0 output editing (#75121)
A zero 'd' digit count in EX output editing has a meaning that's
distinct from other numeric output editing descriptors, and I missed
this in my initial implementation of the feature. d==0 means that the
runtime should emit hexadecimal digits after the (hexa)decimal point
until all of the rest of them would be zero.
show more ...
|
#
ced631e0 |
| 11-Dec-2023 |
Peter Klausler <35819229+klausler@users.noreply.github.com> |
[flang][runtime] Handle Fw.0 case that needs to round up to 1.0 (#74384)
A tricky case in Fw.d output editing is when the value needs to be
rounded either to a signed zero or away from zero to a po
[flang][runtime] Handle Fw.0 case that needs to round up to 1.0 (#74384)
A tricky case in Fw.d output editing is when the value needs to be
rounded either to a signed zero or away from zero to a power of ten
(1.0, 0.1, &c.). A bug report for LLVM on GitHub (#74274) exposed a bug
in this code in the case of Fw.0 editing where a value just over 0.5 was
rounded incorrectly to 0 rather than 1 when no fractional digits were
requested.
Rework that algorithm a little, ensuring that the initial
binary->decimal conversion produces at least one digit, and coping
correctly with the rounding of an exact 0.5 value for Fw.0 editing
(rounding it to the nearest even decimal, namely 0, following
near-universal compiler-dependent behavior in other Fortrans).
Fixes https://github.com/llvm/llvm-project/issues/74274.
show more ...
|
#
3bc7e552 |
| 07-Dec-2023 |
kkwli <kkwli@users.noreply.github.com> |
[flang] pass true/false to EditLogicalOutput directly (NFC) (#73375)
|
Revision tags: llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3 |
|
#
ea7e50cd |
| 16-Oct-2023 |
Peter Klausler <35819229+klausler@users.noreply.github.com> |
[flang][runtime] Implement EX editing for input & output (#67208)
Support the EX edit descriptor for hexadecimal real formatted output and
hexadecimal real input for all forms of formatted input..
[flang][runtime] Implement EX editing for input & output (#67208)
Support the EX edit descriptor for hexadecimal real formatted output and
hexadecimal real input for all forms of formatted input.. (We're
possibly the first Fortran compiler to support this feature for input
editing; only one other can handle EX output editing.)
As true (not BOZ) hexadecimal floating-point constants are not supported
in Fortran source code, only in formatted input, the implementation
takes place in the I/O editing portion of the runtime, not as new
conversions in the Decimal library.
show more ...
|
Revision tags: llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3 |
|
#
212beb66 |
| 17-Aug-2023 |
Peter Klausler <pklausler@nvidia.com> |
[flang] When formatting integers for Gw.d/Gw.dEe output, only 'w' matters
Leading zeros should appear only for Iw.m output formatting. Gw, Gw.d, and Gw.dEe output editing all map to Iw with no ".m"
[flang] When formatting integers for Gw.d/Gw.dEe output, only 'w' matters
Leading zeros should appear only for Iw.m output formatting. Gw, Gw.d, and Gw.dEe output editing all map to Iw with no ".m" (Fortran 202X 13.7.5.2.2).
Differential Revision: https://reviews.llvm.org/D159037
show more ...
|
Revision tags: llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5 |
|
#
763e036c |
| 25-May-2023 |
Peter Klausler <pklausler@nvidia.com> |
[flang] Detect output field width overflow for Inf/NaN
The output editing code paths for F and E/D output that handle IEEE-754 infinities and NaNs fail to check for overflow of the output field, whi
[flang] Detect output field width overflow for Inf/NaN
The output editing code paths for F and E/D output that handle IEEE-754 infinities and NaNs fail to check for overflow of the output field, which should cause the field to be filled with asterisks instead. Catch these cases.
Differential Revision: https://reviews.llvm.org/D151738
show more ...
|
Revision tags: llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1 |
|
#
77d667b1 |
| 28-Mar-2023 |
Shao-Ce SUN <sunshaoce@iscas.ac.cn> |
[flang][runtime] Support L editing of Logical
I tested gfortran and flang(old). https://godbolt.org/z/c89foro4G
Reviewed By: klausler
Differential Revision: https://reviews.llvm.org/D146989
|
#
e593940b |
| 28-Mar-2023 |
Peter Klausler <pklausler@nvidia.com> |
[flang] Fine-tune NAN formatted input editing
Per Fortran 2018, "NAN" and "NAN()" are to be translated into quiet NaNs, and the other forms are implementation-dependent; I've made them quiet NaNs t
[flang] Fine-tune NAN formatted input editing
Per Fortran 2018, "NAN" and "NAN()" are to be translated into quiet NaNs, and the other forms are implementation-dependent; I've made them quiet NaNs too. Also process signs on input NaNs, which seems wrong but other compilers all do it, and fix some misleading template argument names noticed along the way.
Differential Revision: https://reviews.llvm.org/D147071
show more ...
|
Revision tags: llvmorg-16.0.0, llvmorg-16.0.0-rc4 |
|
#
8cfdc32b |
| 10-Mar-2023 |
Shao-Ce SUN <sunshaoce@iscas.ac.cn> |
[Flang] add space between number and character in print
``` print *, "123",456,"789" ``` before ``` 123 456789 ``` after ``` 123 456 789 ```
Reviewed By: klausler
Differential Revision: https://re
[Flang] add space between number and character in print
``` print *, "123",456,"789" ``` before ``` 123 456789 ``` after ``` 123 456 789 ```
Reviewed By: klausler
Differential Revision: https://reviews.llvm.org/D145768
show more ...
|
Revision tags: llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2 |
|
#
bad52055 |
| 03-Aug-2022 |
Peter Klausler <pklausler@nvidia.com> |
[flang][runtime] Support internal I/O to CHARACTER(KIND/=1)
Allow internal I/O to support non-default kinds of CHARACTER.
The I/O runtime design anticipated this standard feature, but this patch is
[flang][runtime] Support internal I/O to CHARACTER(KIND/=1)
Allow internal I/O to support non-default kinds of CHARACTER.
The I/O runtime design anticipated this standard feature, but this patch is somewhat larger than I thought it would be because many code sites had to have assumptions about units (characters vs. bytes) brought into harmony, and some encoding utilities had to be pulled out of IoStatementState and templatized into their own new header file so that they are available to formatted output code without having to "thread" an IoStatementState reference through many call chains.
Differential Revision: https://reviews.llvm.org/D131107
show more ...
|
Revision tags: llvmorg-15.0.0-rc1, llvmorg-16-init |
|
#
faffcc3a |
| 07-Jul-2022 |
Peter Klausler <pklausler@nvidia.com> |
[flang][runtime] Refine list-directed REAL(2) output
The rule used by list-directed REAL output editing to select between Ew.d and Fw.d output editing breaks down for 16-bit floating-point data, sin
[flang][runtime] Refine list-directed REAL(2) output
The rule used by list-directed REAL output editing to select between Ew.d and Fw.d output editing breaks down for 16-bit floating-point data, since the number of significant decimal digits is so low that Ew,d output editing is nearly always selected. Cap the test so that five-digit values will be output with Fw.d editing.
Differential Revision: https://reviews.llvm.org/D129672
show more ...
|
#
061df073 |
| 01-Jul-2022 |
Peter Klausler <pklausler@nvidia.com> |
[flang][runtime] Fix directed UP/DOWN rounding edge case for Fw.d output
When Fw.d output editing takes place with directed rounding, make sure that nonzero values that would normally be converted t
[flang][runtime] Fix directed UP/DOWN rounding edge case for Fw.d output
When Fw.d output editing takes place with directed rounding, make sure that nonzero values that would normally be converted to zero round up (or down, depending on the sign) to a scaled 1.
Differential Revision: https://reviews.llvm.org/D129021
show more ...
|
#
53dca2e6 |
| 27-Jun-2022 |
Peter Klausler <pklausler@nvidia.com> |
[flang][runtime] Emit "0.0E+0" for (1PG0.0) editing of 0.0
When a scale factor is in effect, respect it for G0.0 output editing.
Differential Revision: https://reviews.llvm.org/D128761
|
#
df6afee9 |
| 22-Jun-2022 |
Peter Klausler <pklausler@nvidia.com> |
[flang][runtime] Improve G0 output editing
G0 output editing should never overflow an output field and fill it with asterisks. It should also never elide the "E" in an exponent field, even if it ha
[flang][runtime] Improve G0 output editing
G0 output editing should never overflow an output field and fill it with asterisks. It should also never elide the "E" in an exponent field, even if it has more than three digits.
Differential Revision: https://reviews.llvm.org/D128396
show more ...
|