<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/flang-rt/lib/runtime/derived.cpp, branch users/mingmingl-llvm/samplefdo-profile-format</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[flang] Add special genre for allocatable and pointer device component (#157731)</title>
<updated>2025-09-09T20:12:20+00:00</updated>
<author>
<name>Valentin Clement (バレンタイン クレメン)</name>
<email>clementval@gmail.com</email>
</author>
<published>2025-09-09T20:12:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d3c09c45aa9807e980f8fb029f2b94d8eb175265'/>
<id>d3c09c45aa9807e980f8fb029f2b94d8eb175265</id>
<content type='text'>
Allocatable and pointer device components need a different allocator
index to be set in their descriptor when it is establish. This PR adds
two genre for the components `AllocatableDevice` and `PointerDevice` so
the correct allocator index can be set accordingly.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Allocatable and pointer device components need a different allocator
index to be set in their descriptor when it is establish. This PR adds
two genre for the components `AllocatableDevice` and `PointerDevice` so
the correct allocator index can be set accordingly.</pre>
</div>
</content>
</entry>
<entry>
<title>[Flang][OpenMP][Runtime] Minor Flang runtime for OpenMP AMDGPU modifications (#152631)</title>
<updated>2025-08-29T21:04:48+00:00</updated>
<author>
<name>agozillon</name>
<email>Andrew.Gozillon@amd.com</email>
</author>
<published>2025-08-29T21:04:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=30d2cb5a7ecd34cf19843533681a53aa7bd8d351'/>
<id>30d2cb5a7ecd34cf19843533681a53aa7bd8d351</id>
<content type='text'>
We have some modifications downstream to compile the flang runtime for
amdgpu using clang OpenMP, some more hacky than others to workaround
(hopefully temporary) compiler issues. The additions here are the
non-hacky alterations.

Main changes:
* Create freestanding versions of memcpy, strlen and memmove, and
replace std:: references with these so that we can default to std:: when
it's available, or our own Flang implementation when it's not. * Wrap
more bits and pieces of the library in declare target wrappers (RT_*
macros). * Fix some warnings that'll pose issues with werror on, in this
case having the namespace infront of variables passed to templates.

Another minor issues that'll likely still pop up depending on the
program you're linking with is that abort will be undefined, it is
perhaps possible to solve it with a freestanding implementation as with
memcpy etc. but we end up with multiple definitions in this case. An
alternative is to create an empty extern "c" version (which can be empty
or forwrd on to the builtin).

Co-author: Dan Palermo Dan.Palermo@amd.com</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We have some modifications downstream to compile the flang runtime for
amdgpu using clang OpenMP, some more hacky than others to workaround
(hopefully temporary) compiler issues. The additions here are the
non-hacky alterations.

Main changes:
* Create freestanding versions of memcpy, strlen and memmove, and
replace std:: references with these so that we can default to std:: when
it's available, or our own Flang implementation when it's not. * Wrap
more bits and pieces of the library in declare target wrappers (RT_*
macros). * Fix some warnings that'll pose issues with werror on, in this
case having the namespace infront of variables passed to templates.

Another minor issues that'll likely still pop up depending on the
program you're linking with is that abort will be undefined, it is
perhaps possible to solve it with a freestanding implementation as with
memcpy etc. but we end up with multiple definitions in this case. An
alternative is to create an empty extern "c" version (which can be empty
or forwrd on to the builtin).

Co-author: Dan Palermo Dan.Palermo@amd.com</pre>
</div>
</content>
</entry>
<entry>
<title> [flang][runtime] Optimize Descriptor::FixedStride() (#151755)</title>
<updated>2025-08-05T20:39:54+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2025-08-05T20:39:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=56051daaf0584ed797940fda74a4cfdc2b3586c0'/>
<id>56051daaf0584ed797940fda74a4cfdc2b3586c0</id>
<content type='text'>
Put the common cases on fast paths, and don't depend on IsContiguous()
in the general case path. Add a unit test, too.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Put the common cases on fast paths, and don't depend on IsContiguous()
in the general case path. Add a unit test, too.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Allow -fdefault-integer-8 with defined I/O (#148927)</title>
<updated>2025-07-16T16:09:49+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2025-07-16T16:09:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=52a46dc57f29e87a5a298ce325562fa2e3d057c9'/>
<id>52a46dc57f29e87a5a298ce325562fa2e3d057c9</id>
<content type='text'>
Defined I/O subroutines have UNIT= and IOSTAT= dummy arguments that are
required to have type INTEGER with its default kind. When that default
kind is modified via -fdefault-integer-8, calls to defined I/O
subroutines from the runtime don't work.

Add a flag to the two data structures shared between the compiler and
the runtime support library to indicate that a defined I/O subroutine
was compiled under -fdefault-integer-8. This has been done in a
compatible manner, so that existing binaries are compatible with the new
library and new binaries are compatible with the old library, unless of
course -fdefault-integer-8 is used.

Fixes https://github.com/llvm/llvm-project/issues/148638.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Defined I/O subroutines have UNIT= and IOSTAT= dummy arguments that are
required to have type INTEGER with its default kind. When that default
kind is modified via -fdefault-integer-8, calls to defined I/O
subroutines from the runtime don't work.

Add a flag to the two data structures shared between the compiler and
the runtime support library to indicate that a defined I/O subroutine
was compiled under -fdefault-integer-8. This has been done in a
compatible manner, so that existing binaries are compatible with the new
library and new binaries are compatible with the old library, unless of
course -fdefault-integer-8 is used.

Fixes https://github.com/llvm/llvm-project/issues/148638.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][runtime] Speed up initialization &amp; destruction (#148087)</title>
<updated>2025-07-14T18:14:02+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2025-07-14T18:14:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2e53a68c09b1bb4bc6c31146c8e69789ae9848ae'/>
<id>2e53a68c09b1bb4bc6c31146c8e69789ae9848ae</id>
<content type='text'>
Rework derived type initialization in the runtime to just initialize the
first element of any array, and then memcpy it to the others, rather
than exercising the per-component paths for each element.

Reword derived type destruction in the runtime to detect and exploit a
fast path for allocatable components whose types themselves don't need
nested destruction.

Small tweaks were made in hot paths exposed by profiling in descriptor
operations and derived type assignment.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rework derived type initialization in the runtime to just initialize the
first element of any array, and then memcpy it to the others, rather
than exercising the per-component paths for each element.

Reword derived type destruction in the runtime to detect and exploit a
fast path for allocatable components whose types themselves don't need
nested destruction.

Small tweaks were made in hot paths exposed by profiling in descriptor
operations and derived type assignment.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Restructure runtime to avoid recursion (relanding) (#143993)</title>
<updated>2025-06-16T21:37:01+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2025-06-16T21:37:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2bf3ccabfa37ee1b2d74da7b370cdb16a5cc8ac0'/>
<id>2bf3ccabfa37ee1b2d74da7b370cdb16a5cc8ac0</id>
<content type='text'>
Recursion, both direct and indirect, prevents accurate stack size
calculation at link time for GPU device code. Restructure these
recursive (often mutually so) routines in the Fortran runtime with new
implementations based on an iterative work queue with
suspendable/resumable work tickets: Assign, Initialize, initializeClone,
Finalize, and Destroy.

Default derived type I/O is also recursive, but already disabled. It can
be added to this new framework later if the overall approach succeeds.

Note that derived type FINAL subroutine calls, defined assignments, and
defined I/O procedures all perform callbacks into user code, which may
well reenter the runtime library. This kind of recursion is not handled
by this change, although it may be possible to do so in the future using
thread-local work queues.

(Relanding this patch after reverting initial attempt due to some test
failures that needed some time to analyze and fix.)

Fixes https://github.com/llvm/llvm-project/issues/142481.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Recursion, both direct and indirect, prevents accurate stack size
calculation at link time for GPU device code. Restructure these
recursive (often mutually so) routines in the Fortran runtime with new
implementations based on an iterative work queue with
suspendable/resumable work tickets: Assign, Initialize, initializeClone,
Finalize, and Destroy.

Default derived type I/O is also recursive, but already disabled. It can
be added to this new framework later if the overall approach succeeds.

Note that derived type FINAL subroutine calls, defined assignments, and
defined I/O procedures all perform callbacks into user code, which may
well reenter the runtime library. This kind of recursion is not handled
by this change, although it may be possible to do so in the future using
thread-local work queues.

(Relanding this patch after reverting initial attempt due to some test
failures that needed some time to analyze and fix.)

Fixes https://github.com/llvm/llvm-project/issues/142481.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert runtime work queue patch, it breaks some tests that need investigation (#143713)</title>
<updated>2025-06-11T14:55:06+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2025-06-11T14:55:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=10f512f7bbda076ca2a0f9e3fcb2e7be0cb07199'/>
<id>10f512f7bbda076ca2a0f9e3fcb2e7be0cb07199</id>
<content type='text'>
Revert "[flang][runtime] Another try to fix build failure"

This reverts commit 13869cac2b5051e453aa96ad71220d9d33404620.

Revert "[flang][runtime] Fix build bot flang-runtime-cuda-gcc errors
(#143650)"

This reverts commit d75e28477af0baa063a4d4cc7b3cf657cfadd758.

Revert "[flang][runtime] Replace recursion with iterative work queue
(#137727)"

This reverts commit 163c67ad3d1bf7af6590930d8f18700d65ad4564.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Revert "[flang][runtime] Another try to fix build failure"

This reverts commit 13869cac2b5051e453aa96ad71220d9d33404620.

Revert "[flang][runtime] Fix build bot flang-runtime-cuda-gcc errors
(#143650)"

This reverts commit d75e28477af0baa063a4d4cc7b3cf657cfadd758.

Revert "[flang][runtime] Replace recursion with iterative work queue
(#137727)"

This reverts commit 163c67ad3d1bf7af6590930d8f18700d65ad4564.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][runtime] Replace recursion with iterative work queue (#137727)</title>
<updated>2025-06-10T21:44:19+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2025-06-10T21:44:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=163c67ad3d1bf7af6590930d8f18700d65ad4564'/>
<id>163c67ad3d1bf7af6590930d8f18700d65ad4564</id>
<content type='text'>
Recursion, both direct and indirect, prevents accurate stack size
calculation at link time for GPU device code. Restructure these
recursive (often mutually so) routines in the Fortran runtime with new
implementations based on an iterative work queue with
suspendable/resumable work tickets: Assign, Initialize, initializeClone,
Finalize, and Destroy.

Default derived type I/O is also recursive, but already disabled. It can
be added to this new framework later if the overall approach succeeds.

Note that derived type FINAL subroutine calls, defined assignments, and
defined I/O procedures all perform callbacks into user code, which may
well reenter the runtime library. This kind of recursion is not handled
by this change, although it may be possible to do so in the future using
thread-local work queues.

The effects of this restructuring on CPU performance are yet to be
measured.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Recursion, both direct and indirect, prevents accurate stack size
calculation at link time for GPU device code. Restructure these
recursive (often mutually so) routines in the Fortran runtime with new
implementations based on an iterative work queue with
suspendable/resumable work tickets: Assign, Initialize, initializeClone,
Finalize, and Destroy.

Default derived type I/O is also recursive, but already disabled. It can
be added to this new framework later if the overall approach succeeds.

Note that derived type FINAL subroutine calls, defined assignments, and
defined I/O procedures all perform callbacks into user code, which may
well reenter the runtime library. This kind of recursion is not handled
by this change, although it may be possible to do so in the future using
thread-local work queues.

The effects of this restructuring on CPU performance are yet to be
measured.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][cuda] Use a reference for asyncObject (#140614)</title>
<updated>2025-05-19T22:02:53+00:00</updated>
<author>
<name>Valentin Clement (バレンタイン クレメン)</name>
<email>clementval@gmail.com</email>
</author>
<published>2025-05-19T22:02:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f5609aa1b014bea1eb72a992665c6afa41015794'/>
<id>f5609aa1b014bea1eb72a992665c6afa41015794</id>
<content type='text'>
Switch from `int64_t` to `int64_t*` to fit with the rest of the
implementation.

New tentative with some fix. The previous was reverted some time ago.

Reviewed in #138010</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Switch from `int64_t` to `int64_t*` to fit with the rest of the
implementation.

New tentative with some fix. The previous was reverted some time ago.

Reviewed in #138010</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[flang][cuda] Use a reference for asyncObject" (#138221)</title>
<updated>2025-05-02T00:41:44+00:00</updated>
<author>
<name>Valentin Clement (バレンタイン クレメン)</name>
<email>clementval@gmail.com</email>
</author>
<published>2025-05-02T00:41:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9b6b144438ccf371e51b578e642f2ce5d3aa89c8'/>
<id>9b6b144438ccf371e51b578e642f2ce5d3aa89c8</id>
<content type='text'>
Reverts llvm/llvm-project#138186</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reverts llvm/llvm-project#138186</pre>
</div>
</content>
</entry>
</feed>
