- Aug 15, 2023
-
-
Matt Arsenault authored
Apparently afn doesn't allow you to drop the denormal handling according to OpenCL conformance. This was hidden by losing the flags during the library linking process. Fast log is still broken and needs more work. https://reviews.llvm.org/D157936
-
Sean Fertile authored
This reverts commit 5e28d30f.
-
Sean Fertile authored
This reverts commit b37c7ed0.
-
Markus Böck authored
This is a follow-up to https://reviews.llvm.org/D156889 Downstream projects may have more complicated ops than the control flow ops upstream and therefore need a more powerful interface to support the lifting process. Use cases include the propagation of (inherent) metadata that was previously on the control flow ops and now needs to be lifted to structured control flow ops. Since the lifting process is inherently non-local in respect to the function-body, we require stronger guarantees from the interface. This patch therefore makes two changes to the interface: * Passes the terminator that is being replaced to `createStructuredBranchRegionTerminatorOp` * Adds as precondition to `createCFGSwitchOp` that its predecessors are already correctly established Asserts have been added to verify these were it makes sense and to correctly state intent. I have not added tests purely because testing preconditions like these is not really feasible (and incredibly specific). Differential Revision: https://reviews.llvm.org/D157981
-
Nikita Popov authored
Abort the transform instead of asserting. Fixes https://github.com/llvm/llvm-project/issues/64661.
-
Nikita Popov authored
Align operand bundles can contain non-power-of-two alignments, but LLVM otherwise does not support them. Bail out in that case instead of crashing. Fixes https://github.com/llvm/llvm-project/issues/64687.
-
Nikita Popov authored
-
Qiongsi Wu authored
Currently, the `-fprofile-udpate` is ignored when `-fprofile-generate` is in effect. This patch enables `-fprofile-update` for `-fprofile-generate`. This patch continues the work from https://reviews.llvm.org/D87737, which added `-fprofile-update` in the first place. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D157280
-
Jan Sjodin authored
This patch adds code emission in emitTargetCall to call the OpenMP runtime to launch an kernel, and to call the fallback host implementation if the launch fails. Reviewed By: TIFitis, kiranchandramohan, jdoerfert Differential Revision: https://reviews.llvm.org/D155633
-
Markus Böck authored
This is useful for any downstream users who may just want to use slightly different ops than the pass or need to take into account other ops in the input while still dealing with ControlFlow ops for the most part. This also helps writing test implementations for `transformCFGToSCF`. Since the implementation is now public, comments noting the post conditions of the methods have been added to ensure downstream users can stay compatible with the existing implementation. Differential Revision: https://reviews.llvm.org/D157971
-
Matthias Springer authored
This revision is needed to support bufferization of `cf.br`/`cf.cond_br`. It will also be useful for better analysis of loop ops. This revision generalizes `getAliasingOpResults` to `getAliasingValues`. An OpOperand can now not only alias with OpResults but also with BlockArguments. In the case of `cf.br` (will be added in a later revision): a `cf.br` operand will alias with the corresponding argument of the destination block. If an op does not implement the `BufferizableOpInterface`, the analysis in conservative. It previously assumed that an OpOperand may alias with each OpResult. It now assumes that an OpOperand may alias with each OpResult and each BlockArgument of the entry block. Differential Revision: https://reviews.llvm.org/D157957
-
Jay Foad authored
-
Martin Erhart authored
Add a pattern that splits one dealloc operation into multiple dealloc operation depending on static aliasing information of the values in the `memref` operand list. This reduces the total number of aliasing checks required at runtime and can enable futher canonicalizations of the new and simplified dealloc operations. Depends on D157407 Reviewed By: springerm Differential Revision: https://reviews.llvm.org/D157508
-
Sergio Afonso authored
This patch adds support for translating `teams` OpenMP directives to MLIR, when appearing as either loop or block constructs and as part of combined constructs or on its own. The current Fortran parser does not allow the specification of the optional lower bound for the "num_teams" clause, so only the `num_teams_upper` MLIR argument is set by this patch. Depends on D156809 Differential Revision: https://reviews.llvm.org/D156884
-
Sergio Afonso authored
This patch extracts MLIR codegen logic from various types of OpenMP constructs and places it into operation-specific functions. This refactoring mainly targets block constructs and unifying logic for directives that can appear on their own as well as combined with others. The processing of clauses that do not apply to the directive being processed is avoided and code duplication for combined constructs is reduced. Depends on D156455. Differential Revision: https://reviews.llvm.org/D156809
-
Corentin Jabot authored
The attributes changes were left out of Clang 17. Attributes that used to take a string literal now accept an unevaluated string literal instead, which means they reject numeric escape sequences and strings literal with an encoding prefix - but the later was already ill-formed in most cases. We need to know that we are going to parse an unevaluated string literal before we do - so we can reject numeric escape sequence, so we derive from Attrs.td which attributes parameters are expected to be string literals. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D156237
-
Sergio Afonso authored
This patch adds support for lowering target-related combined constructs from PFT to MLIR. The lowering of OpenMP loop constructs is generalized in preparation for later supporting different combinations of target, teams, distribute, parallel and simd directives. Currently enabled by this patch are the following combined constructs: - do simd - parallel do simd - target parallel do simd - target parallel do - target simd Depends on D155981 and D157090. Differential Revision: https://reviews.llvm.org/D156455
-
Aaron Ballman authored
This specifies the developer policy on adding links in source & test files and commit messages, related to discussion at: https://discourse.llvm.org/t/code-review-reminder-about-links-in-code-commit-messages/71847 The intent is to discourage adding links to resources that are not available to the community as a whole (dead links, links to internal documentation, links to internal bug trackers, etc) from source and test files, while still allowing such links to appear in other contexts as needed. It suggests to instead add sufficient context in the surrounding comments to make such links unnecessary. It also clarifies that these links can appear in commit messages as metadata (similar to how we already have Differential Revision and Fixes metadata with links). Differential Revision: https://reviews.llvm.org/D155081
-
Sergio Afonso authored
This patch adds semantics checks for REQUIRES directives appearing after other directives that are affected by them. In particular, it adds checks for device constructs appearing after device-related REQUIRES directives and for the `atomic_default_mem_order` clause appearing after atomic operations where the memory order is not explicitly specified. This is patch 2/5 of a series splitting D149337 to simplify review. Depends on D157710. Differential Revision: https://reviews.llvm.org/D157722
-
khei4 authored
-
Takuya Shimizu authored
Revert "Reland "[Clang][SemaCXX] Add unused warning for variables declared in condition expressions"" This causes a lot of warning in sanitizer build: https://lab.llvm.org/buildbot/#/builders/258/builds/5424 https://lab.llvm.org/buildbot/#/builders/36/builds/36560 This reverts commit 8e329caa.
-
Sergio Afonso authored
This patch fixes a problem in the representation of the clause list for the REQUIRES directive. Location information was not present, making error messages not very descriptive. This is patch 1/5 of a series splitting D149337 to simplify review. Differential Revision: https://reviews.llvm.org/D157710
-
Matthias Springer authored
The bufferization implementation of `func.func` and `func.call` can be simplified. It still contained code that was necessary when One-Shot Bufferize removed return values. This functionality has been extracted into a separate pass a while ago. Differential Revision: https://reviews.llvm.org/D157893
-
Jingu Kang authored
If fmul's constant operand is the reciprocal of a power of 2 (i.e 1/2^n) or fdiv's constant operand is power of 2, we can try to match patterns with [su]int_to_fp for [su]cvtf. Differential Revision: https://reviews.llvm.org/D156538
-
Matthias Springer authored
Report an error when trying to bufferize an op that contains unstructured control flow but for ops for which the bufferization implementation does not support unstructured control flow. At the moment, there are no ops for which unstructured control flow is supported. Differential Revision: https://reviews.llvm.org/D157893
-
Stanislav Mekhanoshin authored
-
Jay Foad authored
Differential Revision: https://reviews.llvm.org/D157633
-
Takuya Shimizu authored
This patch marks the declarations with initializations in condition expressions such as if (int var = init) as unreferenced so that -Wunused can warn on them. Fixes https://github.com/llvm/llvm-project/issues/61681 Reviewed By: cor3ntin Differential Revision: https://reviews.llvm.org/D152495
-
Justin Bogner authored
This reverts commit 4e3b8948, with fixes for places I'd missed updating in lld and lldb. I've also renamed OptionVisibility::Default to "DefaultVis" to avoid ambiguity since the undecorated name has to be available anywhere Options.inc is included. Original message follows: This splits OptTable's "Flags" field into "Flags" and "Visibility", updates the places where we instantiate Option tables, and adds variants of the OptTable APIs that use Visibility mask instead of Include/Exclude flags. We need to do this to clean up a bunch of complexity in the clang driver's option handling - there's a whole slew of flags like CoreOption, NoDriverOption, and FlangOnlyOption there today to try to handle all of the permutations of flags that the various drivers need, but it really doesn't scale well, as can be seen by things like the somewhat recently introduced CLDXCOption. Instead, we'll provide an add...
-
Martin Storsjö authored
An empty struct is handled as a struct with a dummy i8, on all targets. Most targets treat an empty struct return value as essentially void - but some don't. (Currently, at least x86_64-windows-* and powerpc64le-* don't treat it as void.) When intializing a struct with such a no_unique_address member, make sure we don't write the dummy i8 into the struct where there's no space allocated for it. Previously it would clobber the actual valid data of the struct. Fixes https://github.com/llvm/llvm-project/issues/64253, and possibly https://github.com/llvm/llvm-project/issues/64077 and https://github.com/llvm/llvm-project/issues/64427 as well. We should omit the store for any empty record (not only ones declared with no_unique_address); we can have a situation where a class doesn't have the no_unique_address attribute, but is embedded in an outer struct with the no_unique_address attribute - like this: struct S {}; S f(); struct S2 : public S { S2();}; S2::S2() : S(f()) {} struct S3 { int x; [[no_unique_address]] S2 y; S3(); }; S3::S3() : x(1), y() {} Here, the problematic store (which this patch omits) is in the constructor of S2. In the case of S3, S2 has no valid storage and aliases x - thus the constructor of S2 should omit the dummy store. Differential Revision: https://reviews.llvm.org/D157332
-
Piotr Zegar authored
Modify check to ignore any parent typeLoc and other unevaluated context. Fixes: #35857 Reviewed By: carlosgalvezp Differential Revision: https://reviews.llvm.org/D157374
-
Piotr Zegar authored
Use isStatic instead of isStaticStorageClass to properly handle a out-of-line definitions. Fixes: #51861 Reviewed By: carlosgalvezp Differential Revision: https://reviews.llvm.org/D157326
-
Vitaly Buka authored
Follow patches will add implementation. For https://github.com/llvm/llvm-project/issues/30098 Reviewed By: Enna1, phosek Differential Revision: https://reviews.llvm.org/D157921
-
wangpc authored
The vector arguments are split but assignments won't be pending. Fixes #64645 Reviewed By: asb Differential Revision: https://reviews.llvm.org/D157847
-
wangpc authored
D144048 has added preferred function and loop alignment to RISCVSubtarget, but now we need to set them manually for different processors. Tune features that set preferred function/loop align to [2, 64] bytes (align 1 is not here since the min align is 2) are added. These features can be used in processor definitions. Reviewed By: asb Differential Revision: https://reviews.llvm.org/D157832
-
Weiwei Chen authored
Add canonicalization pattern for index::CmpOp Differential Revision: https://reviews.llvm.org/D157903
-
Yuhao Gu authored
`llvm-cov convert-for-testing` is used to build the .covmapping files used in its regression tests. However the current implementation only works when there's only one source file in the mapping information data. If there are more than 1 source files, `llvm-cov convert-for-testing` can still produce a .covmapping file, but when read it back, `llvm-cov` will report: ``` error: Failed to load coverage: 'main.covmapping': Malformed coverage data ``` This is because the output .covmapping file doesn't have any mark to indicate the boundary between file records and function records, and current implementation jsut assume there's only one file record in the .covmapping file. Changes to the code: - Make `llvm-cov convert-for-testing` output a LEB128 number before file records to indicate its size. - Change the testing format parsing code correspondingly. - Update existing .covmapping files. Reviewed By: gulfem Differential Revision: https://reviews.llvm.org/D156611
-
Logan Chien authored
Differential Revision: https://reviews.llvm.org/D157771
-
Vitaly Buka authored
-