<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/llvm.git/flang/runtime/character.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] 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] Remove *- C++ -* incantation from runtime .cpp files. NFC</title>
<updated>2021-09-03T07:17:45+00:00</updated>
<author>
<name>Diana Picus</name>
<email>diana.picus@linaro.org</email>
</author>
<published>2021-09-02T08:14:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/llvm.git/commit/?id=651f58bf63e6cb6926faf0f33200c57fdd591a85'/>
<id>651f58bf63e6cb6926faf0f33200c57fdd591a85</id>
<content type='text'>
We should only need to spell the language out in .h files.

Differential Revision: https://reviews.llvm.org/D109138
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We should only need to spell the language out in .h files.

Differential Revision: https://reviews.llvm.org/D109138
</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] Change capitalization for Adjustl/r</title>
<updated>2021-06-04T08:34:53+00:00</updated>
<author>
<name>Diana Picus</name>
<email>diana.picus@linaro.org</email>
</author>
<published>2021-05-31T08:51:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/llvm.git/commit/?id=263a89c9b788b4c6bc174dc169dca2a3b729ea02'/>
<id>263a89c9b788b4c6bc174dc169dca2a3b729ea02</id>
<content type='text'>
Rename the definitions of the character runtime functions Adjustl and
Adjustr (used to be AdjustL and AdjustR respectively).

Also add unit tests (and move some of the helpers to the top of the
file, since they're now used in more than one place).

Differential Revision: https://reviews.llvm.org/D103392
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rename the definitions of the character runtime functions Adjustl and
Adjustr (used to be AdjustL and AdjustR respectively).

Also add unit tests (and move some of the helpers to the top of the
file, since they're now used in more than one place).

Differential Revision: https://reviews.llvm.org/D103392
</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Remove redundant reallocation</title>
<updated>2021-05-07T08:54:09+00:00</updated>
<author>
<name>Diana Picus</name>
<email>diana.picus@linaro.org</email>
</author>
<published>2021-05-06T09:26:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/llvm.git/commit/?id=2ea36e94927ccbc1f8e915a4e5c932531e69f02d'/>
<id>2ea36e94927ccbc1f8e915a4e5c932531e69f02d</id>
<content type='text'>
The MaxMinHelper used to implement MIN and MAX for character types would
reallocate the accumulator whenever the number of characters in it was
different from that in the other input. This is unnecessary if the
accumulator is already larger than the other input. This patch fixes the
issue and adds a unit test to make sure we don't reallocate if we don't
need to.

Differential Revision: https://reviews.llvm.org/D101984
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The MaxMinHelper used to implement MIN and MAX for character types would
reallocate the accumulator whenever the number of characters in it was
different from that in the other input. This is unnecessary if the
accumulator is already larger than the other input. This patch fixes the
issue and adds a unit test to make sure we don't reallocate if we don't
need to.

Differential Revision: https://reviews.llvm.org/D101984
</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Fix a bug in the character runtime</title>
<updated>2021-05-03T08:08:08+00:00</updated>
<author>
<name>Diana Picus</name>
<email>diana.picus@linaro.org</email>
</author>
<published>2021-04-27T08:56:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/llvm.git/commit/?id=5112bd6b6e10b27b81aa83cfdbe3588973a6f1f5'/>
<id>5112bd6b6e10b27b81aa83cfdbe3588973a6f1f5</id>
<content type='text'>
The number of bytes copied in CopyAndPad should depend on the size of
the type being copied, not on its shift value (which in the case of char
is 0, leading to no bytes at all being copied).

Add unit tests for CharacterMin and CharacterMax, which exercise this
code path.

Differential Revision: https://reviews.llvm.org/D101355
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The number of bytes copied in CopyAndPad should depend on the size of
the type being copied, not on its shift value (which in the case of char
is 0, leading to no bytes at all being copied).

Add unit tests for CharacterMin and CharacterMax, which exercise this
code path.

Differential Revision: https://reviews.llvm.org/D101355
</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Remove interfaces for Character[Min|Max][Val|Loc]. NFC</title>
<updated>2021-04-28T07:58:06+00:00</updated>
<author>
<name>Diana Picus</name>
<email>diana.picus@linaro.org</email>
</author>
<published>2021-04-22T09:02:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/llvm.git/commit/?id=a58f362fb5dd61328fddd70f0e45451a760c3959'/>
<id>a58f362fb5dd61328fddd70f0e45451a760c3959</id>
<content type='text'>
MAXVAL, MINVAL, MAXLOC and MINLOC are already implemented in extrema.cpp
as MaxvalCharacter, MinvalDim etc. Therefore, the interfaces in
character.h are redundant and should be removed to avoid confusion.

Differential Revision: https://reviews.llvm.org/D101354
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
MAXVAL, MINVAL, MAXLOC and MINLOC are already implemented in extrema.cpp
as MaxvalCharacter, MinvalDim etc. Therefore, the interfaces in
character.h are redundant and should be removed to avoid confusion.

Differential Revision: https://reviews.llvm.org/D101354
</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>
<entry>
<title>[flang] Runtime: implement INDEX intrinsic function</title>
<updated>2021-03-15T21:19:13+00:00</updated>
<author>
<name>peter klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2021-03-12T21:40:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/llvm.git/commit/?id=6811b961000fea84b44a225162ffa6cd434e1d63'/>
<id>6811b961000fea84b44a225162ffa6cd434e1d63</id>
<content type='text'>
Implement INDEX in the runtime, reusing some infrastructure
(with generalization and renaming as needed) put into place
for its cousins SCAN and VERIFY.

I did not implement full Boyer-Moore substring searching
for the forward case, but did accelerate some advancement on
mismatches.

I (re)implemented unit testing for INDEX in the new gtest
framework, combining it with the tests that have recently
been ported to gtest for SCAN and VERIFY.

Differential Revision: https://reviews.llvm.org/D98553
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implement INDEX in the runtime, reusing some infrastructure
(with generalization and renaming as needed) put into place
for its cousins SCAN and VERIFY.

I did not implement full Boyer-Moore substring searching
for the forward case, but did accelerate some advancement on
mismatches.

I (re)implemented unit testing for INDEX in the new gtest
framework, combining it with the tests that have recently
been ported to gtest for SCAN and VERIFY.

Differential Revision: https://reviews.llvm.org/D98553
</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Runtime: SCAN and VERIFY</title>
<updated>2021-03-01T20:15:29+00:00</updated>
<author>
<name>peter klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2021-02-26T22:32:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/llvm.git/commit/?id=5a451a428904168a02483510235c66a4c82fdaab'/>
<id>5a451a428904168a02483510235c66a4c82fdaab</id>
<content type='text'>
Implement the related character intrinsic functions
SCAN and VERIFY.

Differential Revision: https://reviews.llvm.org/D97580
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implement the related character intrinsic functions
SCAN and VERIFY.

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