<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/clang/test/OpenMP/master_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] 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>[OpenMPIRBuilder] Remove ContinuationBB argument from Body callback.</title>
<updated>2022-04-26T21:35:01+00:00</updated>
<author>
<name>Michael Kruse</name>
<email>llvm-project@meinersbur.de</email>
</author>
<published>2022-04-26T18:35:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ff289feeba402a7cf68444e05e4ad2f1e5816767'/>
<id>ff289feeba402a7cf68444e05e4ad2f1e5816767</id>
<content type='text'>
The callback is expected to create a branch to the ContinuationBB (sometimes called FiniBB in some lambdas) argument when finishing. This creates problems:

 1. The InsertPoint used for CodeGenIP does not need to be the end of a block. If it is not, a naive callback will insert a branch instruction into the middle of the block.

 2. The BasicBlock the CodeGenIP is pointing to may or may not have a terminator. There is an conflict where to branch to if the block already has a terminator.

 3. Some API functions work only with block having a terminator. Some workarounds have been used to insert a temporary terminator that is removed again.

 4. Some callbacks are sensitive to whether the BasicBlock has a terminator or not. This creates a callback ordering problem where different callback may have different behaviour depending on whether a previous callback created a terminator or not. The problem also exists for FinalizeCallbackTy where some callbacks do create branch to another "continue" block, but unlike BodyGenCallbackTy does not receive the target as argument. This is not addressed in this patch.

With this patch, the callback receives an CodeGenIP into a BasicBlock where to insert instructions. If it has to insert control flow, it can split the block at that position as needed but otherwise no separate ContinuationBB is needed. In particular, a callback can be empty without breaking the emitted IR. If the caller needs the control flow to branch to a specific target, it can insert the branch instruction itself and pass an InsertPoint before the terminator to the callback.

Certain frontends such as Clang may expect the current IRBuilder position to be at the end of a basic block. In this case its callbacks must split the block at CodeGenIP before setting the IRBuilder position such that the instructions after CodeGenIP are moved to another basic block and before returning create a new branch instruction to the split block.

Some utility functions such as `splitBB` are supporting correct splitting of BasicBlocks, independent of whether they have a terminator or not, returning/setting the InsertPoint of an IRBuilder to the end of split predecessor block, and optionally omitting creating a branch to the split successor block to be added later.

Reviewed By: kiranchandramohan

Differential Revision: https://reviews.llvm.org/D118409
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The callback is expected to create a branch to the ContinuationBB (sometimes called FiniBB in some lambdas) argument when finishing. This creates problems:

 1. The InsertPoint used for CodeGenIP does not need to be the end of a block. If it is not, a naive callback will insert a branch instruction into the middle of the block.

 2. The BasicBlock the CodeGenIP is pointing to may or may not have a terminator. There is an conflict where to branch to if the block already has a terminator.

 3. Some API functions work only with block having a terminator. Some workarounds have been used to insert a temporary terminator that is removed again.

 4. Some callbacks are sensitive to whether the BasicBlock has a terminator or not. This creates a callback ordering problem where different callback may have different behaviour depending on whether a previous callback created a terminator or not. The problem also exists for FinalizeCallbackTy where some callbacks do create branch to another "continue" block, but unlike BodyGenCallbackTy does not receive the target as argument. This is not addressed in this patch.

With this patch, the callback receives an CodeGenIP into a BasicBlock where to insert instructions. If it has to insert control flow, it can split the block at that position as needed but otherwise no separate ContinuationBB is needed. In particular, a callback can be empty without breaking the emitted IR. If the caller needs the control flow to branch to a specific target, it can insert the branch instruction itself and pass an InsertPoint before the terminator to the callback.

Certain frontends such as Clang may expect the current IRBuilder position to be at the end of a basic block. In this case its callbacks must split the block at CodeGenIP before setting the IRBuilder position such that the instructions after CodeGenIP are moved to another basic block and before returning create a new branch instruction to the split block.

Some utility functions such as `splitBB` are supporting correct splitting of BasicBlocks, independent of whether they have a terminator or not, returning/setting the InsertPoint of an IRBuilder to the end of split predecessor block, and optionally omitting creating a branch to the split successor block to be added later.

Reviewed By: kiranchandramohan

Differential Revision: https://reviews.llvm.org/D118409
</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>Revert "[OpenMP] Use irbuilder as default for masked and master construct"</title>
<updated>2021-09-17T21:44:09+00:00</updated>
<author>
<name>cchen</name>
<email>chichun.chen@hpe.com</email>
</author>
<published>2021-09-17T21:44:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9ff848c5cd88947714f3d9bf03a3adbb84066736'/>
<id>9ff848c5cd88947714f3d9bf03a3adbb84066736</id>
<content type='text'>
This reverts commit 2908fc0d3f16f873b5019f1c62a24482c2b75e36.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 2908fc0d3f16f873b5019f1c62a24482c2b75e36.
</pre>
</div>
</content>
</entry>
<entry>
<title>[OpenMP] Use irbuilder as default for masked and master construct</title>
<updated>2021-09-17T20:54:11+00:00</updated>
<author>
<name>cchen</name>
<email>chichun.chen@hpe.com</email>
</author>
<published>2021-09-17T20:53:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2908fc0d3f16f873b5019f1c62a24482c2b75e36'/>
<id>2908fc0d3f16f873b5019f1c62a24482c2b75e36</id>
<content type='text'>
Use irbuilder as default and remove redundant Clang codegen for masked construct and master construct.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D100874
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use irbuilder as default and remove redundant Clang codegen for masked construct and master construct.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D100874
</pre>
</div>
</content>
</entry>
<entry>
<title>[OPENMP]Fix PR48571: critical/master in outlined contexts cause crash.</title>
<updated>2021-03-24T17:15:24+00:00</updated>
<author>
<name>Alexey Bataev</name>
<email>a.bataev@outlook.com</email>
</author>
<published>2021-03-24T16:24:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7654bb6303d290b19cad29137be810e69a0bf917'/>
<id>7654bb6303d290b19cad29137be810e69a0bf917</id>
<content type='text'>
If emit inlined region for master/critical directives, no need to clear
lambda/block context data, otherwise the variables cannot be found and
it causes a crash at compile time.

Differential Revision: https://reviews.llvm.org/D99280
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If emit inlined region for master/critical directives, no need to clear
lambda/block context data, otherwise the variables cannot be found and
it causes a crash at compile time.

Differential Revision: https://reviews.llvm.org/D99280
</pre>
</div>
</content>
</entry>
<entry>
<title>[CodeGen] Emit a call instruction instead of an invoke if the called</title>
<updated>2020-07-15T21:47:45+00:00</updated>
<author>
<name>Akira Hatanaka</name>
<email>ahatanaka@apple.com</email>
</author>
<published>2020-07-15T21:47:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ed6b578040a85977026c93bf4188f996148f3218'/>
<id>ed6b578040a85977026c93bf4188f996148f3218</id>
<content type='text'>
llvm function is marked nounwind

This fixes cases where an invoke is emitted, despite the called llvm
function being marked nounwind, because ConstructAttributeList failed to
add the attribute to the attribute list. llvm optimization passes turn
invokes into calls and optimize away the exception handling code, but
it's better to avoid emitting the code in the front-end if the called
function is known not to raise an exception.

Differential Revision: https://reviews.llvm.org/D83906
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
llvm function is marked nounwind

This fixes cases where an invoke is emitted, despite the called llvm
function being marked nounwind, because ConstructAttributeList failed to
add the attribute to the attribute list. llvm optimization passes turn
invokes into calls and optimize away the exception handling code, but
it's better to avoid emitting the code in the front-end if the called
function is known not to raise an exception.

Differential Revision: https://reviews.llvm.org/D83906
</pre>
</div>
</content>
</entry>
<entry>
<title>[OpenMP][OMPIRBuilder] Add Directives (master and critical) to OMPBuilder.</title>
<updated>2020-02-15T07:15:45+00:00</updated>
<author>
<name>Fady Ghanim</name>
<email>fghanim84@gmail.com</email>
</author>
<published>2020-02-15T06:42:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7438059a90326d4fe46377bf1833180333b48fff'/>
<id>7438059a90326d4fe46377bf1833180333b48fff</id>
<content type='text'>
Add support for Master and Critical directive in the OMPIRBuilder. Both make use of a new common interface for emitting inlined OMP regions called `emitInlinedRegion` which was added in this patch as well.

Also this patch modifies clang to use the new directives when  `-fopenmp-enable-irbuilder` commandline option is passed.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D72304
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add support for Master and Critical directive in the OMPIRBuilder. Both make use of a new common interface for emitting inlined OMP regions called `emitInlinedRegion` which was added in this patch as well.

Also this patch modifies clang to use the new directives when  `-fopenmp-enable-irbuilder` commandline option is passed.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D72304
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[OpenMP] Fix unused variable"</title>
<updated>2020-02-10T15:34:59+00:00</updated>
<author>
<name>Kadir Cetinkaya</name>
<email>kadircet@google.com</email>
</author>
<published>2020-02-10T13:44:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5731b6672ded5615f5489c892d7cdc9f4cf1836a'/>
<id>5731b6672ded5615f5489c892d7cdc9f4cf1836a</id>
<content type='text'>
This breaks under asan, see http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/38597/steps/check-clang%20asan/logs/stdio

This reverts commit bb5045429545f47a76980864322a637c31594c7f.

Revert "[FIX] Ordering problem accidentally introduced with D72304"

This reverts commit 08c0a06d8f375e48d4acebac886bfdf19a2276ed.

Revert "[OpenMP][OMPIRBuilder] Add Directives (master and critical) to OMPBuilder."

This reverts commit e8a436c5ea26f69378e4c1cf3ddb5b647b201e0f.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This breaks under asan, see http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/38597/steps/check-clang%20asan/logs/stdio

This reverts commit bb5045429545f47a76980864322a637c31594c7f.

Revert "[FIX] Ordering problem accidentally introduced with D72304"

This reverts commit 08c0a06d8f375e48d4acebac886bfdf19a2276ed.

Revert "[OpenMP][OMPIRBuilder] Add Directives (master and critical) to OMPBuilder."

This reverts commit e8a436c5ea26f69378e4c1cf3ddb5b647b201e0f.
</pre>
</div>
</content>
</entry>
<entry>
<title>[OpenMP][OMPIRBuilder] Add Directives (master and critical) to OMPBuilder.</title>
<updated>2020-02-09T00:55:48+00:00</updated>
<author>
<name>fady</name>
<email>fady@LAP118789.ornl.gov</email>
</author>
<published>2020-02-09T00:54:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e8a436c5ea26f69378e4c1cf3ddb5b647b201e0f'/>
<id>e8a436c5ea26f69378e4c1cf3ddb5b647b201e0f</id>
<content type='text'>
Add support for Master and Critical directive in the OMPIRBuilder. Both make use of a new common interface for emitting inlined OMP regions called `emitInlinedRegion` which was added in this patch as well.

Also this patch modifies clang to use the new directives when  `-fopenmp-enable-irbuilder` commandline option is passed.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D72304
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add support for Master and Critical directive in the OMPIRBuilder. Both make use of a new common interface for emitting inlined OMP regions called `emitInlinedRegion` which was added in this patch as well.

Also this patch modifies clang to use the new directives when  `-fopenmp-enable-irbuilder` commandline option is passed.

Reviewed By: jdoerfert

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