summaryrefslogtreecommitdiff
path: root/clang/test/OpenMP/parallel_for_simd_codegen.cpp
AgeCommit message (Collapse)Author
2025-05-26[Clang][CodeGen] Add metadata for load from reference (#98746)Yingwei Zheng
This patch adds `!nonnull/!align` for load from reference to improve codegen.
2023-05-17[clang] Convert remaining OpenMP tests to opaque pointersSergei Barannikov
Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D150733
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
2022-09-13[OpenMP] Extend lit test for parallel for simd constructAnimesh Kumar
This construct is being tested for atomic operation based upon the test 5.0/parallel_for_simd/test_parallel_for_simd_atomic.c from the SOLLVE repo: https://github.com/SOLLVE/sollve_vv Differential Revision: https://reviews.llvm.org/D132643
2022-04-07[OpaquePtrs][Clang] Add -no-opaque-pointers to tests (NFC)Nikita Popov
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
2022-01-16[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and ↵hyeongyu kim
turn it off by default Turning on `enable_noundef_analysis` flag allows better codegen by removing freeze instructions. I modified clang by renaming `enable_noundef_analysis` flag to `disable-noundef-analysis` and turning it off by default. Test updates are made as a separate patch: D108453 Reviewed By: eugenis Differential Revision: https://reviews.llvm.org/D105169
2021-12-02[OPENMP]Fix PR50733: unexpected final value of list-item in linear clause in ↵Alexey Bataev
loop construct. Currently the last value of linear is calculated as var = init + num_iters * step. Replaced it with var = var_priv, i.e. original variable gets the value of the last private copy. Differential Revision: https://reviews.llvm.org/D105151
2021-11-09Revert "[Clang/Test]: Rename enable_noundef_analysis to ↵hyeongyu kim
disable-noundef-analysis and turn it off by default" This reverts commit aacfbb953eb705af2ecfeb95a6262818fa85dd92. Revert "Fix lit test failures in CodeGenCoroutines" This reverts commit 63fff0f5bffe20fa2c84a45a41161afa0043cb34.
2021-11-06[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and ↵hyeongyukim
turn it off by default Turning on `enable_noundef_analysis` flag allows better codegen by removing freeze instructions. I modified clang by renaming `enable_noundef_analysis` flag to `disable-noundef-analysis` and turning it off by default. Test updates are made as a separate patch: D108453 Reviewed By: eugenis Differential Revision: https://reviews.llvm.org/D105169 [Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default (2) This patch updates test files after D105169. Autogenerated test codes are changed by `utils/update_cc_test_checks.py,` and non-autogenerated test codes are changed as follows: (1) I wrote a python script that (partially) updates the tests using regex: {F18594904} The script is not perfect, but I believe it gives hints about which patterns are updated to have `noundef` attached. (2) The remaining tests are updated manually. Reviewed By: eugenis Differential Revision: https://reviews.llvm.org/D108453 Resolve lit failures in clang after 8ca4b3e's land Fix lit test failures in clang-ppc* and clang-x64-windows-msvc Fix missing failures in clang-ppc64be* and retry fixing clang-x64-windows-msvc Fix internal_clone(aarch64) inline assembly
2021-11-06Revert "[Clang/Test]: Rename enable_noundef_analysis to ↵Juneyoung Lee
disable-noundef-analysis and turn it off by default" This reverts commit 7584ef766a7219b6ee5a400637206d26e0fa98ac.
2021-11-06[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and ↵Juneyoung Lee
turn it off by default Turning on `enable_noundef_analysis` flag allows better codegen by removing freeze instructions. I modified clang by renaming `enable_noundef_analysis` flag to `disable-noundef-analysis` and turning it off by default. Test updates are made as a separate patch: D108453 Reviewed By: eugenis Differential Revision: https://reviews.llvm.org/D105169
2021-10-18Revert D105169 due to the two-stage failure in ASANJuneyoung Lee
This reverts the following commits: 37ca7a795b277c20c02a218bf44052278c03344b 9aa6c72b92b6c89cc6d23b693257df9af7de2d15 705387c5074bcca36d626882462ebbc2bcc3bed4 8ca4b3ef19fe82d7ad6a6e1515317dcc01b41515 80dba72a669b5416e97a42fd2c2a7bc5a6d3f44a
2021-10-16[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and ↵Juneyoung Lee
turn it off by default (2) This patch updates test files after D105169. Autogenerated test codes are changed by `utils/update_cc_test_checks.py,` and non-autogenerated test codes are changed as follows: (1) I wrote a python script that (partially) updates the tests using regex: {F18594904} The script is not perfect, but I believe it gives hints about which patterns are updated to have `noundef` attached. (2) The remaining tests are updated manually. Reviewed By: eugenis Differential Revision: https://reviews.llvm.org/D108453
2021-06-22[Clang][OpenMP] Monotonic does not apply to SIMDGraham Hunter
The codegen for simd constructs was affected by the presence (or absence) of the 'monotonic' schedule modifier for worksharing loops. The modifier is only intended to apply to the scheduling of chunks for a thread, not iterations of a loop inside a chunk. In addition, the monotonic modifier was applied to worksharing loops by default if no schedule clause was present; the referenced part of the OpenMP 4.5 spec in the code (section 2.7.1) only applies if the user specified a schedule clause with a static kind but no modifier. Without a user-specified schedule clause we should default to nonmonotonic scheduling. Reviewed By: ABataev Differential Revision: https://reviews.llvm.org/D103793
2020-08-27[OpenMP] Ensure testing for versions 4.5 and default - Part 3Saiyedul Islam
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
2020-07-15[CodeGen] Emit a call instruction instead of an invoke if the calledAkira Hatanaka
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
2020-06-25[OpenMP] Upgrade default version of OpenMP to 5.0Saiyedul Islam
Summary: When -fopenmp option is specified then version 5.0 will be set as default. Reviewers: gregrodgers, jdoerfert, ABataev Reviewed By: ABataev Subscribers: pdhaliwal, yaxunl, guansong, sstefan1, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D81098
2019-11-27[OPENMP50]Add if clause in parallel for simd directive.Alexey Bataev
According to OpenMP 5.0, if clause can be used in parallel for simd directive. If condition in the if clause if false, the non-vectorized version of the loop must be executed.
2019-01-09[OpenMP] Avoid remainder operations for loop index values on a collapsed ↵Gheorghe-Teodor Bercea
loop nest. Summary: Change the strategy for computing loop index variables after collapsing a loop nest via the collapse clause by replacing the expensive remainder operation with multiplications and additions. Reviewers: ABataev, caomhin Reviewed By: ABataev Subscribers: guansong, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D56413 llvm-svn: 350759
2018-12-20[CodeGen] Generate llvm.loop.parallel_accesses instead of ↵Michael Kruse
llvm.mem.parallel_loop_access metadata. Instead of generating llvm.mem.parallel_loop_access metadata, generate llvm.access.group on instructions and llvm.loop.parallel_accesses on loops. There is one access group per generated loop. This is clang part of D52116/r349725. Differential Revision: https://reviews.llvm.org/D52117 llvm-svn: 349823
2018-04-16[OPENMP] General code improvements.Alexey Bataev
llvm-svn: 330140
2018-01-23[OPENMP] Remove more empty SourceLocations() from the code.Alexey Bataev
Removed more empty SourceLocations() from the OpenMP code and replaced with the correct locations for better debug info emission. llvm-svn: 323232
2017-12-29[OPENMP] Support for -fopenmp-simd option with compilation of simd loopsAlexey Bataev
only. Added support for -fopenmp-simd option that allows compilation of simd-based constructs without emission of OpenMP runtime calls. llvm-svn: 321560
2017-11-02[OPENMP] Fix PR35156: Get correct thread id with windows exceptions.Alexey Bataev
If the thread id is requested in windows mode within funclets, we may generate incorrect function call that could lead to broken codegen. llvm-svn: 317208
2017-08-16[OPRNMP] Fix for PR33445: ICE: OpenMP target containing ordered for.Alexey Bataev
If exceptions are enabled, there may be a problem with the codegen of the finalization functions from OpenMP runtime. It happens because of the problem with the getting of thread identifier value. Patch tries to fix it by using the result of the call of function __kmpc_global_thread_num() rather than loading of value of outlined function parameter. llvm-svn: 311007
2017-08-09[OPENMP] Emit non-debug version of outlined functions with originalAlexey Bataev
name. If the host code is compiled with the debug info, while the target without, there is a problem that the compiler is unable to find the debug wrapper. Patch fixes this problem by emitting special name for the debug version of the code. llvm-svn: 310511
2016-10-21Remove unnecessary x86 backend requirements from OpenMP testsReid Kleckner
Clang can generate LLVM IR for x86 without a registered x86 backend. llvm-svn: 284836
2016-07-29Change a test to be less prone to random failures due toWolfgang Pieb
unintended matches of label numbers to debug metadata handles in release builds. llvm-svn: 277094
2015-12-31[OPENMP 4.5] Codegen for 'schedule' clause with monotonic/nonmonotonic ↵Alexey Bataev
modifiers. OpenMP 4.5 adds support for monotonic/nonmonotonic modifiers in 'schedule' clause. Add codegen for these modifiers. llvm-svn: 256666
2015-12-18[OPENMP] Remove explicit call for implicit barrierAlexey Bataev
#pragma omp parallel needs an implicit barrier that is currently done by an explicit call to __kmpc_barrier. However, the runtime already ensures a barrier in __kmpc_fork_call which currently leads to two barriers per region per thread. Differential Revision: http://reviews.llvm.org/D15561 llvm-svn: 255992
2015-10-08Stop messing with the 'g' group of options in CompilerInvocation.Douglas Katzman
With this change, most 'g' options are rejected by CompilerInvocation. They remain only as Driver options. The new way to request debug info from cc1 is with "-debug-info-kind={line-tables-only|limited|standalone}" and "-dwarf-version={2|3|4}". In the absence of a command-line option to specify Dwarf version, the Toolchain decides it, rather than placing Toolchain-specific logic in CompilerInvocation. Also fix a bug in the Windows compatibility argument parsing in which the "rightmost argument wins" principle failed. Differential Revision: http://reviews.llvm.org/D13221 llvm-svn: 249655
2015-09-10[OPENMP] Outlined function for parallel and other regions with list of ↵Alexey Bataev
captured variables. Currently all variables used in OpenMP regions are captured into a record and passed to outlined functions in this record. It may result in some poor performance because of too complex analysis later in optimization passes. Patch makes to emit outlined functions for parallel-based regions with a list of captured variables. It reduces code for 2*n GEPs, stores and loads at least. Codegen for task-based regions remains unchanged because runtime requires that all captured variables are passed in captured record. llvm-svn: 247251
2015-07-08Revert "Revert r241620 and follow-up commits" and move the initializationAdrian Prantl
of the llvm targets from clang/CodeGen into ClangCheck.cpp and CIndex.cpp. llvm-svn: 241653
2015-07-07Revert r241620 and follow-up commits while investigating linux buildbot ↵Adrian Prantl
failures. llvm-svn: 241642
2015-07-07Update testcases that use precompiled headers to require a target afterAdrian Prantl
r241620. llvm-svn: 241623
2015-07-03[OPENMP 4.0] Fixed codegen for 'cancellation point' construct.Alexey Bataev
Generate the next code for 'cancellation point': if (__kmpc_cancellationpoint()) { __kmpc_cancel_barrier(); <exit construct>; } llvm-svn: 241336
2015-06-18[OPENMP] Fixed test for '#pragma omp parallel for simd'.Alexey Bataev
llvm-svn: 240009
2015-06-18[OPENMP] Add support for 'omp parallel for' directive.Alexey Bataev
Codegen for this directive is a combined codegen for 'omp parallel' region with 'omp for simd' region inside. Clauses are supported. llvm-svn: 240006