- Feb 29, 2024
-
-
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
-
Timm Bäder authored
We can call getBase() for pointers where Base != Offset as well, for example when we've added a constant to the Offset.
-
Matthias Springer authored
When splitting a block during a dialect conversion, a `SplitBlockRewrite` object is stored in the dialect conversion state. This commit removes `SplitBlockRewrite`. Instead, a combination of `CreateBlockRewrite` and multiple `MoveOperationRewrite` is used. This change simplifies the internal state of the dialect conversion and is also needed to properly support listeners. `RewriteBase::splitBlock` is now no longer virtual. All necessary information for committing/rolling back a split block rewrite can be deduced from `Listener::notifyBlockInserted` and `Listener::notifyOperationInserted` (which is also called when moving an operation).
-
Jie Fu authored
llvm-project/flang/include/flang/Lower/SymbolMap.h:52:1: error: 'SymbolBox' defined as a struct here but previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Werror,-Wmismatched-tags] struct SymbolBox : public fir::details::matcher<SymbolBox> { ^ llvm-project/flang/include/flang/Lower/AbstractConverter.h:56:1: note: did you mean struct here? class SymbolBox; ^~~~~ struct -
Florian Hahn authored
Some optimizations are apply after UF and VF have been chosen. This patch adds an extra print of the final VPlan just before codegen/execution. In the future, there will be additional transforms that are applied later (interleaving for example). PR: https://github.com/llvm/llvm-project/pull/82269
-
Florian Hahn authored
Helps to improve resuls in some cases, while being overall neutral with respect to compile-time, https://llvm-compile-time-tracker.com/compare.php?from=2c9b6c1b36b8185299de083c3058e0c1e7760442&to=5984b1649dc12741308089de235647cf036df95f&stat=instructions:u
-
Balazs Benics authored
This reverts commit ffe7049b. This commit breaks on e.g. arm: Example: https://lab.llvm.org/buildbot/#/builders/245/builds/21177/steps/5/logs/FAIL__Clang__stream_c ``` ******************** TEST 'Clang :: Analysis/stream.c' FAILED ******************** Exit Code: 1 Command Output (stderr): -- RUN: at line 1: /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/bin/clang -cc1 -internal-isystem /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/lib/clang/19/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=core,alpha.unix.Stream,debug.ExprInspection -verify /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Analysis/stream.c + /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/bin/clang -cc1 -internal-isystem /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/lib/clang/19/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=core,alpha.unix.Stream,debug.ExprInspection -verify /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Analysis/stream.c error: 'expected-warning' diagnostics expected but not seen: File /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Analysis/stream.c Line 147: Stream pointer might be NULL File /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Analysis/stream.c Line 153: Stream pointer might be NULL error: 'expected-warning' diagnostics seen but not expected: File /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Analysis/stream.c Line 148: Stream pointer might be NULL [alpha.unix.Stream] File /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Analysis/stream.c Line 154: Stream pointer might be NULL [alpha.unix.Stream] 4 errors generated. -- ******************** ```
-
Matthias Springer authored
This fix is a temporary workaround. `LowerHLFIRIntrinsics.cpp` should be using the greedy pattern rewriter or a manual IR traversal. All patterns in this file are rewrite patterns. The test failure was caused by `replaceAllUsesWith`, which is not supported by the dialect conversion; additional asserts were added recently to prevent incorrect API usage. These trigger now. Alternatively, turning the patterns into conversion patterns and specifying a type converter may work. Failing test case: `Fortran/gfortran/regression/gfortran-regression-compile-regression__inline_matmul_14_f90.test`
-
Jie Fu authored
llvm-project/clang/lib/CodeGen/CGCall.cpp:3226:24: error: unused variable 'StructSize' [-Werror,-Wunused-variable] llvm::TypeSize StructSize = CGM.getDataLayout().getTypeAllocSize(STy); ^ llvm-project/clang/lib/CodeGen/CGCall.cpp:3227:24: error: unused variable 'PtrElementSize' [-Werror,-Wunused-variable] llvm::TypeSize PtrElementSize = ^ llvm-project/clang/lib/CodeGen/CGCall.cpp:5313:24: error: unused variable 'SrcTypeSize' [-Werror,-Wunused-variable] llvm::TypeSize SrcTypeSize = ^ llvm-project/clang/lib/CodeGen/CGCall.cpp:5315:24: error: unused variable 'DstTypeSize' [-Werror,-Wunused-variable] llvm::TypeSize DstTypeSize = CGM.getDataLayout().getTypeAllocSize(STy); ^ 4 errors generated. -
Ilia Kuklin authored
Add options --set-symbol-visibility and --set-symbols-visibility to manually change the visibility of symbols. There is already an option to set the visibility of newly added symbols via --add-symbol and --new-symbol-visibility. This option will allow to change the visibility of already existing symbols.
-
AtariDreams authored
Only use cld when we also have rep instructions, are calling a function, or contain inline asm.
-
Simon Pilgrim authored
If only one subvector extraction will be necessary (i.e. because the other is constant etc.) then extract the source operands and perform as a 128-bit comparison Ideally DAGCombiner's narrowExtractedVectorBinOp would handle this but its tricky to confirm when a target opcode can be safely extracted and performed as a different vector type Partially improves an outstanding regression in #82290
-
Kareem Ergawy authored
PR #81833 introduced some changes to broke some debug builds. This happened due to an indirectly included file referencing an `operator <<` function which is defined in a `.cpp` file that not linked with `tco` and `fir-opt`.
-
Paul Walker authored
-
Julian Schmidt authored
When parsing the ASTMatchers.h file, a matcher could specify an argument that is a matcher using the not needed namespace `(clang::)ast_matchers::`. Change the argument parsing in dump_ast_matchers.py to remove those namespaces such that when parameters with these namespaces slip through, the namespaces will be not be shown in the matchers reference, like it is done with the `internal` namespace. Additionally, remove the not needed namespaces from arguments in ASTMatchers.h.
-
Alejandro Álvarez Ayllón authored
Model `getc` and `putc` as equivalent to `fgetc` and `fputc` respectively. Model `vfscanf` and `vfprintf` as `fscanf` and `fprintf`, except that `vfscanf` can not invalidate the parameters due to the indirection via a `va_list`. Nevertheless, we can still track EOF and errors as for `fscanf`.
-
Simon Pilgrim authored
Added while triaging a regression from #82290
-
Tuan Chuong Goh authored
-
Sander de Smalen authored
For __arm_new("zt0") we need to have special setup code in the prologue. For calls that don't preserve zt0, we need to emit code preserve ZT0 around the call. This is only emitted by SelectionDAG ISel at the moment. -
chuongg3 authored
Lowers `G_STORE v4s8, ptr` into `s32 = G_BITCAST v4s8` `G_STORE s32, ptr`
-
Oleksandr "Alex" Zinenko authored
Use the main transform interpreter pass instead of the test pass. The only tests that are not updated are specific to the operation of the test pass.
-
jkorous-apple authored
-
Tuan Chuong Goh authored
-