<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/clang/test/OpenMP/scan_codegen.cpp, 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>[OpenMP] Update the default version of OpenMP to 5.1</title>
<updated>2023-06-15T07:11:09+00:00</updated>
<author>
<name>Animesh Kumar</name>
<email>animesh.kumar@amd.com</email>
</author>
<published>2023-06-06T10:46:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0c6f2f629cc0017361310fa4c132090413a874db'/>
<id>0c6f2f629cc0017361310fa4c132090413a874db</id>
<content type='text'>
The default version of OpenMP is updated from 5.0 to 5.1 which means if -fopenmp is specified but -fopenmp-version is not specified with clang, the default version of OpenMP is taken to be 5.1.  After modifying the Frontend for that, various LIT tests were updated. This patch contains all such changes. At a high level, these are the patterns of changes observed in LIT tests -

  # RUN lines which mentioned `-fopenmp-version=50` need to kept only if the IR for version 5.0 and 5.1 are different. Otherwise only one RUN line with no version info(i.e. default version) needs to be there.

  # Test cases of this sort already had the RUN lines with respect to the older default version 5.0 and the version 5.1. Only swapping the version specification flag `-fopenmp-version` from newer version RUN line to older version RUN line is required.

  # Diagnostics: Remove the 5.0 version specific RUN lines if there was no difference in the Diagnostics messages with respect to the default 5.1.

  # Diagnostics: In case there was any difference in diagnostics messages between 5.0 and 5.1, mention version specific messages in tests.

  # If the test contained version specific ifdef's e.g. "#ifdef OMP5" but there were no RUN lines for any other version than 5.X, then bring the code guarded by ifdef's outside and remove the ifdef's.

  # Some tests had RUN lines for both 5.0 and 5.1 versions, but it is found that the IR for 5.0 is not different from the 5.1, therefore such RUN lines are redundant. So, such duplicated lines are removed.

  # To generate CHECK lines automatically, use the script llvm/utils/update_cc_test_checks.py

Reviewed By: saiislam, ABataev

Differential Revision: https://reviews.llvm.org/D129635

(cherry picked from commit 9dd2999907dc791136a75238a6000f69bf67cf4e)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The default version of OpenMP is updated from 5.0 to 5.1 which means if -fopenmp is specified but -fopenmp-version is not specified with clang, the default version of OpenMP is taken to be 5.1.  After modifying the Frontend for that, various LIT tests were updated. This patch contains all such changes. At a high level, these are the patterns of changes observed in LIT tests -

  # RUN lines which mentioned `-fopenmp-version=50` need to kept only if the IR for version 5.0 and 5.1 are different. Otherwise only one RUN line with no version info(i.e. default version) needs to be there.

  # Test cases of this sort already had the RUN lines with respect to the older default version 5.0 and the version 5.1. Only swapping the version specification flag `-fopenmp-version` from newer version RUN line to older version RUN line is required.

  # Diagnostics: Remove the 5.0 version specific RUN lines if there was no difference in the Diagnostics messages with respect to the default 5.1.

  # Diagnostics: In case there was any difference in diagnostics messages between 5.0 and 5.1, mention version specific messages in tests.

  # If the test contained version specific ifdef's e.g. "#ifdef OMP5" but there were no RUN lines for any other version than 5.X, then bring the code guarded by ifdef's outside and remove the ifdef's.

  # Some tests had RUN lines for both 5.0 and 5.1 versions, but it is found that the IR for 5.0 is not different from the 5.1, therefore such RUN lines are redundant. So, such duplicated lines are removed.

  # To generate CHECK lines automatically, use the script llvm/utils/update_cc_test_checks.py

Reviewed By: saiislam, ABataev

Differential Revision: https://reviews.llvm.org/D129635

(cherry picked from commit 9dd2999907dc791136a75238a6000f69bf67cf4e)
</pre>
</div>
</content>
</entry>
<entry>
<title>OpenMP: Use inbounds in EmitOMPAggregateAssign</title>
<updated>2023-01-13T00:03:10+00:00</updated>
<author>
<name>Matt Arsenault</name>
<email>Matthew.Arsenault@amd.com</email>
</author>
<published>2023-01-12T01:34:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8efb8f776abf1cb66107c42b47e6a127828c4db0'/>
<id>8efb8f776abf1cb66107c42b47e6a127828c4db0</id>
<content type='text'>
This looked like a plausibly correct out of tree patch.
The changed testcases with the pragmas stripped out only use
inbounds GEPs so I assume this is correct.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This looked like a plausibly correct out of tree patch.
The changed testcases with the pragmas stripped out only use
inbounds GEPs so I assume this is correct.
</pre>
</div>
</content>
</entry>
<entry>
<title>[OpenMP] Convert tests to opaque pointers (NFC)</title>
<updated>2022-10-07T12:58:27+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2022-10-07T12:56:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a290f3c8fcad7a706c824e13a0983efd629ee542'/>
<id>a290f3c8fcad7a706c824e13a0983efd629ee542</id>
<content type='text'>
Conversion performed using the script at:
https://gist.github.com/nikic/98357b71fd67756b0f064c9517b62a34

These are only tests where no manual fixup was required.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Conversion performed using the script at:
https://gist.github.com/nikic/98357b71fd67756b0f064c9517b62a34

These are only tests where no manual fixup was required.
</pre>
</div>
</content>
</entry>
<entry>
<title>[OpaquePtrs][Clang] Add -no-opaque-pointers to tests (NFC)</title>
<updated>2022-04-07T10:09:47+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2022-04-07T10:03:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=532dc62b907554b3f07f17205674aa71e76fc863'/>
<id>532dc62b907554b3f07f17205674aa71e76fc863</id>
<content type='text'>
This adds -no-opaque-pointers to clang tests whose output will
change when opaque pointers are enabled by default. This is
intended to be part of the migration approach described in
https://discourse.llvm.org/t/enabling-opaque-pointers-by-default/61322/9.

The patch has been produced by replacing %clang_cc1 with
%clang_cc1 -no-opaque-pointers for tests that fail with opaque
pointers enabled. Worth noting that this doesn't cover all tests,
there's a remaining ~40 tests not using %clang_cc1 that will need
a followup change.

Differential Revision: https://reviews.llvm.org/D123115
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds -no-opaque-pointers to clang tests whose output will
change when opaque pointers are enabled by default. This is
intended to be part of the migration approach described in
https://discourse.llvm.org/t/enabling-opaque-pointers-by-default/61322/9.

The patch has been produced by replacing %clang_cc1 with
%clang_cc1 -no-opaque-pointers for tests that fail with opaque
pointers enabled. Worth noting that this doesn't cover all tests,
there's a remaining ~40 tests not using %clang_cc1 that will need
a followup change.

Differential Revision: https://reviews.llvm.org/D123115
</pre>
</div>
</content>
</entry>
<entry>
<title>[CodeGen] Apply 'nonnull' and 'dereferenceable(N)' to 'this' pointer</title>
<updated>2020-11-17T01:39:17+00:00</updated>
<author>
<name>CJ Johnson</name>
<email>johnsoncj@google.com</email>
</author>
<published>2020-11-16T23:04:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=69cd776e1ee79e72ccbdad30749eac04579715ee'/>
<id>69cd776e1ee79e72ccbdad30749eac04579715ee</id>
<content type='text'>
arguments.

* Adds 'nonnull' and 'dereferenceable(N)' to 'this' pointer arguments
* Gates 'nonnull' on -f(no-)delete-null-pointer-checks
* Introduces this-nonnull.cpp and microsoft-abi-this-nullable.cpp tests to
  explicitly test the behavior of this change
* Refactors hundreds of over-constrained clang tests to permit these
  attributes, where needed
* Updates Clang12 patch notes mentioning this change

Reviewed-by: rsmith, jdoerfert

Differential Revision: https://reviews.llvm.org/D17993
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
arguments.

* Adds 'nonnull' and 'dereferenceable(N)' to 'this' pointer arguments
* Gates 'nonnull' on -f(no-)delete-null-pointer-checks
* Introduces this-nonnull.cpp and microsoft-abi-this-nullable.cpp tests to
  explicitly test the behavior of this change
* Refactors hundreds of over-constrained clang tests to permit these
  attributes, where needed
* Updates Clang12 patch notes mentioning this change

Reviewed-by: rsmith, jdoerfert

Differential Revision: https://reviews.llvm.org/D17993
</pre>
</div>
</content>
</entry>
<entry>
<title>[OPENMP50]Codegen for scan directive in simd loops.</title>
<updated>2020-06-11T18:48:43+00:00</updated>
<author>
<name>Alexey Bataev</name>
<email>a.bataev@hotmail.com</email>
</author>
<published>2020-06-11T15:28:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=43101d10dbd58d48df732f974e078fd82376039e'/>
<id>43101d10dbd58d48df732f974e078fd82376039e</id>
<content type='text'>
Added codegen for scan directives in simd loop. The codegen transforms
original code:
```
int x = 0;
 #pragma omp simd reduction(inscan, +: x)
for (..) {
  &lt;first part&gt;
  #pragma omp scan inclusive(x)
  &lt;second part&gt;
}
```
into
```
int x = 0;
for (..) {
  int x_priv = 0;
  &lt;first part&gt;
  x = x_priv + x;
  x_priv = x;
  &lt;second part&gt;
}
```
and
```
int x = 0;
 #pragma omp simd reduction(inscan, +: x)
for (..) {
  &lt;first part&gt;
  #pragma omp scan exclusive(x)
  &lt;second part&gt;
}
```
into
```
int x = 0;
for (..) {
  int x_priv = 0;
  &lt;second part&gt;
  int temp = x;
  x = x_priv + x;
  x_priv = temp;
  &lt;first part&gt;
}
```

Differential revision: https://reviews.llvm.org/D78232
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Added codegen for scan directives in simd loop. The codegen transforms
original code:
```
int x = 0;
 #pragma omp simd reduction(inscan, +: x)
for (..) {
  &lt;first part&gt;
  #pragma omp scan inclusive(x)
  &lt;second part&gt;
}
```
into
```
int x = 0;
for (..) {
  int x_priv = 0;
  &lt;first part&gt;
  x = x_priv + x;
  x_priv = x;
  &lt;second part&gt;
}
```
and
```
int x = 0;
 #pragma omp simd reduction(inscan, +: x)
for (..) {
  &lt;first part&gt;
  #pragma omp scan exclusive(x)
  &lt;second part&gt;
}
```
into
```
int x = 0;
for (..) {
  int x_priv = 0;
  &lt;second part&gt;
  int temp = x;
  x = x_priv + x;
  x_priv = temp;
  &lt;first part&gt;
}
```

Differential revision: https://reviews.llvm.org/D78232
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[OPENMP50]Codegen for scan directive in simd loops."</title>
<updated>2020-06-11T15:22:51+00:00</updated>
<author>
<name>Alexey Bataev</name>
<email>a.bataev@hotmail.com</email>
</author>
<published>2020-06-11T15:22:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fac7259c81671c37140374f3e6ec1fc7472c677c'/>
<id>fac7259c81671c37140374f3e6ec1fc7472c677c</id>
<content type='text'>
This reverts commit fb80e67f10eea7177b0ff9c618c8231363b6f2fc to resolve
the issue with asan buildbots.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit fb80e67f10eea7177b0ff9c618c8231363b6f2fc to resolve
the issue with asan buildbots.
</pre>
</div>
</content>
</entry>
<entry>
<title>[OPENMP50]Codegen for scan directive in simd loops.</title>
<updated>2020-06-11T13:01:23+00:00</updated>
<author>
<name>Alexey Bataev</name>
<email>a.bataev@hotmail.com</email>
</author>
<published>2020-06-05T19:17:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fb80e67f10eea7177b0ff9c618c8231363b6f2fc'/>
<id>fb80e67f10eea7177b0ff9c618c8231363b6f2fc</id>
<content type='text'>
Added codegen for scandirectives in simd loop. The codegen transforms
original code:

```
int x = 0;
 #pragma omp simd reduction(inscan, +: x)
for (..) {
  &lt;first part&gt;
  #pragma omp scan inclusive(x)
  &lt;second part&gt;
}
```
into
```
int x = 0;
for (..) {
  int x_priv = 0;
  &lt;first part&gt;
  x = x_priv + x;
  x_priv = x;
  &lt;second part&gt;
}
```
and
```
int x = 0;
 #pragma omp simd reduction(inscan, +: x)
for (..) {
  &lt;first part&gt;
  #pragma omp scan exclusive(x)
  &lt;second part&gt;
}
```
into
```
int x = 0;
for (..) {
  int x_priv = 0;
  &lt;second part&gt;
  int temp = x;
  x = x_priv + x;
  x_priv = temp;
  &lt;first part&gt;
}
```

Differential revision: https://reviews.llvm.org/D78232
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Added codegen for scandirectives in simd loop. The codegen transforms
original code:

```
int x = 0;
 #pragma omp simd reduction(inscan, +: x)
for (..) {
  &lt;first part&gt;
  #pragma omp scan inclusive(x)
  &lt;second part&gt;
}
```
into
```
int x = 0;
for (..) {
  int x_priv = 0;
  &lt;first part&gt;
  x = x_priv + x;
  x_priv = x;
  &lt;second part&gt;
}
```
and
```
int x = 0;
 #pragma omp simd reduction(inscan, +: x)
for (..) {
  &lt;first part&gt;
  #pragma omp scan exclusive(x)
  &lt;second part&gt;
}
```
into
```
int x = 0;
for (..) {
  int x_priv = 0;
  &lt;second part&gt;
  int temp = x;
  x = x_priv + x;
  x_priv = temp;
  &lt;first part&gt;
}
```

Differential revision: https://reviews.llvm.org/D78232
</pre>
</div>
</content>
</entry>
</feed>
