summaryrefslogtreecommitdiff
path: root/clang/test/OpenMP/nested_loop_codegen.cpp
AgeCommit message (Collapse)Author
2025-04-30[OMPIRBuilder] Don't discard the debug record from entry block. (#135161)Abid Qadeer
When we get a function back from `CodeExtractor`, we discard its entry block after coping its instructions into the entry block we prepared. While copying the instructions, the terminator is discarded for obvious reasons. But if there were some debug values attached to the terminator, those are useful and needs to be copied.
2025-03-07[mlir][OpenMP] fix crash outlining infinite loop (#129872)Tom Eccles
Previously an extra block was created by splitting the previous exit block. This produced incorrect results when the outlined region statically never terminated because then there wouldn't be a valid exit block for the outlined region, this caused this newly added block to have an incoming edge from outside of the outlining region, which caused outlining to fail. So far as I can tell this extra block no longer serves any purpose. The comment says it is supposed to collate multiple control flow edges into one place, but the code as it is now does not achieve this. In fact, as can be seen from the changes to lit tests, this block was not actually outlined in the end. This is because there are actually two code extractors: one in the callback for creating a parallel op which is used to find what the input/output variables are (which does have this block added to it), and another one which actually does the outlining (which this block was not added to). Tested with the gfortran and fujitsu test suites. Fixes #112884
2024-08-09[IRBuilder] Generate nuw GEPs for struct member accesses (#99538)Hari Limaye
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.
2024-06-18[Flang]Fix for changed code at the end of AllocaIP. (#92430)Mats Petersson
Some of the OpenMP code can change the instruction pointed at by the insertion point. This leads to an assert in the compiler about BB->getParent() and IP->getParent() not matching. The fix is to rebuild the insertionpoint from the block, rather than use builder.restoreIP. Also, move some of the alloca generation, rather than skipping back and forth between insert points (and ensure all the allocas are done before their users are created). A simple test, mainly to ensure the minimal reproducer doesn't fail to compile in the future is also added.
2024-06-14 [RemoveDIs] Print IR with debug records by default (#91724)Stephen Tozer
This patch makes the final major change of the RemoveDIs project, changing the default IR output from debug intrinsics to debug records. This is expected to break a large number of tests: every single one that tests for uses or declarations of debug intrinsics and does not explicitly disable writing records. If this patch has broken your downstream tests (or upstream tests on a configuration I wasn't able to run): 1. If you need to immediately unblock a build, pass `--write-experimental-debuginfo=false` to LLVM's option processing for all failing tests (remember to use `-mllvm` for clang/flang to forward arguments to LLVM). 2. For most test failures, the changes are trivial and mechanical, enough that they can be done by script; see the migration guide for a guide on how to do this: https://llvm.org/docs/RemoveDIsDebugInfo.html#test-updates 3. If any tests fail for reasons other than FileCheck check lines that need updating, such as assertion failures, that is most likely a real bug with this patch and should be reported as such. For more information, see the recent PSA: https://discourse.llvm.org/t/psa-ir-output-changing-from-debug-intrinsics-to-debug-records/79578
2023-08-23[OpenMP][NFC] Update clang OpenMP testsJohannes Doerfert
Just re-running the script to make future updates easier
2023-08-09[Clang][OpenMP] Support for Code Generation of loop bind clauseChi Chun Chen
Support for Code Generation of "#pragma loop bind" clause. 1) bind(parallel) 2) bind(teams) 3) bind(thread) Reviewed By: ABataev Differential Revision: https://reviews.llvm.org/D144634
2023-08-08Revert "[Clang][OpenMP] Support for Code Generation of loop bind clause."Nico Weber
This reverts commit 8e7f0320ad7fb760fff598aba4b2c86528c58c2d. As requested on https://reviews.llvm.org/rG8e7f0320ad7fb760f#1236457
2023-08-08[Clang][OpenMP] Support for Code Generation of loop bind clause.Sunil Kuravinakop
2023-08-07Revert "[Clang][OpenMP] Support for Code Generation of loop bind clause"Nico Weber
This reverts commit 4097a24584121dba562d471fab97d3dfec1b5bff. Breaks tests on macOS, see https://reviews.llvm.org/rG4097a2458412#1235854
2023-08-07[Clang][OpenMP] Support for Code Generation of loop bind clauseSunil Kuravinakop
2023-04-19[OpenMP] Prefix outlined and reduction func names with original func's nameItay Bookstein
This patch prefixes omp outlined helpers and reduction funcs with the original function's name. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D140722
2023-04-19Revert "[OpenMP] Prefix outlined and reduction func names with original ↵Itay Bookstein
func's name" This reverts commit 029bfc311d4d7d3cd90be81bb08c046848796d02.
2023-04-19[OpenMP] Prefix outlined and reduction func names with original func's nameItay Bookstein
This patch attempts to prefix omp outlined helpers and reduction funcs with the original function's name. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D140722
2023-03-17[Clang][OpenMP] Insert alloca for kernel args at function entry block ↵Dhruva Chakrabarti
instead of the launch point. If an inlined kernel is called in a loop, the launch point alloca would lead to increasing stack usage every time the kernel is invoked. This could make the application run out of stack space and crash. This problem is fixed by using the alloca insertion point while creating the alloca instruction. Fixes https://github.com/llvm/llvm-project/issues/60602 Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D145820
2023-01-20Allow a target loop to be used inside a parallel.Doru Bercea