|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, 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, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, 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, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, 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, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1 |
|
| #
c531171d |
| 30-Mar-2022 |
serge-sans-paille <[email protected]> |
Fix invalid overflow check in flang
Statically checking for overflow with
if constexpr (sizeof(std::size_t) <= sizeof(std::int64_t)) { return static_cast<std::int64_t>(length); }
Fix invalid overflow check in flang
Statically checking for overflow with
if constexpr (sizeof(std::size_t) <= sizeof(std::int64_t)) { return static_cast<std::int64_t>(length); }
Doesn't work if `sizeof(std::size_t) == sizeof(std::int64_t)` because std::size_t is unsigned.
if `length == std::numeric_limits<size_t>` casting it to `int64_t` is going to overflow.
This code would be much simpler if returning a `uint64_t` instead of a signed value...
Differential Revision: https://reviews.llvm.org/D122705
show more ...
|
|
Revision tags: llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1 |
|
| #
873f081e |
| 02-Feb-2022 |
Diana Picus <[email protected]> |
[flang] Add runtime support for GET_COMMAND
Implement the GET_COMMAND intrinsic. Add 2 new parameters (sourceFile and line) so we can create a terminator for RUNTIME_CHECKs.
Differential Revision:
[flang] Add runtime support for GET_COMMAND
Implement the GET_COMMAND intrinsic. Add 2 new parameters (sourceFile and line) so we can create a terminator for RUNTIME_CHECKs.
Differential Revision: https://reviews.llvm.org/D118777
show more ...
|
|
Revision tags: llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1 |
|
| #
9df0ba59 |
| 27-Oct-2021 |
Diana Picus <[email protected]> |
[flang] Implement GET_ENVIRONMENT_VARIABLE(VALUE)
Implement the second entry point for GET_ENVIRONMENT_VARIABLE. Reuse existing bits and pieces wherever possible.
This patch also increases CFI_* er
[flang] Implement GET_ENVIRONMENT_VARIABLE(VALUE)
Implement the second entry point for GET_ENVIRONMENT_VARIABLE. Reuse existing bits and pieces wherever possible.
This patch also increases CFI_* error codes in order to avoid conflicts. GET_ENVIRONMENT_VARIABLE is required to return a status of 1 if an environment variable does not exist and 2 if environment variables are not supported. However, if we add status codes for that they will conflict with CFI_ERROR_BASE_ADDR_NULL and CFI_ERROR_BASE_ADDR_NOT_NULL, which are also 1 and 2 at the moment. We therefore move all CFI error codes up (an arbitrary) 10 spots to make room. Hopefully this isn't a problem, since we weren't matching the CFI error codes that gfortran uses anyway. It may still be an issue if any other runtime functions will need to return a status of 1 or 2, but we should probably deal with that when/if it occurs.
Differential Revision: https://reviews.llvm.org/D112698
show more ...
|
| #
824bf908 |
| 12-Oct-2021 |
Diana Picus <[email protected]> |
[flang] runtime: Read environment variables directly
Add support for reading environment variables directly, via std::getenv. This needs to allocate a C-style string to pass into std::getenv. If the
[flang] runtime: Read environment variables directly
Add support for reading environment variables directly, via std::getenv. This needs to allocate a C-style string to pass into std::getenv. If the memory allocation for that fails, we terminate.
This also changes the interface for EnvVariableLength to receive the source file and line so we can crash gracefully.
Note that we are now completely ignoring the envp pointer passed into ProgramStart, since that could go stale if the environment is modified during execution.
Differential Revision: https://reviews.llvm.org/D111785
show more ...
|
| #
fc2ba5e5 |
| 07-Oct-2021 |
Diana Picus <[email protected]> |
[flang] Implement GET_ENVIRONMENT_VARIABLE(LENGTH)
Search for the environment variable in the envp string passed to ProgramStart. This doesn't work if the main program isn't Fortran.
Differential R
[flang] Implement GET_ENVIRONMENT_VARIABLE(LENGTH)
Search for the environment variable in the envp string passed to ProgramStart. This doesn't work if the main program isn't Fortran.
Differential Revision: https://reviews.llvm.org/D111394
show more ...
|
| #
37089bae |
| 28-Sep-2021 |
Diana Picus <[email protected]> |
Reland "[flang] GET_COMMAND_ARGUMENT runtime implementation"
Recommit https://reviews.llvm.org/D109813 and https://reviews.llvm.org/D109814.
This implements the second and final entry point for GET
Reland "[flang] GET_COMMAND_ARGUMENT runtime implementation"
Recommit https://reviews.llvm.org/D109813 and https://reviews.llvm.org/D109814.
This implements the second and final entry point for GET_COMMAND_ARGUMENT, handling the VALUE, STATUS and ERRMSG parameters.
It has a small fix in that we're now using memcpy instead of strncpy (which was a bad idea to begin with, since we're not actually interested in a string copy).
show more ...
|
| #
6359a4cd |
| 28-Sep-2021 |
Diana Picus <[email protected]> |
Revert "[flang] GET_COMMAND_ARGUMENT(VALUE) runtime implementation"
This reverts commit 0446f1299f6be9fd35bc5f458c78b34dca3105f6 and df6302311f88d0fbc666b6277d029aa371039945.
There's a warning on f
Revert "[flang] GET_COMMAND_ARGUMENT(VALUE) runtime implementation"
This reverts commit 0446f1299f6be9fd35bc5f458c78b34dca3105f6 and df6302311f88d0fbc666b6277d029aa371039945.
There's a warning on flang-aarch64-latest-gcc related to strncpy using the result of strlen as a bound. I'll recommit with a fix.
show more ...
|
|
Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4 |
|
| #
0446f129 |
| 14-Sep-2021 |
Diana Picus <[email protected]> |
[flang] GET_COMMAND_ARGUMENT(ERRMSG) runtime implementation
Implement the final part of GET_COMMAND_ARGUMENT, i.e. the handling of ERRMSG. This uses some of the infrastructure in stat.h and gets rid
[flang] GET_COMMAND_ARGUMENT(ERRMSG) runtime implementation
Implement the final part of GET_COMMAND_ARGUMENT, i.e. the handling of ERRMSG. This uses some of the infrastructure in stat.h and gets rid of the magic numbers that we were using for return codes.
Differential Revision: https://reviews.llvm.org/D109814
show more ...
|
|
Revision tags: llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2 |
|
| #
df630231 |
| 25-Aug-2021 |
Diana Picus <[email protected]> |
[flang] GET_COMMAND_ARGUMENT(VALUE) runtime implementation
Partial implementation for the second entry point for GET_COMMAND_ARGUMENT. It handles the VALUE and STATUS arguments, and doesn't touch ER
[flang] GET_COMMAND_ARGUMENT(VALUE) runtime implementation
Partial implementation for the second entry point for GET_COMMAND_ARGUMENT. It handles the VALUE and STATUS arguments, and doesn't touch ERRMSG.
Differential Revision: https://reviews.llvm.org/D109813
show more ...
|
| #
af63d179 |
| 03-Sep-2021 |
Diana Picus <[email protected]> |
[flang] GET_COMMAND_ARGUMENT(LENGTH) runtime implementation
Implement the ArgumentLength entry point of GET_COMMAND_ARGUMENT. Also introduce a fixture for the tests.
Note that this also changes the
[flang] GET_COMMAND_ARGUMENT(LENGTH) runtime implementation
Implement the ArgumentLength entry point of GET_COMMAND_ARGUMENT. Also introduce a fixture for the tests.
Note that this also changes the interface for ArgumentLength from returning a 4-byte integer to returning an 8-byte integer.
Differential Revision: https://reviews.llvm.org/D109227
show more ...
|
| #
830c0b90 |
| 01-Sep-2021 |
Peter Klausler <[email protected]> |
[flang] Move runtime API headers to flang/include/flang/Runtime
Move the closure of the subset of flang/runtime/*.h header files that are referenced by source files outside flang/runtime (apart from
[flang] Move runtime API headers to flang/include/flang/Runtime
Move the closure of the subset of flang/runtime/*.h header files that are referenced by source files outside flang/runtime (apart from unit tests) into a new directory (flang/include/flang/Runtime) so that relative include paths into ../runtime need not be used.
flang/runtime/pgmath.h.inc is moved to flang/include/flang/Evaluate; it's not used by the runtime.
Differential Revision: https://reviews.llvm.org/D109107
show more ...
|
| #
0c375296 |
| 25-Aug-2021 |
Diana Picus <[email protected]> |
[flang] COMMAND_ARGUMENT_COUNT runtime implementation
Grab whatever ProgramStart has stored in executionEnvironment.argc and subtract 1 (based on the assumption that ProgramStart is called with a C-
[flang] COMMAND_ARGUMENT_COUNT runtime implementation
Grab whatever ProgramStart has stored in executionEnvironment.argc and subtract 1 (based on the assumption that ProgramStart is called with a C-style argc that counts the command name as an argument).
Spoiler alert: The tests will evolve into fixtures when we implement GET_COMMAND_ARGUMENT etc.
Differential Revision: https://reviews.llvm.org/D109048
show more ...
|