<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/flang-rt/include, branch main</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][runtime] Control stream truncation via runtime environment (#168415)</title>
<updated>2025-11-19T16:54:43+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2025-11-19T16:54:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a55e30b12cf90ba2e9c674c94ea3f2b5fa8f2c3b'/>
<id>a55e30b12cf90ba2e9c674c94ea3f2b5fa8f2c3b</id>
<content type='text'>
The ISO Fortran standards don't say whether a WRITE to a formatted
stream unit should truncate the unit if there has been any repositioning
(via POS= control list specifiers) to an earlier point in the stream.
But units with sequential records do truncate on writes after BACKSPACE
and REWIND statements, and many compilers (including this one) truncate
stream units too. Since some compilers don't truncate streams, this
patch adds an environment variable FORT_TRUNCATE_STREAM that can be set
to 0 to disable truncation and ease porting to flang-new of codes that
depend on that behavior.

Fixes https://github.com/llvm/llvm-project/issues/167569.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The ISO Fortran standards don't say whether a WRITE to a formatted
stream unit should truncate the unit if there has been any repositioning
(via POS= control list specifiers) to an earlier point in the stream.
But units with sequential records do truncate on writes after BACKSPACE
and REWIND statements, and many compilers (including this one) truncate
stream units too. Since some compilers don't truncate streams, this
patch adds an environment variable FORT_TRUNCATE_STREAM that can be set
to 0 to disable truncation and ease porting to flang-new of codes that
depend on that behavior.

Fixes https://github.com/llvm/llvm-project/issues/167569.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][runtime] Advance output record in specific case (#167786)</title>
<updated>2025-11-14T16:24:08+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2025-11-14T16:24:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a284ce8e0c9f409f4113007dd1e634f291a33746'/>
<id>a284ce8e0c9f409f4113007dd1e634f291a33746</id>
<content type='text'>
When a formatted WRITE takes place in a defined output subroutine called
from a context in which record advancement is allowed, such as NAMELIST,
the char-string-edit-descs in the format can trigger record advancement.

Also clean up confusing messiness lingering from the separation of
iostat.h two headers in flang/.../Runtime. iostat.h didn't need to be
put into flang/.../Runtime since it's included only by flang-rt, and
iostat-consts.h doesn't need one of its includes.

Fixes https://github.com/llvm/llvm-project/issues/167757.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When a formatted WRITE takes place in a defined output subroutine called
from a context in which record advancement is allowed, such as NAMELIST,
the char-string-edit-descs in the format can trigger record advancement.

Also clean up confusing messiness lingering from the separation of
iostat.h two headers in flang/.../Runtime. iostat.h didn't need to be
put into flang/.../Runtime since it's included only by flang-rt, and
iostat-consts.h doesn't need one of its includes.

Fixes https://github.com/llvm/llvm-project/issues/167757.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][runtime] Allow some list-directed child output to advance (#166847)</title>
<updated>2025-11-07T16:42:04+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2025-11-07T16:42:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1baf7dbed2083a42f71d9e14149490b5f3ce67e3'/>
<id>1baf7dbed2083a42f71d9e14149490b5f3ce67e3</id>
<content type='text'>
List-directed child input is allowed to advance to new records in some
circumstances, and list-directed output should be as well so that e.g.
NAMELIST output via a defined WRITE(FORMATTED) generic doesn't get
truncated by FORT_FMT_RECL.

Fixes https://github.com/llvm/llvm-project/issues/166804.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
List-directed child input is allowed to advance to new records in some
circumstances, and list-directed output should be as well so that e.g.
NAMELIST output via a defined WRITE(FORMATTED) generic doesn't get
truncated by FORT_FMT_RECL.

Fixes https://github.com/llvm/llvm-project/issues/166804.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][runtime] Tweak GetNextNonBlank() performance (#164521)</title>
<updated>2025-10-24T19:13:01+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2025-10-24T19:13:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1df7f2baa9a8f9fcec90de486686766cc2fd2bb1'/>
<id>1df7f2baa9a8f9fcec90de486686766cc2fd2bb1</id>
<content type='text'>
When skipping blanks during input from an ASCII file, scan the buffered
characters directly when possible rather than using the more general
path. This adds complexity, but shaves a few percent off the runtime of
a code that reads in millions of list-directed integers (best time over
multiple runs goes from 17.56 to 16.84 sec).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When skipping blanks during input from an ASCII file, scan the buffered
characters directly when possible rather than using the more general
path. This adds complexity, but shaves a few percent off the runtime of
a code that reads in millions of list-directed integers (best time over
multiple runs goes from 17.56 to 16.84 sec).</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][runtime] Expand IOTYPE and V_LIST (#160744)</title>
<updated>2025-09-30T17:35:37+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2025-09-30T17:35:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2c58d192a2a6e54080ac36e0626487747dc7be5c'/>
<id>2c58d192a2a6e54080ac36e0626487747dc7be5c</id>
<content type='text'>
The IOTYPE and V_LIST dummy arguments to a defined formatted I/O
subroutine are extracted from a DT edit descriptor in a FORMAT. They are
currently stored in the DataEdit structure, and their maximum sizes are
rather small since DataEdits are sometimes returned or passed by value.

This patch moves their storage into the FormattedIoStatementState
structure and enlarges them a bit.

Fixes https://github.com/llvm/llvm-project/issues/154954.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The IOTYPE and V_LIST dummy arguments to a defined formatted I/O
subroutine are extracted from a DT edit descriptor in a FORMAT. They are
currently stored in the DataEdit structure, and their maximum sizes are
rather small since DataEdits are sometimes returned or passed by value.

This patch moves their storage into the FormattedIoStatementState
structure and enlarges them a bit.

Fixes https://github.com/llvm/llvm-project/issues/154954.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][runtime] Let more list-directed child input advance (#160590)</title>
<updated>2025-09-30T17:35:06+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2025-09-30T17:35:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=673e3051b0ededcf9e028a86faae6d2ba8b09daa'/>
<id>673e3051b0ededcf9e028a86faae6d2ba8b09daa</id>
<content type='text'>
Whether list-directed child READ statements should be allowed to advance
to further records is neither explicit in the standard nor consistent in
existing Fortran implementations. We allow child namelist READ
statements to advance, but not other list- directed child input.

This patch refines our interpretation of this case. Child namelist READ
statements continue to be able to advance; in addition, non-namelist
child READ statements can now advance if their parent READ statement is
a list-directed input statement at the top level, or a child that could.
But non-namelist list-directed child input taking place in a context
with explicit format control won't advance to following records, so that
the format-controlled parent READ statement can retain control over
record advancement.

Also corrects two cases of record repositioning in numeric input
editing, which were failing under child input because they weren't
allowing for left tab limits.

Fixes https://github.com/llvm/llvm-project/issues/160351.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Whether list-directed child READ statements should be allowed to advance
to further records is neither explicit in the standard nor consistent in
existing Fortran implementations. We allow child namelist READ
statements to advance, but not other list- directed child input.

This patch refines our interpretation of this case. Child namelist READ
statements continue to be able to advance; in addition, non-namelist
child READ statements can now advance if their parent READ statement is
a list-directed input statement at the top level, or a child that could.
But non-namelist list-directed child input taking place in a context
with explicit format control won't advance to following records, so that
the format-controlled parent READ statement can retain control over
record advancement.

Also corrects two cases of record repositioning in numeric input
editing, which were failing under child input because they weren't
allowing for left tab limits.

Fixes https://github.com/llvm/llvm-project/issues/160351.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][runtime] Use dumber but faster check for list-directed repeti… (#159867)</title>
<updated>2025-09-23T22:45:35+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2025-09-23T22:45:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ea5262ffc95a767cb5a4b0ea6f04857e4aa00c46'/>
<id>ea5262ffc95a767cb5a4b0ea6f04857e4aa00c46</id>
<content type='text'>
…tion

When scanning list-directed input for nulls and repetition counts, the
current library depends on having each record be prescanned for the
presence of asterisk characters. It turns out that the overhead of
calling memchr(...,'*',...) on each record doesn't pay off, especially
on systems without SIMD-vectorized memchr implementations -- even on
those, it's faster (about 10%) to just scan ahead for asterisks when
decimal digits are encountered. Only when an asterisk is present, which
is not common, should we then bother to convert the digits to their
integer value.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
…tion

When scanning list-directed input for nulls and repetition counts, the
current library depends on having each record be prescanned for the
presence of asterisk characters. It turns out that the overhead of
calling memchr(...,'*',...) on each record doesn't pay off, especially
on systems without SIMD-vectorized memchr implementations -- even on
those, it's faster (about 10%) to just scan ahead for asterisks when
decimal digits are encountered. Only when an asterisk is present, which
is not common, should we then bother to convert the digits to their
integer value.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Implement FNUM() (#159433)</title>
<updated>2025-09-19T15:09:39+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2025-09-19T15:09:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=80fa3bddd0dfd5c1ed4301033e5647a3c7f226ee'/>
<id>80fa3bddd0dfd5c1ed4301033e5647a3c7f226ee</id>
<content type='text'>
The GNU Fortran library function FNUM(u) returns the UNIX file
descriptor that corresponds to an open Fortran unit number, if any;
otherwise -1.

This implementation is a library extension only, not an intrinsic.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The GNU Fortran library function FNUM(u) returns the UNIX file
descriptor that corresponds to an open Fortran unit number, if any;
otherwise -1.

This implementation is a library extension only, not an intrinsic.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][runtime] Preserve some list-directed input state in child (#157571)</title>
<updated>2025-09-10T16:31:14+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2025-09-10T16:31:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=71389a5c7bbcf1b2200f5434d794e6ee44c59e4b'/>
<id>71389a5c7bbcf1b2200f5434d794e6ee44c59e4b</id>
<content type='text'>
Child list-directed input needs to inherit and return the state used to
process trailing separators (eatComma_) and terminal '/' (hitSlash_)
from any parent list-directed input statement.

Fixes https://github.com/llvm/llvm-project/issues/157509 and
https://github.com/llvm/llvm-project/issues/154971.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Child list-directed input needs to inherit and return the state used to
process trailing separators (eatComma_) and terminal '/' (hitSlash_)
from any parent list-directed input statement.

Fixes https://github.com/llvm/llvm-project/issues/157509 and
https://github.com/llvm/llvm-project/issues/154971.</pre>
</div>
</content>
</entry>
<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>
</feed>
