- Feb 29, 2024
-
-
Patrick Dougherty authored
Currently `add_lit_target` sets the `USES_TERMINAL` CMake option. When using Ninja, this forces all lit testsuite targets into the single-threaded `console` pool. This PR adds a new option `LLVM_PARALLEL_LIT` which drops the `USES_TERMINAL` flag, allowing Ninja to run them in parallel. The default setting (`LLVM_PARALLEL_LIT=OFF`) retains the existing behavior of serial testsuite execution.
-
Simon Pilgrim authored
sitofp - if we only demand the signbit, then we can try to use the source integer uitofp - signbit is guaranteed to be zero Noticed while reviewing #82290
-
Kevin Frei authored
In order to make tooling around dwarf health easier, I've added an `--verify-json` option to `llvm-dwarfdump --verify` that will spit out error summary data with counts to a JSON file. I've added the same capability to `llvm-gsymutil` in a [different PR.](https://github.com/llvm/llvm-project/pull/81763 ) The format of the json is: ``` json { "error-categories": { "<first category description>": {"count": 1234}, "<next category description>": {"count":4321} }, "error-count": 5555 } ``` for a clean run: ``` json { "error-categories": {}, "error-count": 0 } ``` --------- Co-authored-by:
Kevin Frei <freik@meta.com>
-
Slava Zakharin authored
Changed the lowering to call Norm2DimReal16 for REAL(16). Added the corresponding entry point to FortranFloat128Math, which required some restructuring in the related templates.
-
Aart Bik authored
Since the vector.print str provides no punctuation control, it is slightly more flexible to let the client of this operation decide whether there should be a trailing newline. This allows for printing like vector.print str "nse = " vector.print %nse : index as nse = 42
-
Nilanjana Basu authored
Recent set of changes (PR #67725) in loop interleaving algorithm caused removal of the loop trip count threshold for allowing interleaving. Therefore configuration option interleave-small-loop-scalar-reduction is no longer needed.
-
Cyndy Ishida authored
Appeases bots.
-
LLVM GN Syncbot authored
-
Alexandros Lamprineas authored
Before this patch all of the 'target', 'target_version' and 'target_clones' attributes were sharing a common mangling logic across different targets. However we would like to differenciate this logic, therefore I have moved the default path to ABIInfo and provided overrides for AArch64. This way we can resolve feature aliases without affecting the name mangling. The PR #80540 demonstrates a motivating case.
-
Cyndy Ishida authored
This patch takes in json files as input to determine that header files to process, and in which order, to pass along for CC1 invocations. This patch also includes an ASTVisitor to collect simple global variables.
-
Jason Eckhardt authored
Currently the decoder and encoder emitters will crash if DefaultMode is used within an EncodingByHwMode. As can be done today for RegInfoByHwMode and ValueTypeByHwMode, this patch adds support for this usage in EncodingByHwMode: let EncodingInfos = EncodingByHwMode<[ModeA, DefaultMode], [EncA, EncDefault]>; -
Han-Chung Wang authored
The reverse op is treated as a VectorMemoryAccessKind::Contiguous load. It is contiguous slice, but we'll need to compute indices differently and apply a reverse at vector level. It takes non-trivial efforts for the approach. The revision flips the case to use vector.gather. Otherwise there are functionality issues. E.g., the below example loaded `2, 3, 4` (which is a bug), but what we want is `2, 1, 0`. Before vectorization: ```mlir func.func @vectorize_reverse_like_tensor_extract(%arg0: tensor<1x2x3xf32>, %arg1: tensor<1x1x3xf32>, %arg2: index) -> tensor<1x1x3xf32> { %c1 = arith.constant 1 : index %c0 = arith.constant 0 : index %c2 = arith.constant 2 : index %0 = linalg.generic {indexing_maps = [#map], iterator_types = ["parallel", "parallel", "parallel"]} outs(%arg1 : tensor<1x1x3xf32>) { ^bb0(%out: f32): %1 = linalg.index 1 : index %2 = linalg.index 0 : index %3 = affine.apply #map1(%1, %2, %arg2) %4 = linalg.index 2 : index %5 = arith.subi %c2, %4 : index %extracted = tensor.extract %arg0[%c0, %3, %5] : tensor<1x2x3xf32> linalg.yield %extracted : f32 } -> tensor<1x1x3xf32> return %0 : tensor<1x1x3xf32> } ``` Partial IR after vectorization: ``` %5 = vector.constant_mask [1, 1, 3] : vector<1x1x4xi1> %6 = vector.broadcast %arg0 : index to vector<1x1x4xindex> %7 = vector.shape_cast %6 : vector<1x1x4xindex> to vector<4xindex> %8 = vector.extractelement %7[%c0_i32 : i32] : vector<4xindex> %9 = vector.transfer_read %3[%c0, %8, %c2], %cst, %5 {in_bounds = [true, true, true]} : tensor<1x2x3xf32>, vector<1x1x4xf32> ``` -
Michael Jones authored
As encountered with <sys/queue.h>, we need a policy for how to handle implementing functions that users need, but has no specific standard. In that case, we should treat existing implementations as the standard and try to match their behavior as best as possible.
-
Paul T Robinson authored
In Sony's document processing, the first "paragraph" of the description is duplicated into a Brief Description section. Add paragraph breaks to make those brief descriptions less verbose. In fmaintrin.h we were including the \code blocks, which are inappropriate for a brief description. While I was in there, change \code to \code{.operation} which the Intel document processing wants. -
srcarroll authored
A `transform.structured.flatten_elementwise` op is implemented for flattening the iteration space and (applicable) operands/results to a single dimension.
-
Timm Bäder authored
The F.isFinite() check here was introduced back when the first floating point implementation was pushed, but I don't think it's necessary and it fixes the attached test case.
-
Leandro Lupori authored
-
SivanShani-Arm authored
T1 allows for an optional registers list, the register list must be {d0-d15}. T2 defines a mandatory register list, the register list must be {d0-d31}. The requirements for T1/T2 are as follows: T1 T2 Require: v8-M.Main, v8.1-M.Main, secure state secure state 16 D Regs valid valid 32 D Regs UNDEFINED valid No D Regs NOP NOP -
Lukacma authored
In certain cases Legalizer was generating `AND(WHILELO, SPLAT 1)` instruction pattern, when `WHILELO` would be sufficient.
-
Walter Erquinigo authored
https://github.com/modularml/mojo/issues/1796 discovered that if you try to complete a space-only line in the REPL on Linux, LLDB crashes. I suspect that editline doesn't behave the same way on linux and on darwin, because I can't replicate this on darwin. Adding a boundary check in the completion code prevents the crash from happening.
-
Leandro Lupori authored
Use the new copyprivate list from omp.single to emit calls to __kmpc_copyprivate, during the creation of the single operation in OMPIRBuilder. This is patch 4 of 4, to add support for COPYPRIVATE in Flang. Original PR: https://github.com/llvm/llvm-project/pull/73128
-
Florian Hahn authored
Otherwise accessing the trip count may accesses freed memory. Fixes https://lab.llvm.org/buildbot/#/builders/74/builds/26239 and others.
-
Diego Caballero authored
This PR is adds support for `vector.insert` to the patterns that bubble up and down `vector.bitcat` ops across `vector.extract/extract_slice/insert_slice` ops.
-
- Feb 28, 2024
-
-
Alexey Bataev authored
-
Quinn Dawkins authored
This reverts commit 5cdb8c0c. This pattern is producing incorrect IR. For example, ```mlir func.func @extract_subvector_from_constant_mask() -> vector<16xi1> { %mask = vector.constant_mask [2, 3] : vector<16x16xi1> %extract = vector.extract %mask[8] : vector<16xi1> from vector<16x16xi1> return %extract : vector<16xi1> } ``` Canonicalizes to ```mlir func.func @extract_subvector_from_constant_mask() -> vector<16xi1> { %0 = vector.constant_mask [3] : vector<16xi1> return %0 : vector<16xi1> } ``` Where it should be a zero mask because the extraction index (8) is greater than the constant mask size along that dim (2).
-
Petar Avramovic authored
Insert waitcnts for loads and atomics before stores with system scope. Scope is field in instruction encoding and corresponds to desired coherence level in cache hierarchy. Intrinsic stores can set scope in cache policy operand. If volatile keyword is used on generic stores memory legalizer will set scope to system. Generic stores, by default, get lowest scope level. Waitcnts are not required if it is guaranteed that memory is cached. For example vulkan shaders can guarantee this. TODO: implement flag for frontends to give us a hint not to insert waits. Expecting vulkan flag to be implemented as vulkan:private MMRA.
-
Timm Bäder authored
Just don't do anything and let later operations handle the diagnostics.
-
Alexey Bataev authored
Selects the tail-folding style while choosing the max vector factor and storing it in the data member rather than calculating it each time upon getTailFoldingStyle call. Part of https://github.com/llvm/llvm-project/pull/76172 Reviewers: ayalz, fhahn Reviewed By: fhahn Pull Request: https://github.com/llvm/llvm-project/pull/81885
-
Ivan Kosarev authored
Symbolic values are to be supported separately.
-
Alexey Bataev authored
-
Michael Liao authored
-
Ingo Müller authored
That commit (from #82189) introduces a new dependency but does not declare it in the BUILD files.
-
chuongg3 authored
Lowers `v4s8 = G_LOAD %ptr ptr` into `s32 = G_LOAD %ptr ptr` `v4s8 = G_BITCAST s32`
-
Kareem Ergawy authored
I used `class` instead of `struct` for `SymbolMap`.
-
Ingo Müller authored
That macro was not defined in some cases and thus yielded warnings if compiled with `-Wundef`. In particular, they were not defined in the BUILD files, so the GPU targets were broken when built with Bazel. This commit exposes mentioned CMake variable through mlir-config.h and uses the macro that is introduced with the same name. This replaces the macro MLIR_CUDA_CONVERSIONS_ENABLED, which the CMake files previously defined manually.
-
Valery Pykhtin authored
This fixes crash when operand sources for V_OR instruction reside in different basic blocks.
-
Niwin Anto authored
Test case for https://github.com/llvm/llvm-project/issues/76069
-
Tobias Gysi authored
This commit fixes the translation of access group metadata to LLVM IR. Previously, it did not use a temporary metadata node to model the placeholder of the self-referencing access group nodes. This is dangerous since, the translation may produce a metadata list with a null entry that is later on changed changed with a self reference. At the same time, for example the debug info translation may create the same uniqued node, which after setting the self-reference the suddenly references the access group metadata. The commit avoids such breakages.
-
jeanPerier authored
Internal procedures cannot be called directly from outside the host procedure, so there is no point giving them external linkage. The only reason flang did is because it is the default in MLIR. Giving external linkage to them: - prevents deleting them when not used/inlined by LLVM - causes bugs with shared libraries (at least on linux x86-64) because the call to the internal function could lead to a dynamic loader call that would overwrite r10 register (the static chain pointer) due to system calls and did not restore (it seems it does not expect r10 to be used for PLT calls). This patch gives internal linkage to internal procedures: Note: the llvm.linkage attribute name cannot be obtained via a getLinkageAttrName since it is not the same name as the one used in the LLVM dialect. It is just a placeholder defined in mlir/lib/Conversion/FuncToLLVM/FuncToLLVM.cpp until the func dialect gets a real linkage model. So simply avoid hard coding it too many times in lowering.
-
Rishabh Bali authored
This PR, aims to enable the `ConvertAffineToStandard` to handle `affine.dilinearize_index` Operation. Fixes #78458
-