- Jul 25, 2023
-
-
Johannes Doerfert authored
CUDA and HIP have kernel attributes to tune the code generation (in the backend). To reuse this functionality for OpenMP target regions we introduce the `ompx_attribute` clause that takes these kernel attributes and emits code as if they had been attached to the kernel fuction (which is implicitly generated). To limit the impact, we only support three kernel attributes: `amdgpu_waves_per_eu`, for AMDGPU `amdgpu_flat_work_group_size`, for AMDGPU `launch_bounds`, for NVPTX The existing implementations of those attributes are used for error checking and code generation. `ompx_attribute` can be attached to any executable target region and it can hold more than one kernel attribute. Differential Revision: https://reviews.llvm.org/D156184
-
Fangrui Song authored
SmallVector<*, 0> is often a better replacement for std::vector : both the object size and the code size are smaller. (SmallMapVector uses SmallVector as well, but it is not common.) clang size decreases by 0.0226%. instructions:u decreases 0.037% when compiling a sqlite3 amalgram. Reviewed By: JDevlieghere Differential Revision: https://reviews.llvm.org/D156016
-
Fangrui Song authored
Right now std::vector is instantiated with an incomplete element type, which is ok but best to avoid.
-
Amir Ayupov authored
Specify blocks order used in YAML profile. Needed to ensure profile backwards compatibility with pre-D155514 DFS order by default. Reviewed By: #bolt, maksfb Differential Revision: https://reviews.llvm.org/D156176
-
Kevin Gleason authored
When building MLIR using bazel on windows with MSVC2019, bool splats were being created incorrectly: ``` dense<[true,true,true,true]> : tensor<4xi1> -(parse with mlir-opt)-> dense<[true, false, false, false]> : tensor<4xi1> ``` Appears that a Windows bazel build produces a corrupt DenseIntOrFPElementsAttr. Unable to repro using MSVC and cmake. Issue first discovered here: https://github.com/google/jax/issues/16394 Added test point for reproduction: ``` $ bazel test @llvm-project//mlir/unittests:ir_tests --test_arg=--gtest_filter=DenseSplatTest.BoolSplatSmall ``` Differential Revision: https://reviews.llvm.org/D155745
-
David Blaikie authored
The cwd of the test might not be writable.
-
David Blaikie authored
This came up in the context of #63169 - if this assert were in place it would've been much easier to reduce the test case.
-
Chuanqi Xu authored
Close https://github.com/llvm/llvm-project/issues/64091 This reverts commit f82df0b2 and add a test from https://github.com/llvm/llvm-project/issues/64091
-
Freddy Ye authored
Reviewed By: pengfei Differential Revision: https://reviews.llvm.org/D155784
-
Zheng Qian authored
This patch updates the Clang release notes with the new option -fkeep-persistent-storage-variables added in bb6ab91b. Reviewed By: hubert.reinterpretcast Differential Revision: https://reviews.llvm.org/D155501
-
Mehdi Amini authored
The pass tried to fold in reverse-post-order, but it cause an issue when a parent is folded before the chilren as they will still be present in the worklist. Use reverse-preorder instead here. Fixes #64089
-
Nikolas Klauser authored
Reviewed By: #libc, Mordante Spies: Mordante, aheejin, libcxx-commits Differential Revision: https://reviews.llvm.org/D156059
-
Advenam Tacet authored
Existing notes were not fully correct and were missing a detail: - `std::vector` was annotated long time ago, - `std::deque` annotations are new, - now container annotations were extended to all allocators (support in ASan API exists since LLVM16). Reviewed By: philnik, #libc Differential Revision: https://reviews.llvm.org/D156162
-
Jordan Rupprecht authored
Added in D156163
-
Gedare Bloom authored
This is a refactoring of: - SpacesInConditionalStatement - SpacesInCStyleCastParentheses - SpaceInEmptyParentheses - SpacesInParentheses These are now options under the new Style Option: SpacesInParens. The existing options are maintained for backward compatibility. Within SpacesInParens, there are currently options for: - Never - Custom The currently available options for Custom are: - InConditionalStatements - InCStyleCasts - InEmptyParentheses - Other Setting InConditionalStatements and Other to true enables the same space additions as SpacesInParentheses. This refactoring does not add or remove any existing features, but it makes it possible to more easily extend and maintain the addition of spaces within parentheses. Related to #55428. Differential Revision: https://reviews.llvm.org/D155239
-
Jim Lin authored
Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D156092
-
WANG Rui authored
Implement isSExtCheaperThanZExt. Signed-off-by:
WANG Rui <wangrui@loongson.cn> Differential Revision: https://reviews.llvm.org/D154919
-
Galen Elias authored
This adds a new AlignConsecutiveShortCaseStatements option in line with the existing AlignConsecutive* options , which when AllowShortCaseLabelsOnASingleLine is enabled will align the tokens after the case statement's colon. This also adds a AlignCaseColons option to allow aligning the case label colon itself rather than the token after it. Fixes #55475. Differential Revision: https://reviews.llvm.org/D151761
-
WANG Rui authored
Add test case showing suboptimal codegen when zero extending. Signed-off-by:
WANG Rui <wangrui@loongson.cn> Reviewed By: xen0n Differential Revision: https://reviews.llvm.org/D154918
-
Weining Lu authored
This reverts commit c299efbf. Reason to revert: D142327 has been reverted which is depended by this change.
-
Mehdi Amini authored
The operand_segment_sizes and result_segment_sizes Attributes are now inlined in the operation as native propertie. We continue to support building an Attribute on the fly for `getAttr("operand_segment_sizes")` and setting the property from an attribute with `setAttr("operand_segment_sizes", attr)`. A new bytecode version is introduced to support backward compatibility and backdeployments. Differential Revision: https://reviews.llvm.org/D155919 -
Owen Pan authored
This adds a new AlignConsecutiveShortCaseStatements option in line with the existing AlignConsecutive* options , which when AllowShortCaseLabelsOnASingleLine is enabled will align the tokens after the case statement's colon. This also adds a AlignCaseColons option to allow aligning the case label colon itself rather than the token after it. Fixes #55475. Differential Revision: https://reviews.llvm.org/D151761
-
chenli authored
The author of the following files is licongtian <licongtian@loongson.cn>: - clang/lib/Basic/Targets/LoongArch.cpp - llvm/lib/Target/LoongArch/LoongArchAsmPrinter.cpp - llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp The files mentioned above implement InlineAsm for LSX and LASX as follows: - Enable clang parsing LSX/LASX register name, such as $vr0. - Support the case which operand type is 128bit or 256bit when the constraints is 'f'. - Support the way of specifying LSX/LASX register by using constraint, such as "={$xr0}". - Support the operand modifiers 'u' and 'w'. - Support and legalize the data types and register classes involved in LSX/LASX in the lowering process. Reviewed By: xen0n, SixWeining Differential Revision: https://reviews.llvm.org/D154931 -
Weining Lu authored
GCC doesn't ignore non-zero-length array of empty structures in C++ while clang does. What this patch did is to match GCC's behaviour although this rule is not documented in psABI. Similar to D142327 for RISCV. Reviewed By: xry111, xen0n Differential Revision: https://reviews.llvm.org/D156116
-
Weining Lu authored
Differential Revision: https://reviews.llvm.org/D156114
-
Mehdi Amini authored
Cleanup CMake dependencies from unnecessary libraries in mlir/test/lib/Dialect/GPU/CMakeLists.txt (NFC)
-
Michael Halkenhaeuser authored
OMPT release note addition for LLVM 17 Differential Revision: https://reviews.llvm.org/D156191
-
Michael Halkenhaeuser authored
[OpenMP] [OMPT] [7/8] Invoke tool-supplied callbacks before and after target launch and data transfer operations Implemented RAII objects, initialized at target entry points, that invoke tool-supplied callbacks. Updated status of target callbacks as implemented. Depends on D127365 Patch from John Mellor-Crummey <johnmc@rice.edu> With contributions from: Dhruva Chakrabarti <Dhruva.Chakrabarti@amd.com> Jan-Patrick Lehr <janpatrick.lehr@amd.com> Reviewed By: jdoerfert, dhruvachak Differential Revision: https://reviews.llvm.org/D127367
-
Mehdi Amini authored
This reverts commit 68b7d3ff. The mlir-nvidia bot is broken.
-
Fangrui Song authored
-
Kai Luo authored
On AIX, a libatomic supporting inline quadword atomic operations has been released, so that compatibility is not an issue now, we can enable quadword atomics by default. Reviewed By: #powerpc, nemanjai Differential Revision: https://reviews.llvm.org/D151312
-
Alex Richardson authored
Currently the *tf builtin functions can only be built if long double is an IEEE float, which prevents them from being available e.g. for x86 targets (unlike libgcc which has them). This non-functional change prepares the builtins library *tf functions for being able to target x86 by decoupling their presence from CRT_LDBL_128BIT and instead checking for a CRT_HAS_TF_MODE macro. This change is NFC since the CRT_HAS_TF_MODE is currently only set if long double is an IEEE 128-bit float. Reviewed By: compnerd Differential Revision: https://reviews.llvm.org/D153812
-
Alex Richardson authored
This flag does nothing for clang and is apparently not supported by GCC: aarch64-linux-gnu-gcc: error: unrecognized command-line option '-fnested-functions'; did you mean '-Wunused-function'? It looks like it was maybe supported by Apple GCC, but that is no longer a supported compiler. Differential Revision: https://reviews.llvm.org/D153819
-
Alex Richardson authored
GCC does not support __fp16, use the TYPE_FP16 macro instead. Differential Revision: https://reviews.llvm.org/D153813
-
Matt Arsenault authored
This makes it possible to use canonicalize to perform a dynamic check for whether denormal flushing is enabled, which will fold out when the denormal mode is known. Previously it would only fold if denormal flushing were known enabled. https://reviews.llvm.org/D156107
-
Nicolas Vasilache authored
This fixes a compilation bug where we would try to depend on ExecutionEngine but it wasn't actually built.
-
Nicolas Vasilache authored
-