5 Commits

Author SHA1 Message Date
jeanPerier
f49d26bc77
[flang][runtime] add IsAssumedSize API (#93857)
Needed for SELECT RANK implementation. I want to stay away from
generating the `rank > 0 && ...` logic in FIR codegen for now.
2024-05-31 08:37:23 +02:00
jeanPerier
2b78c64152
[flang] add API to copy and update descriptors for assumed ranks (#93305)
When passing assumed-rank around, the lower bounds, dynamic type and
attribute must sometimes be updated to match the dummy attributes. See
https://github.com/llvm/llvm-project/blob/main/flang/docs/AssumedRank.md#annex-1---descriptor-temporary-for-the-dummy-arguments
for more details.

Doing it inline would require generating many instructions and block CFG
at the LLVM IR dialect level in codegen. Go for a simple runtime API
instead.
A matching fir.rebox_assumed_rank operation will be created and will
allow for easier future optimizations when inlining is done in FIR.
2024-05-27 10:32:33 +02:00
Slava Zakharin
76facde32c
[flang][runtime] Enable more APIs in the offload build. (#76486) 2023-12-28 13:50:43 -08:00
Slava Zakharin
b4b23ff7f8
[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.
2023-12-20 11:52:51 -08:00
Peter Klausler
77ff6f7df8 [flang] Define & implement a lowering support API IsContiguous() in runtime
Create a new flang/runtime/support.cpp module to hold miscellaneous
runtime APIs to support lowering, and define an API IsContiguous() to
wrap the member function predicate Descriptor::IsContiguous().
And do a little clean-up of other API headers that don't need to expose
Runtime/descriptor.h.

Differential Revision: https://reviews.llvm.org/D114752
2021-11-30 14:15:56 -08:00