#
4cb2a519 |
| 24-Dec-2024 |
Valentin Clement (バレンタイン クレメン) <clementval@gmail.com> |
Revert "Reland '[flang] Allow to pass an async id to allocate the descriptor (#118713)' and #118733" (#121029)
This still cause issue for device runtime build.
|
#
5b74fb75 |
| 23-Dec-2024 |
Valentin Clement (バレンタイン クレメン) <clementval@gmail.com> |
Reland '[flang] Allow to pass an async id to allocate the descriptor (#118713)' and #118733 (#120997)
Device runtime build have been fixed. Attempt to re-land these patches
that have been approved
Reland '[flang] Allow to pass an async id to allocate the descriptor (#118713)' and #118733 (#120997)
Device runtime build have been fixed. Attempt to re-land these patches
that have been approved before.
https://github.com/llvm/llvm-project/pull/118713
https://github.com/llvm/llvm-project/pull/118733
show more ...
|
#
16c2a101 |
| 08-Dec-2024 |
Valentin Clement (バレンタイン クレメン) <clementval@gmail.com> |
Revert "[flang] Allow to pass an async id to allocate the descriptor (#118713)" (#119109)
This reverts commit 7d1c661381d36018fd105f4ad4c2d6dc45e7288b.
This commit breaks some device runtime buil
Revert "[flang] Allow to pass an async id to allocate the descriptor (#118713)" (#119109)
This reverts commit 7d1c661381d36018fd105f4ad4c2d6dc45e7288b.
This commit breaks some device runtime builds. Need time to investigate.
show more ...
|
#
7d1c6613 |
| 05-Dec-2024 |
Valentin Clement (バレンタイン クレメン) <clementval@gmail.com> |
[flang] Allow to pass an async id to allocate the descriptor (#118713)
This is a patch in preparation for the support stream ordered memory
allocator in CUDA Fortran.
This patch adds an asynchro
[flang] Allow to pass an async id to allocate the descriptor (#118713)
This is a patch in preparation for the support stream ordered memory
allocator in CUDA Fortran.
This patch adds an asynchronous id to the AllocatableAllocate runtime
function and to Descriptor::Allocate so it can be passed down to the
registered allocator. It is up to the allocator to use this value or
not.
A follow up patch will implement that asynchronous allocator for CUDA
Fortran.
show more ...
|
#
9fdd25e1 |
| 15-Jan-2024 |
Peter Klausler <35819229+klausler@users.noreply.github.com> |
[flang] Don't change size of allocatable in error situation (#77386)
When an already-allocated allocatable array is about to fail
reallocation, don't allow its size or other characteristics to be
[flang] Don't change size of allocatable in error situation (#77386)
When an already-allocated allocatable array is about to fail
reallocation, don't allow its size or other characteristics to be
changed.
Fixes
llvm-test-suite/Fortran/gfortran/regression/multiple_allocation_1.f90
and .../multiple_allocation_3.f90.
show more ...
|
#
76facde3 |
| 28-Dec-2023 |
Slava Zakharin <szakharin@nvidia.com> |
[flang][runtime] Enable more APIs in the offload build. (#76486)
|
#
b4b23ff7 |
| 20-Dec-2023 |
Slava Zakharin <szakharin@nvidia.com> |
[flang][runtime] Enable more APIs in the offload build. (#75996)
This patch enables more numeric (mod, sum, matmul, etc.) APIs,
and some others.
I added new macros to disable warnings about usin
[flang][runtime] Enable more APIs in the offload build. (#75996)
This patch enables more numeric (mod, sum, matmul, etc.) APIs,
and some others.
I added new macros to disable warnings about using C++ STD methods
like operators of std::complex, which do not have __device__ attribute.
This may probably result in unresolved references, if the header files
implementation relies on libstdc++. I will need to follow up on this.
show more ...
|
#
dffd93b3 |
| 17-Oct-2023 |
Peter Klausler <35819229+klausler@users.noreply.github.com> |
[flang][runtime] Fix SAME_TYPE_AS()/EXTENDS_TYPE_OF() for CLASS(*) (#67727)
Ensure that the f18Addendum flag is preserved in AllocatableApplyMold(),
that raw().type is reinitialized in AllocatableD
[flang][runtime] Fix SAME_TYPE_AS()/EXTENDS_TYPE_OF() for CLASS(*) (#67727)
Ensure that the f18Addendum flag is preserved in AllocatableApplyMold(),
that raw().type is reinitialized in AllocatableDeallocatePolymorphic(),
and that the implementations of SameTypeAs() and ExtendsTypeOf() handle
unallocated unlimited polymorphic arguments correctly.
show more ...
|
#
79508db4 |
| 18-Sep-2023 |
jeanPerier <jperier@nvidia.com> |
[flang][runtime] zero size allocation in source allocation (#66124)
Source allocation with a zero sized array is legal, and the resulting
allocatable/pointer should be allocated/associated.
The
[flang][runtime] zero size allocation in source allocation (#66124)
Source allocation with a zero sized array is legal, and the resulting
allocatable/pointer should be allocated/associated.
The current code skipped the actual allocation, leading the allocatable
or pointer to look unallocated/disassociated.
show more ...
|
#
668f261b |
| 23-Aug-2023 |
Slava Zakharin <szakharin@nvidia.com> |
[flang] Make ISO_Fortran_binding.h a standalone header again.
This implements the proposal from https://discourse.llvm.org/t/adding-flang-specific-header-files-to-clang/72442/6 Since ISO_Fortran_bin
[flang] Make ISO_Fortran_binding.h a standalone header again.
This implements the proposal from https://discourse.llvm.org/t/adding-flang-specific-header-files-to-clang/72442/6 Since ISO_Fortran_binding.h is supposed to be included from users' C/C++ codes, it would better have no dependencies on other header files.
Reviewed By: PeteSteinfeld
Differential Revision: https://reviews.llvm.org/D158549
show more ...
|
#
b21c24c3 |
| 29-Jul-2023 |
Peter Klausler <pklausler@nvidia.com> |
[flang][runtime] Recognize and handle FINAL subroutines with contiguous dummy arrays when data are not so
When a FINAL subroutine is being invoked for a discontiguous array, which can happen for INT
[flang][runtime] Recognize and handle FINAL subroutines with contiguous dummy arrays when data are not so
When a FINAL subroutine is being invoked for a discontiguous array, which can happen for INTENT(OUT) dummy arguments and for some left-hand side variables in intrinsic assignment statements, it may be the case that the subroutine being called was defined with a dummy argument that requires contiguous data.
Extend the derived type descriptions used by the runtime to signify when a special procedure binding requires contiguity; set the flags accordingly; check them in the runtime support library, and, when necessary, use a temporary shallow copy of the finalized array data in the call to the final subroutine.
Differential Revision: https://reviews.llvm.org/D156760
show more ...
|
#
52e23979 |
| 20-Mar-2023 |
Valentin Clement <clementval@gmail.com> |
[flang] Add AllocatableInit functions for use in allocate lowering
`AllocatableInitIntrinsic`, `AllocatableInitCharacter` and `AllocatableInitDerived` are meant to be used to initialize a descriptor
[flang] Add AllocatableInit functions for use in allocate lowering
`AllocatableInitIntrinsic`, `AllocatableInitCharacter` and `AllocatableInitDerived` are meant to be used to initialize a descriptor when it is instantiated and not to be used multiple times in a scope. Add `AllocatableInitDerivedForAllocate`, `AllocatableInitCharacterForAllocate` and `AllocatableInitDerivedForAllocate` to be used for the allocation in allocate statement. These new functions are meant to be used on an initialized descriptor and will return directly if the descriptor is allocated so the error handling is done by the call to `AllocatableAllocate`.
Reviewed By: PeteSteinfeld
Differential Revision: https://reviews.llvm.org/D146290
show more ...
|
#
8fd3bfc2 |
| 01-Mar-2023 |
Valentin Clement <clementval@gmail.com> |
[flang][NFC] Remove redundant and incomplete comment
|
#
f88bc7d4 |
| 01-Mar-2023 |
Valentin Clement <clementval@gmail.com> |
[flang] Handle dynamic type in move_alloc
Update move_alloc to carry over the dyanmic type of `from` to `to` and reset the dynamic type of `from` to its declared type when it is polymorphic.
Review
[flang] Handle dynamic type in move_alloc
Update move_alloc to carry over the dyanmic type of `from` to `to` and reset the dynamic type of `from` to its declared type when it is polymorphic.
Reviewed By: PeteSteinfeld
Differential Revision: https://reviews.llvm.org/D144997
show more ...
|
#
3cf82595 |
| 28-Feb-2023 |
David Truby <David.Truby@arm.com> |
[flang] Allow `to` argument of move_alloc to be class(*)
This patch expands the runtime check in move_alloc to allow the destination to be unlimited polymorphic.
Reviewed By: clementval
Differenti
[flang] Allow `to` argument of move_alloc to be class(*)
This patch expands the runtime check in move_alloc to allow the destination to be unlimited polymorphic.
Reviewed By: clementval
Differential Revision: https://reviews.llvm.org/D143571
show more ...
|
#
755535b5 |
| 01-Feb-2023 |
Peter Klausler <pklausler@nvidia.com> |
[flang][runtime] Handle aliasing in Assign()
Detect and handle LHS/RHS aliasing when effecting intrinsic assignments via the Assign() runtime function.
Also: don't apply special handling for alloca
[flang][runtime] Handle aliasing in Assign()
Detect and handle LHS/RHS aliasing when effecting intrinsic assignments via the Assign() runtime function.
Also: don't apply special handling for allocatable LHS when calling a user-defined type-bound ASSIGNMENT(=) generic procedure for a polymorphic type, and refactor some code into utility functions to make Assign() more comprehensible.
Differential Revision: https://reviews.llvm.org/D144026
show more ...
|
#
b37e3597 |
| 08-Feb-2023 |
Valentin Clement <clementval@gmail.com> |
[flang] Carry over the derived type from MOLD
Derived type from the MOLD was not carried over to the newly allocated pointer or allocatable. This may lead to wrong dynamic type when the pointer or a
[flang] Carry over the derived type from MOLD
Derived type from the MOLD was not carried over to the newly allocated pointer or allocatable. This may lead to wrong dynamic type when the pointer or allocatable is polymorphic as shown in the example below:
``` type :: p1 integer :: a end type
type, extends(p1) :: p2 integer :: b end type
class(p1), pointer :: p(:)
allocate(p(5), MOLD=p2(1,2)) ```
Reviewed By: klausler
Differential Revision: https://reviews.llvm.org/D143525
show more ...
|
#
696ad139 |
| 02-Feb-2023 |
Valentin Clement <clementval@gmail.com> |
[flang] Use rank from the allocate object when allocate with mold
The rank from the allocate object might be different from the rank from the mold expression. Use the rank from the allocate object w
[flang] Use rank from the allocate object when allocate with mold
The rank from the allocate object might be different from the rank from the mold expression. Use the rank from the allocate object when applying to mold so the bounds can be set correctly.
Reviewed By: jeanPerier
Differential Revision: https://reviews.llvm.org/D143078
show more ...
|
#
f783c9bb |
| 01-Feb-2023 |
Peixin Qiao <qiaopeixin@huawei.com> |
[flang] Support allocate array from scalar source in runtime
As Fortran 2018 9.7.1.2(7), the value of each element of allocate object becomes the value of source when the allocate object is array an
[flang] Support allocate array from scalar source in runtime
As Fortran 2018 9.7.1.2(7), the value of each element of allocate object becomes the value of source when the allocate object is array and the source is scalar.
Fix #60090.
Reviewed By: PeteSteinfeld
Differential Revision: https://reviews.llvm.org/D142112
show more ...
|
#
2526013a |
| 30-Jan-2023 |
David Truby <david.truby@arm.com> |
[flang] Improve error message for move_alloc
This patch improves the error message when MOVE_ALLOC is passed the same allocated allocatable as both the to and from arguments.
Differential Revision:
[flang] Improve error message for move_alloc
This patch improves the error message when MOVE_ALLOC is passed the same allocated allocatable as both the to and from arguments.
Differential Revision: https://reviews.llvm.org/D142899
show more ...
|
#
9ae4e1ae |
| 18-Jan-2023 |
Valentin Clement <clementval@gmail.com> |
[flang] Do not perform INTERNAL_CHECK for deallocation of unlimited polymorphic with intrinsic type spec
When an unlimited polymorphic descriptor is establish for an intrinsic type spec, the `Pointe
[flang] Do not perform INTERNAL_CHECK for deallocation of unlimited polymorphic with intrinsic type spec
When an unlimited polymorphic descriptor is establish for an intrinsic type spec, the `PointerNullifyIntrinsic` or `AllocatableInitIntrinsic` runtime function is called. These functions do not initialize an addendum with a derivedType. When the deallocation on this descriptor is performed, the runtime should not crash if the addendum is not present. This patch updates `PointerDeallocatePolymorphic` and `AllocatableDeallocatePolymorphic` for this use case.
Depends on D141996
Reviewed By: jeanPerier, PeteSteinfeld
Differential Revision: https://reviews.llvm.org/D142010
show more ...
|
#
e4d9a5e6 |
| 09-Jan-2023 |
David Truby <david.truby@arm.com> |
[flang] Add implementation of move_alloc to the runtime
This patch adds a move_alloc implementation to the flang runtime. Most of the checks required by the standard for move_alloc are done by semen
[flang] Add implementation of move_alloc to the runtime
This patch adds a move_alloc implementation to the flang runtime. Most of the checks required by the standard for move_alloc are done by semenatic analysis; these checks are not replicated here.
Differential Revision: https://reviews.llvm.org/D141286
show more ...
|
#
2cd2b6a7 |
| 17-Jan-2023 |
Valentin Clement <clementval@gmail.com> |
[flang] Lower allocation with MOLD
Lower allocate statement with MOLD= to calls to the Fortran runtime. PointerApplyMold and AllocatableApplyMold are called depending on the object to be allocated.
[flang] Lower allocation with MOLD
Lower allocate statement with MOLD= to calls to the Fortran runtime. PointerApplyMold and AllocatableApplyMold are called depending on the object to be allocated.
Reviewed By: jeanPerier, PeteSteinfeld
Differential Revision: https://reviews.llvm.org/D141843
show more ...
|
#
8c77c011 |
| 13-Jan-2023 |
Peixin Qiao <qiaopeixin@huawei.com> |
[flang] Initial support of allocate statement with source
Support allocate statement with source in runtime version. The source expression is evaluated only once for each allocate statement. When th
[flang] Initial support of allocate statement with source
Support allocate statement with source in runtime version. The source expression is evaluated only once for each allocate statement. When the source expression has shape-spec, uses it for bounds. Otherwise, get the bounds from the source expression. Get the length if the source expression has deferred length parameter.
Reviewed By: clementval, jeanPerier
Differential Revision: https://reviews.llvm.org/D137812
show more ...
|
#
01e8e50c |
| 12-Jan-2023 |
Valentin Clement <clementval@gmail.com> |
[flang] Restore declared type when deallocating polymorphic entities
As mentioned in section 7.3.2.3 note 7, The dynamic type of an unallocated allocatable object or a disassociated pointer is the s
[flang] Restore declared type when deallocating polymorphic entities
As mentioned in section 7.3.2.3 note 7, The dynamic type of an unallocated allocatable object or a disassociated pointer is the same as its declared type.
This patch adds two function to the runtime: - `PointerDeallocatePolymorphic` - `AllocatableDeallocatePolymorphic`
These two functions take a DerivedTypeDesc pointer of the declared type. The lowering is updated accordingly to call these functions for polymorphic and unlimited polyrmophic entities. For unlimited polymorphic entities, the dynamic type is set to nullptr when the entity is on an unallocated or disassociated state.
Reviewed By: PeteSteinfeld, klausler
Differential Revision: https://reviews.llvm.org/D141519
show more ...
|