<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/llvm.git/flang/runtime/descriptor.cpp, branch EmptyLineAfterFunctionDefinition</title>
<subtitle>github.com: llvm/llvm-project.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/llvm.git/'/>
<entry>
<title>[flang] Runtime performance improvements to real formatted input</title>
<updated>2021-11-12T19:40:02+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2021-11-02T20:01:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/llvm.git/commit/?id=da25f968a90ad4560fc920a6d18fc2a0221d2750'/>
<id>da25f968a90ad4560fc920a6d18fc2a0221d2750</id>
<content type='text'>
Profiling a basic internal real input read benchmark shows some
hot spots in the code used to prepare input for decimal-to-binary
conversion, which is of course where the time should be spent.
The library that implements decimal to/from binary conversions has
been optimized, but not the code in the Fortran runtime that calls it,
and there are some obvious light changes worth making here.

Move some member functions from *.cpp files into the class definitions
of Descriptor and IoStatementState to enable inlining and specialization.

Make GetNextInputBytes() the new basic input API within the
runtime, replacing GetCurrentChar() -- which is rewritten in terms of
GetNextInputBytes -- so that input routines can have the
ability to acquire more than one input character at a time
and amortize overhead.

These changes speed up the time to read 1M random reals
using internal I/O from a character array from 1.29s to 0.54s
on my machine, which on par with Intel Fortran and much faster than
GNU Fortran.

Differential Revision: https://reviews.llvm.org/D113697
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Profiling a basic internal real input read benchmark shows some
hot spots in the code used to prepare input for decimal-to-binary
conversion, which is of course where the time should be spent.
The library that implements decimal to/from binary conversions has
been optimized, but not the code in the Fortran runtime that calls it,
and there are some obvious light changes worth making here.

Move some member functions from *.cpp files into the class definitions
of Descriptor and IoStatementState to enable inlining and specialization.

Make GetNextInputBytes() the new basic input API within the
runtime, replacing GetCurrentChar() -- which is rewritten in terms of
GetNextInputBytes -- so that input routines can have the
ability to acquire more than one input character at a time
and amortize overhead.

These changes speed up the time to read 1M random reals
using internal I/O from a character array from 1.29s to 0.54s
on my machine, which on par with Intel Fortran and much faster than
GNU Fortran.

Differential Revision: https://reviews.llvm.org/D113697
</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Set the addendum when establishing pointer section in descriptor</title>
<updated>2021-11-08T10:05:31+00:00</updated>
<author>
<name>Jean Perier</name>
<email>jperier@nvidia.com</email>
</author>
<published>2021-11-08T10:04:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/llvm.git/commit/?id=437543068935b718d4eac5702e04e8438820b4d2'/>
<id>437543068935b718d4eac5702e04e8438820b4d2</id>
<content type='text'>
If the source has an addendum, the descriptor that is being established
to describe a section over the source needs to copy the addendum so that
derived type information is correctly set in the descriptor being
established.

This allows namelist IO with derived type to work correctly.

Differential Revision: https://reviews.llvm.org/D113258
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the source has an addendum, the descriptor that is being established
to describe a section over the source needs to copy the addendum so that
derived type information is correctly set in the descriptor being
established.

This allows namelist IO with derived type to work correctly.

Differential Revision: https://reviews.llvm.org/D113258
</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Move runtime API headers to flang/include/flang/Runtime</title>
<updated>2021-09-03T18:08:34+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2021-09-01T23:00:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/llvm.git/commit/?id=830c0b9023cd0cf91955900e0d96283e7a8c3711'/>
<id>830c0b9023cd0cf91955900e0d96283e7a8c3711</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Run-time derived type initialization and destruction</title>
<updated>2021-07-20T22:24:16+00:00</updated>
<author>
<name>peter klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2021-07-19T18:53:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/llvm.git/commit/?id=a48e41683ae1a9b9a5bde750d3b418a205c28cc8'/>
<id>a48e41683ae1a9b9a5bde750d3b418a205c28cc8</id>
<content type='text'>
Use derived type information tables to drive default component
initialization (when needed), component destruction, and calls to
final subroutines.  Perform these operations automatically for
ALLOCATE()/DEALLOCATE() APIs for allocatables, automatics, and
pointers.  Add APIs for use in lowering to perform these operations
for non-allocatable/automatic non-pointer variables.
Data pointer component initialization supports arbitrary constant
designators, a F'2008 feature, which may be a first for Fortran
implementations.

Differential Revision: https://reviews.llvm.org/D106297
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use derived type information tables to drive default component
initialization (when needed), component destruction, and calls to
final subroutines.  Perform these operations automatically for
ALLOCATE()/DEALLOCATE() APIs for allocatables, automatics, and
pointers.  Add APIs for use in lowering to perform these operations
for non-allocatable/automatic non-pointer variables.
Data pointer component initialization supports arbitrary constant
designators, a F'2008 feature, which may be a first for Fortran
implementations.

Differential Revision: https://reviews.llvm.org/D106297
</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Runtime API for data pointers</title>
<updated>2021-07-19T15:23:06+00:00</updated>
<author>
<name>peter klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2021-07-16T17:42:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/llvm.git/commit/?id=ad424cf1ed2a191b3e93f60ca591104dbf4b79a2'/>
<id>ad424cf1ed2a191b3e93f60ca591104dbf4b79a2</id>
<content type='text'>
Define and implement an API for use by lowering to
implement operations on pointers.

Differential Revision: https://reviews.llvm.org/D106170
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Define and implement an API for use by lowering to
implement operations on pointers.

Differential Revision: https://reviews.llvm.org/D106170
</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Runtime implementation for default derived type formatted I/O</title>
<updated>2021-06-18T17:30:28+00:00</updated>
<author>
<name>peter klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2021-06-17T20:13:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/llvm.git/commit/?id=79caf69cc08a72022f968020eab486b698fd4178'/>
<id>79caf69cc08a72022f968020eab486b698fd4178</id>
<content type='text'>
This is *not* user-defined derived type I/O, but rather Fortran's
built-in capabilities for using derived type data in I/O lists
and NAMELIST groups.

This feature depends on having the derived type description tables
that are created by Semantics available, passed through compilation
as initialized static objects to which pointers can be targeted
in the descriptors of I/O list items and NAMELIST groups.

NAMELIST processing now handles component references on input
(e.g., "&amp;GROUP x%component = 123 /").

The C++ perspectives of the derived type information records
were transformed into proper classes when it was necessary to add
member functions to them.

The code in Semantics that generates derived type information
was changed to emit derived type components in component order,
not alphabetic order.

Differential Revision: https://reviews.llvm.org/D104485
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is *not* user-defined derived type I/O, but rather Fortran's
built-in capabilities for using derived type data in I/O lists
and NAMELIST groups.

This feature depends on having the derived type description tables
that are created by Semantics available, passed through compilation
as initialized static objects to which pointers can be targeted
in the descriptors of I/O list items and NAMELIST groups.

NAMELIST processing now handles component references on input
(e.g., "&amp;GROUP x%component = 123 /").

The C++ perspectives of the derived type information records
were transformed into proper classes when it was necessary to add
member functions to them.

The code in Semantics that generates derived type information
was changed to emit derived type components in component order,
not alphabetic order.

Differential Revision: https://reviews.llvm.org/D104485
</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Correct the subscripts used for arguments to character intrinsics</title>
<updated>2021-06-16T17:26:25+00:00</updated>
<author>
<name>peter klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2021-06-15T22:09:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/llvm.git/commit/?id=8ba9ee46e465a56a54f8361703d3af7f4bc98d63'/>
<id>8ba9ee46e465a56a54f8361703d3af7f4bc98d63</id>
<content type='text'>
When chasing down another unrelated bug, I noticed that the
implementations of various character intrinsic functions assume
that the lower bounds of (some of) their arguments were 1.
This isn't necessarily the case, so I've cleaned them up, tweaked
the unit tests to exercise the fix, and regularized the allocation
pattern used for results to use SetBounds() before Allocate() rather
than the old original Descriptor::Allocate() wrapper around
CFI_allocate().

Since there were few other remaining uses of the old original
Descriptor::Allocate() wrapper, I also converted them to the
new one and deleted the old one.

Differential Revision: https://reviews.llvm.org/D104325
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When chasing down another unrelated bug, I noticed that the
implementations of various character intrinsic functions assume
that the lower bounds of (some of) their arguments were 1.
This isn't necessarily the case, so I've cleaned them up, tweaked
the unit tests to exercise the fix, and regularized the allocation
pattern used for results to use SetBounds() before Allocate() rather
than the old original Descriptor::Allocate() wrapper around
CFI_allocate().

Since there were few other remaining uses of the old original
Descriptor::Allocate() wrapper, I also converted them to the
new one and deleted the old one.

Differential Revision: https://reviews.llvm.org/D104325
</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Implement NAMELIST I/O in the runtime</title>
<updated>2021-05-06T18:18:36+00:00</updated>
<author>
<name>peter klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2021-05-05T18:37:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/llvm.git/commit/?id=6a1c3efa051e012aaf102b7d9e7e428a58ea8ad9'/>
<id>6a1c3efa051e012aaf102b7d9e7e428a58ea8ad9</id>
<content type='text'>
Add InputNamelist and OutputNamelist as I/O data transfer APIs
to be used with internal &amp; external list-directed I/O; delete the
needless original namelist-specific Begin... calls.
Implement NAMELIST output and input; add basic tests.

Differential Revision: https://reviews.llvm.org/D101931
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add InputNamelist and OutputNamelist as I/O data transfer APIs
to be used with internal &amp; external list-directed I/O; delete the
needless original namelist-specific Begin... calls.
Implement NAMELIST output and input; add basic tests.

Differential Revision: https://reviews.llvm.org/D101931
</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] TRANSFER() intrinsic function</title>
<updated>2021-04-02T17:41:37+00:00</updated>
<author>
<name>peter klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2021-04-02T16:30:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/llvm.git/commit/?id=78a39d2a41661719e8d973830568571d75cd4b09'/>
<id>78a39d2a41661719e8d973830568571d75cd4b09</id>
<content type='text'>
API, implementation, and unit tests for the intrinsic
function TRANSFER.

Differential Revision: https://reviews.llvm.org/D99799
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
API, implementation, and unit tests for the intrinsic
function TRANSFER.

Differential Revision: https://reviews.llvm.org/D99799
</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Implement reductions in the runtime</title>
<updated>2021-04-01T18:23:50+00:00</updated>
<author>
<name>peter klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2021-03-31T16:14:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/llvm.git/commit/?id=e372e0f906194cb051ad71305e00f4634860bdf3'/>
<id>e372e0f906194cb051ad71305e00f4634860bdf3</id>
<content type='text'>
Add runtime APIs, implementations, and tests for ALL, ANY, COUNT,
MAXLOC, MAXVAL, MINLOC, MINVAL, PRODUCT, and SUM reduction
transformantional intrinsic functions for all relevant argument
and result types and kinds, both without DIM= arguments
(total reductions) and with (partial reductions).

Complex-valued reductions have their APIs in C so that
C's _Complex types can be used for their results.

Some infrastructure work was also necessary or noticed:
* Usage of "long double" in the compiler was cleaned up a
  bit, and host dependences on x86 / MSVC have been isolated
  in a new Common/long-double header.
* Character comparison has been exposed via an extern template
  so that reductions could use it.
* Mappings from Fortran type category/kind to host C++ types
  and vice versa have been isolated into runtime/cpp-type.h and
  then used throughout the runtime as appropriate.
* The portable 128-bit integer package in Common/uint128.h
  was generalized to support signed comparisons.
* Bugs in descriptor indexing code were fixed.

Differential Revision: https://reviews.llvm.org/D99666
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add runtime APIs, implementations, and tests for ALL, ANY, COUNT,
MAXLOC, MAXVAL, MINLOC, MINVAL, PRODUCT, and SUM reduction
transformantional intrinsic functions for all relevant argument
and result types and kinds, both without DIM= arguments
(total reductions) and with (partial reductions).

Complex-valued reductions have their APIs in C so that
C's _Complex types can be used for their results.

Some infrastructure work was also necessary or noticed:
* Usage of "long double" in the compiler was cleaned up a
  bit, and host dependences on x86 / MSVC have been isolated
  in a new Common/long-double header.
* Character comparison has been exposed via an extern template
  so that reductions could use it.
* Mappings from Fortran type category/kind to host C++ types
  and vice versa have been isolated into runtime/cpp-type.h and
  then used throughout the runtime as appropriate.
* The portable 128-bit integer package in Common/uint128.h
  was generalized to support signed comparisons.
* Bugs in descriptor indexing code were fixed.

Differential Revision: https://reviews.llvm.org/D99666
</pre>
</div>
</content>
</entry>
</feed>
