summaryrefslogtreecommitdiff
path: root/clang/test/OpenMP/barrier_codegen.cpp
AgeCommit message (Collapse)Author
2025-01-29[IR] Convert from nocapture to captures(none) (#123181)Nikita Popov
This PR removes the old `nocapture` attribute, replacing it with the new `captures` attribute introduced in #116990. This change is intended to be essentially NFC, replacing existing uses of `nocapture` with `captures(none)` without adding any new analysis capabilities. Making use of non-`none` values is left for a followup. Some notes: * `nocapture` will be upgraded to `captures(none)` by the bitcode reader. * `nocapture` will also be upgraded by the textual IR reader. This is to make it easier to use old IR files and somewhat reduce the test churn in this PR. * Helper APIs like `doesNotCapture()` will check for `captures(none)`. * MLIR import will convert `captures(none)` into an `llvm.nocapture` attribute. The representation in the LLVM IR dialect should be updated separately.
2023-07-14[OpenMP][FIX] Adjust "known" attributes for runtime functionsJohannes Doerfert
This showed up when we started to deduce readnone for the argument of __kmpc_global_thread_num. The known attributes for "getters" did not allow to read arguments, but that is sometimes the case.
2022-11-04[IR] Switch everything to use memory attributeNikita Popov
This switches everything to use the memory attribute proposed in https://discourse.llvm.org/t/rfc-unify-memory-effect-attributes/65579. The old argmemonly, inaccessiblememonly and inaccessiblemem_or_argmemonly attributes are dropped. The readnone, readonly and writeonly attributes are restricted to parameters only. The old attributes are auto-upgraded both in bitcode and IR. The bitcode upgrade is a policy requirement that has to be retained indefinitely. The IR upgrade is mainly there so it's not necessary to update all tests using memory attributes in this patch, which is already large enough. We could drop that part after migrating tests, or retain it longer term, to make it easier to import IR from older LLVM versions. High-level Function/CallBase APIs like doesNotAccessMemory() or setDoesNotAccessMemory() are mapped transparently to the memory attribute. Code that directly manipulates attributes (e.g. via AttributeList) on the other hand needs to switch to working with the memory attribute instead. Differential Revision: https://reviews.llvm.org/D135780
2022-10-07[OpenMP] Convert tests to opaque pointers (NFC)Nikita Popov
Conversion performed using the script at: https://gist.github.com/nikic/98357b71fd67756b0f064c9517b62a34 These are only tests where no manual fixup was required.
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
2021-12-29Reapply "[OpenMP][NFCI] Embed the source location string size in the ident_t"Johannes Doerfert
This reverts commit 73ece231ee0cf048d56841f47915beb1db6afc26 and reapplies 7bfcdbcbf368cea14a5236080af975d5878a46eb with mlir changes. Also reverts commit 423ba12971bac8397c87fcf975ba6a4b7530ed28 and includes the unit test changes of 16da2140045808b2aea1d28366ca7d326eb3c809.
2021-12-29Revert "[OpenMP][NFCI] Embed the source location string size in the ident_t"Mehdi Amini
This reverts commit 7bfcdbcbf368cea14a5236080af975d5878a46eb. Broke MLIR build
2021-12-28[OpenMP][NFCI] Embed the source location string size in the ident_tJohannes Doerfert
One of the unused ident_t fields now holds the size of the string (=const char *) field so we have an easier time dealing with those in the future. Differential Revision: https://reviews.llvm.org/D113126
2020-07-18[OpenMP] Add Additional Function Attribute Information to OMPKinds.defJoseph Huber
Summary: This patch adds more function attribute information to the runtime function definitions in OMPKinds.def. The goal is to provide sufficient information about OpenMP runtime functions to perform more optimizations on OpenMP code. Reviewers: jdoerfert Subscribers: aaron.ballman cfe-commits yaxunl guansong sstefan1 llvm-commits Tags: #OpenMP #clang #LLVM Differential Revision: https://reviews.llvm.org/D81031
2020-06-01[OpenMP] Replace Clang's OpenMP RTL Definitions with OMPKinds.defJoseph Huber
Summary: This changes Clang's generation of OpenMP runtime functions to use the types and functions defined in OpenMPKinds and OpenMPConstants. New OpenMP runtime function information should now be added to OMPKinds.def. This patch also changed the definitions of __kmpc_push_num_teams and __kmpc_copyprivate to match those found in the runtime. Reviewers: jdoerfert Reviewed By: jdoerfert Subscribers: jfb, AndreyChurbanov, openmp-commits, fghanim, hiraditya, sstefan1, cfe-commits, llvm-commits Tags: #openmp, #clang, #llvm Differential Revision: https://reviews.llvm.org/D80222
2020-03-25OpenMP] Adding InaccessibleMemOnly and InaccessibleMemOrArgMemOnly for ↵sstefan1
runtime calls. Summary: Attempt to add more attributes for runtime calls. Reviewers: jdoerfert Subscribers: guansong, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D75010
2019-12-11[OpenMP] Use the OpenMP-IR-BuilderJohannes Doerfert
This is a follow up patch to use the OpenMP-IR-Builder, as discussed on the mailing list ([1] and later) and at the US Dev Meeting'19. [1] http://lists.flang-compiler.org/pipermail/flang-dev_lists.flang-compiler.org/2019-May/000197.html Reviewers: kiranchandramohan, ABataev, RaviNarayanaswamy, gtbercea, grokos, sdmitriev, JonChesterfield, hfinkel, fghanim Subscribers: ppenzin, penzn, llvm-commits, cfe-commits, jfb, guansong, bollu, hiraditya, mgorny Tags: #clang Differential Revision: https://reviews.llvm.org/D69922
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
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
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-07Wrap clang modules and pch files in an object file container.Adrian Prantl
This patch adds ObjectFilePCHContainerOperations uses the LLVM backend to put the contents of a PCH into a __clangast section inside a COFF, ELF, or Mach-O object file container. This is done to facilitate module debugging by makeing it possible to store the debug info for the types defined by a module alongside the AST. rdar://problem/20091852 llvm-svn: 241620
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-05-20[OPENMP] -fopenmp enables OpenMP support (fix for http://llvm.org/PR23492)Alexey Bataev
-fopenmp turns on OpenMP support and links libiomp5 as OpenMP library. Also there is -fopenmp={libiomp5|libgomp} option that allows to override effect of -fopenmp and link libgomp library (if -fopenmp=libgomp is specified). Differential Revision: http://reviews.llvm.org/D9736 llvm-svn: 237769
2015-03-13Test case updates for explicit type parameter to the gep operatorDavid Blaikie
llvm-svn: 232187
2015-02-25Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl
llvm-svn: 230454
2015-02-25Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl
This is a necessary prerequisite for debugging with modules. The .pcm files become containers that hold the serialized AST which allows us to store debug information in the module file that can be shared by all object files that were built importing the module. This reapplies r230044 with a fixed configure+make build and updated dependencies and testcase requirements. Over the last iteration this version adds - missing target requirements for testcases that specify an x86 triple, - a missing clangCodeGen.a dependency to libClang.a in the make build. rdar://problem/19104245 llvm-svn: 230423
2014-12-05[OPENMP] Test for 'omp barrier' directiveAlexey Bataev
llvm-svn: 223445