Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4 |
|
#
44a6b3a4 |
| 11-Nov-2024 |
CHANDRA GHALE <chandra.nitdgp@gmail.com> |
Fix for codegen Crash in Clang when using locator omp_all_memory with depobj construct (#114221)
A codegen crash is occurring when a depend object was initialized with
omp_all_memory in the depobj
Fix for codegen Crash in Clang when using locator omp_all_memory with depobj construct (#114221)
A codegen crash is occurring when a depend object was initialized with
omp_all_memory in the depobj directive.
https://github.com/llvm/llvm-project/issues/114214(url)
The root cause of issue looks to be the improper handling of the
dependency list when omp_all_memory was specified.
The change introduces the use of OMPTaskDataTy to manage dependencies.
The buildDependences function is called to construct the dependency
list, and the list is iterated over to emit and store the dependencies.
Reduced Test Case :
```
#include <omp.h>
int main()
{ omp_depend_t obj; #pragma omp depobj(obj) depend(inout: omp_all_memory) }
```
```
#1 0x0000000003de6623 SignalHandler(int) Signals.cpp:0:0
#2 0x00007f8e4a6b990f (/lib64/libpthread.so.0+0x1690f)
#3 0x00007f8e4a117d2a raise (/lib64/libc.so.6+0x4ad2a)
#4 0x00007f8e4a1193e4 abort (/lib64/libc.so.6+0x4c3e4)
#5 0x00007f8e4a10fc69 __assert_fail_base (/lib64/libc.so.6+0x42c69)
#6 0x00007f8e4a10fcf1 __assert_fail (/lib64/libc.so.6+0x42cf1)
#7 0x0000000004114367 clang::CodeGen::CodeGenFunction::EmitOMPDepobjDirective(clang::OMPDepobjDirective const&) (/opt/cray/pe/cce/18.0.1/cce-clang/x86_64/bin/clang-18+0x4114367)
#8 0x00000000040f8fac clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*, llvm::ArrayRef<clang::Attr const*>) (/opt/cray/pe/cce/18.0.1/cce-clang/x86_64/bin/clang-18+0x40f8fac)
#9 0x00000000040ff4fb clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) (/opt/cray/pe/cce/18.0.1/cce-clang/x86_64/bin/clang-18+0x40ff4fb)
#10 0x00000000041847b2 clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::Stmt const*) (/opt/cray/pe/cce/18.0.1/cce-clang/x86_64/bin/clang-18+0x41847b2)
#11 0x0000000004199e4a clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl, llvm::Function*, clang::CodeGen::CGFunctionInfo const&) (/opt/cray/pe/cce/18.0.1/cce-clang/x86_64/bin/clang-18+0x4199e4a)
#12 0x00000000041f7b9d clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/opt/cray/pe/cce/18.0.1/cce-clang/x86_64/bin/clang-18+0x41f7b9d)
#13 0x00000000041f16a3 clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/opt/cray/pe/cce/18.0.1/cce-clang/x86_64/bin/clang-18+0x41f16a3)
#14 0x00000000041fd954 clang::CodeGen::CodeGenModule::EmitDeferred() (/opt/cray/pe/cce/18.0.1/cce-clang/x86_64/bin/clang-18+0x41fd954)
#15 0x0000000004200277 clang::CodeGen::CodeGenModule::Release() (/opt/cray/pe/cce/18.0.1/cce-clang/x86_64/bin/clang-18+0x4200277)
#16 0x00000000046b6a49 (anonymous namespace)::CodeGeneratorImpl::HandleTranslationUnit(clang::ASTContext&) ModuleBuilder.cpp:0:0
#17 0x00000000046b4cb6 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/opt/cray/pe/cce/18.0.1/cce-clang/x86_64/bin/clang-18+0x46b4cb6)
#18 0x0000000006204d5c clang::ParseAST(clang::Sema&, bool, bool) (/opt/cray/pe/cce/18.0.1/cce-clang/x86_64/bin/clang-18+0x6204d5c)
#19 0x000000000496b278 clang::FrontendAction::Execute() (/opt/cray/pe/cce/18.0.1/cce-clang/x86_64/bin/clang-18+0x496b278)
#20 0x00000000048dd074 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/cray/pe/cce/18.0.1/cce-clang/x86_64/bin/clang-18+0x48dd074)
#21 0x0000000004a38092 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/cray/pe/cce/18.0.1/cce-clang/x86_64/bin/clang-18+0x4a38092)
#22 0x0000000000fd4e9c cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/cray/pe/cce/18.0.1/cce-clang/x86_64/bin/clang-18+0xfd4e9c)
#23 0x0000000000fcca73 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#24 0x0000000000fd140c clang_main(int, char**, llvm::ToolContext const&) (/opt/cray/pe/cce/18.0.1/cce-clang/x86_64/bin/clang-18+0xfd140c)
#25 0x0000000000ee2ef3 main (/opt/cray/pe/cce/18.0.1/cce-clang/x86_64/bin/clang-18+0xee2ef3)
#26 0x00007f8e4a10224c __libc_start_main (/lib64/libc.so.6+0x3524c)
#27 0x0000000000fcaae9 _start /home/abuild/rpmbuild/BUILD/glibc-2.31/csu/../sysdeps/x86_64/start.S:120:0
clang: error: unable to execute command: Aborted
```
---------
Co-authored-by: Chandra Ghale <ghale@pe31.hpc.amslabs.hpecorp.net>
show more ...
|
Revision tags: llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3 |
|
#
94473f4d |
| 09-Aug-2024 |
Hari Limaye <hari.limaye@arm.com> |
[IRBuilder] Generate nuw GEPs for struct member accesses (#99538)
Generate nuw GEPs for struct member accesses, as inbounds + non-negative
implies nuw.
Regression tests are updated using update
[IRBuilder] Generate nuw GEPs for struct member accesses (#99538)
Generate nuw GEPs for struct member accesses, as inbounds + non-negative
implies nuw.
Regression tests are updated using update scripts where possible, and by
find + replace where not.
show more ...
|
Revision tags: llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4 |
|
#
8ea39c06 |
| 14-May-2023 |
Sergei Barannikov <barannikov88@gmail.com> |
[clang] Convert a few OpenMP tests to use opaque pointers
Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D150530
|
Revision tags: llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4 |
|
#
239094cd |
| 24-May-2022 |
Mike Rice <michael.p.rice@intel.com> |
[OpenMP] Add codegen for 'omp_all_memory' reserved locator.
This creates an entry with address=nullptr and flag=0x80. When an 'omp_all_memory' entry is specified any other 'out' or 'inout' entries a
[OpenMP] Add codegen for 'omp_all_memory' reserved locator.
This creates an entry with address=nullptr and flag=0x80. When an 'omp_all_memory' entry is specified any other 'out' or 'inout' entries are not needed and are not passed to the runtime.
Differential Revision: https://reviews.llvm.org/D126321
show more ...
|
Revision tags: llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1 |
|
#
532dc62b |
| 07-Apr-2022 |
Nikita Popov <npopov@redhat.com> |
[OpaquePtrs][Clang] Add -no-opaque-pointers to tests (NFC)
This adds -no-opaque-pointers to clang tests whose output will change when opaque pointers are enabled by default. This is intended to be p
[OpaquePtrs][Clang] Add -no-opaque-pointers to tests (NFC)
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
show more ...
|
#
aaf2bccf |
| 23-Mar-2022 |
Nikita Popov <npopov@redhat.com> |
[CodeGen][OpenMP] Add alignment to test (NFC)
Check which alignments are generated for loads/stores.
|
#
47eb4f7d |
| 23-Mar-2022 |
Nikita Popov <npopov@redhat.com> |
[CGOpenMPRuntime] Specify correct type in EmitLoadOfPointerLValue()
Perform a bitcast first, so we can specify the correct pointer type inf EmitLoadOfPointerLValue(), rather than using a dummy void
[CGOpenMPRuntime] Specify correct type in EmitLoadOfPointerLValue()
Perform a bitcast first, so we can specify the correct pointer type inf EmitLoadOfPointerLValue(), rather than using a dummy void pointer.
show more ...
|
Revision tags: llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2 |
|
#
9ce2e5e7 |
| 09-Jun-2021 |
AndreyChurbanov <andrey.churbanov@intel.com> |
Revert "[OpenMP] libomp: implement OpenMP 5.1 inoutset task dependence type"
This reverts commit a1f550e052543f75acac9089b760cbc61729131f.
Revert in order to fix backwards compatibility breakage ca
Revert "[OpenMP] libomp: implement OpenMP 5.1 inoutset task dependence type"
This reverts commit a1f550e052543f75acac9089b760cbc61729131f.
Revert in order to fix backwards compatibility breakage caused by type size change for task dependence flag.
show more ...
|
#
a1f550e0 |
| 07-Jun-2021 |
AndreyChurbanov <andrey.churbanov@intel.com> |
[OpenMP] libomp: implement OpenMP 5.1 inoutset task dependence type
Refactored code of dependence processing and added new inoutset dependence type. Compiler can set dependence flag to 0x8 when call
[OpenMP] libomp: implement OpenMP 5.1 inoutset task dependence type
Refactored code of dependence processing and added new inoutset dependence type. Compiler can set dependence flag to 0x8 when call __kmpc_omp_task_with_deps. Size of type of the dependence flag changed from 1 to 4 bytes in clang. All dependence flags library gets so far and corresponding dependence types: 1 - IN, 2 - OUT, 3 - INOUT, 4 - MUTEXINOUTSET, 8 - INOUTSET.
Differential Revision: https://reviews.llvm.org/D97085
show more ...
|
Revision tags: llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1, llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3 |
|
#
ff260ad0 |
| 27-Aug-2020 |
Saiyedul Islam <Saiyedul.Islam@amd.com> |
[OpenMP] Ensure testing for versions 4.5 and default - Part 3
This third patch in the series removes version 5.0 string from test cases making them check for default version. It also add test cases
[OpenMP] Ensure testing for versions 4.5 and default - Part 3
This third patch in the series removes version 5.0 string from test cases making them check for default version. It also add test cases for version 4.5.
Reviewed By: ABataev
Differential Revision: https://reviews.llvm.org/D85214
show more ...
|
Revision tags: llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2, llvmorg-10.0.1-rc1 |
|
#
be99c615 |
| 06-Apr-2020 |
Alexey Bataev <a.bataev@hotmail.com> |
[OPENMP50]Codegen for iterator construct.
Implemented codegen for the iterator expression in the depend clauses. Iterator construct is emitted the following way: iterator(cnt1, cnt2, ...), in : <dep
[OPENMP50]Codegen for iterator construct.
Implemented codegen for the iterator expression in the depend clauses. Iterator construct is emitted the following way: iterator(cnt1, cnt2, ...), in : <dep>
<TotalNumDeps> = <cnt1_size> * <cnt2_size> * ...; kmp_depend_t deps[<TotalNumDeps>]; deps_counter = 0; for (cnt1) { for (cnt2) { ... deps[deps_counter].base_addr = &<dep>; deps[deps_counter].size = sizeof(<dep>); deps[deps_counter].flags = in; deps_counter += 1; ... } }
For depobj construct the codegen is very similar, but the memory is allocated dynamically and added extra first item reserved for internal use.
show more ...
|
#
e094dd5a |
| 31-Mar-2020 |
Alexey Bataev <a.bataev@hotmail.com> |
[OPENMP50]Fix size calculation for array shaping expression in the codegen.
Need to include the size of the pointee type when trying to calculate the total size of the array shaping expression.
|
#
7842e7eb |
| 30-Mar-2020 |
Alexey Bataev <a.bataev@hotmail.com> |
[OPENMP50]Add codegen support for array shaping expression in depend clauses.
Implemented codegen for array shaping operation in depend clauses. The begin of the expression is the pointer itself, wh
[OPENMP50]Add codegen support for array shaping expression in depend clauses.
Implemented codegen for array shaping operation in depend clauses. The begin of the expression is the pointer itself, while the size of the dependence data is the mukltiplacation of all dimensions in the array shaping expression.
show more ...
|
Revision tags: llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4 |
|
#
5dadf577 |
| 06-Mar-2020 |
Alexey Bataev <a.bataev@hotmail.com> |
[OPENMP50]Add 'depobj' modifier in 'depend' clauses.
Added basic support (parsing/sema/serialization) for depobj dependency kind in depend clauses.
|
#
8d7b1188 |
| 05-Mar-2020 |
Alexey Bataev <a.bataev@hotmail.com> |
[OPENMP50]Add codegen for update clause in depobj directive.
Added codegen for update clause in depobj. Reads the number of the elements from the first element and updates flags for each element in
[OPENMP50]Add codegen for update clause in depobj directive.
Added codegen for update clause in depobj. Reads the number of the elements from the first element and updates flags for each element in the loop. ``` omp_depend_t x; kmp_depend_info *base = (kmp_depend_info *)x; intptr_t num = x[-1].base_addr; kmp_depend_info *end = x + num; kmp_depend_info *el = base; do { el.flags = new_flag; el = &el[1]; } while (el != end); ```
show more ...
|
#
ea5b3ef5 |
| 05-Mar-2020 |
Alexey Bataev <a.bataev@hotmail.com> |
[OPENMP50]Skip the first element when storing the list of dependencies in depobj object.
The first element in the list of the dependencies is used for internal purposes to store the number of the el
[OPENMP50]Skip the first element when storing the list of dependencies in depobj object.
The first element in the list of the dependencies is used for internal purposes to store the number of the elements in the provided list. The first element now is skipped and depobj object poits exactly to the list of dependencies.
show more ...
|
#
b27ff4d0 |
| 04-Mar-2020 |
Alexey Bataev <a.bataev@hotmail.com> |
[OPENMP50]Codegen for 'destroy' clause in depobj directive.
If the destroy clause is appplied, the previously allocated memory for the dependency object must be destroyed.
|
#
e46f0fee |
| 04-Mar-2020 |
Alexey Bataev <a.bataev@hotmail.com> |
[OPENMP50]Codegen for 'depend' clause in depobj directive.
Added codegen for 'depend' clause in depobj directive. The depend clause is emitted as kmp_depend_info <deps>[<number_of_items_in_clause> +
[OPENMP50]Codegen for 'depend' clause in depobj directive.
Added codegen for 'depend' clause in depobj directive. The depend clause is emitted as kmp_depend_info <deps>[<number_of_items_in_clause> + 1]. The first element in this array is reserved for storing the number of elements in this array: <deps>[0].base_addr = <number_of_items_in_clause>;
This extra element is required to implement 'update' and 'destroy' clauses. It is required to know the size of array to destroy it correctly and to update depency kind.
show more ...
|