- Feb 28, 2024
-
-
Matthias Springer authored
-
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
-
David Green authored
This is another smaller step of #70452, changing the signature of computeAliasing() from optional<uint64_t> to LocationSize, and follow-up changes in DAGCombiner::mayAlias(). There are some test change due to the previous AA->isNoAlias call incorrectly using an unknown size (~UINT64_T(0)). This should then be improved again in #70452 when the types are known to be scalable.
-
Matthias Springer authored
The dialect conversion maintains sets of "ignored" and "replaced" ops. This change simplifies the two sets, such that all nested ops are included. (This was previously not the case and sometimes only the parent op was included.) This change allows for more aggressive assertions to prevent incorrect rewriter API usage. E.g., accessing ops/blocks/regions within an erased op. A concrete example: I have seen conversion patterns in downstream projects where an op is replaced with a new op, and the region of the old op is afterwards inlined into the newly created op. This is invalid rewriter API usage: ops that were replaced/erased should not be accessed. Nested ops will be considered "ignored", even if they are moved to a different region after the region's parent op was erased (which is illegal API usage). Instead, create a new op, inline the regions, then replace the old op with the new op.
-
Kareem Ergawy authored
Adds basic support for emitting delayed privatizers from flang. So far, only types of symbols are supported (i.e. scalars), support for more complicated types will be added later. This also makes sure that reduction and delayed privatization work properly together by merging the body-gen callbacks for both in case both clauses are present on the parallel construct.
-
Jean Perier authored
-
Timm Bäder authored
-
Timm Bäder authored
We used to run them, but not check if they failed. If they do, the expression is invalid, even if we already have a result. I do have a suspicion that we need to manually call destroyLocals() in more places (everywhere basically?), but I'll wait with that until I have a reproducer at hand.
-
Oleksandr "Alex" Zinenko authored
Transform dialect interpreter is designed to be usable outside of the pass pipeline, as the main program transformation driver, e.g., for languages with explicit schedules. Provide an example of such usage with a couple of tests.
-
Mikhail Goncharov authored
for 04e8653f #83199
-
David Green authored
This prevents us from getting the variable multiple times.
-
Luke Lau authored
The description in #83146 is slightly inaccurate: it relaxes a tail undisturbed vslideup to tail agnostic if we are inserting over the entire tail of the vector **and** we didn't shrink the LMUL of the vector being inserted into. This handles the case where we did shrink down the LMUL via InterSubVT by checking if we inserted over the entire tail of InterSubVT, the actual type that we're performing the vslideup on, not VecVT.
-