- Jan 05, 2024
-
-
Christian Ulmann authored
This commit adds a distinct attribute parameter to the DICompileUnit to enable the modeling of distinctness. LLVM requires DICompileUnits to be distinct and there are cases where one gets two equivalent compilation units but LLVM still requires differentiates them. We observed such cases for combinations of LTO and inline functions. This patch also changes the DIScopeForLLVMFuncOp pass to a module pass, to ensure that only one distinct DICompileUnit is created, instead of one for each function.
-
- Jan 04, 2024
-
-
Craig Topper authored
We can use RISCVISD::VMERGE_VL with an undef passthru operand. I had to rewrite the FMA patterns to handle both undef and non-undef cases so we can get the tail policy.
-
Owen Pan authored
Reuse the patterns governing the previous input file being formatted if the current input file is from the same directory.
-
Jacques Pienaar authored
Make it so that PDL in pattern rewrites can be optionally disabled. PDL is still enabled by default and not optional bazel. So this should be a NOP for most folks, while enabling other to disable. This only works with tests disabled. With tests enabled this still compiles but tests fail as there is no lit config to disable tests that depend on PDL rewrites yet.
-
Mircea Trofin authored
Opcode values changed, trivial fix.
-
Jerry Wu authored
In addition to `lhs()` and `rhs()` to return left and right operands, add `res()` to return the result value.
-
XinWang10 authored
As suggested in https://github.com/llvm/llvm-project/pull/76210, this patch re-organize the mc tests for apx promoted instrs, instr tests within same cpuid would be listed in one test. Also add explicit prefix {evex} tests and 8 displacement memory test, promoted instrs need set No_CD8 to avoid AVX512 compress encoding.
-
Shengchen Kan authored
Four variants: promoted legacy, ND (new data destination), NF (no flags update) and NF_ND (NF + ND). The syntax of NF instructions is aligned with GNU binutils. https://sourceware.org/pipermail/binutils/2023-September/129545.html
-
Micah Weston authored
[SHT_LLVM_BB_ADDR_MAP][AsmPrinter] Implements PGOAnalysisMap emitting in AsmPrinter with tests. (#75202) Uses machine analyses to emit PGOAnalysisMap into the bb-addr-map ELF section. Implements filecheck tests to verify emitting new fields. This patch emits optional PGO related analyses into the bb-addr-map ELF section during AsmPrinter. This currently supports Function Entry Count, Machine Block Frequencies. and Machine Branch Probabilities. Each is independently enabled via the `feature` byte of `bb-addr-map` for the given function. A part of [RFC - PGO Accuracy Metrics: Emitting and Evaluating Branch and Block Analysis](https://discourse.llvm.org/t/rfc-pgo-accuracy-metrics-emitting-and-evaluating-branch-and-block-analysis/73902).
-
YunQiang Su authored
On most hardware, FCSR.ABS2008 is set the value same with FCSR.NAN2008. Let's use this behaivor by default. With this commit, `clang -target mips -mnan=2008 -c fabs.c` will imply `-mabs=2008`. And of course, `clang -mnan=2008 -mabs=legacy` can continue workable like previous. Co-authored-by:YunQiang Su <yunqiang.su@cipunited.com>
-
Nick Desaulniers authored
The GCC build is producing the following diagnostic: llvm-project/libc/src/signal/linux/signal_utils.h: In member function ‘__llvm_libc_18_0_0_git::KernelSigaction& __llvm_libc_18_0_0_git::KernelSigaction::operator=(const sigaction&)’: llvm-project/libc/src/signal/linux/signal_utils.h:38:20: warning: cast between incompatible function types from ‘void (*)(int, siginfo_t*, void*)’ to ‘void (*)(int)’ [-Wcast-function-type] 38 | sa_handler = reinterpret_cast<HandlerType *>(sa.sa_sigaction); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ llvm-project/libc/src/signal/linux/signal_utils.h: In member function ‘__llvm_libc_18_0_0_git::KernelSigaction::operator sigaction() const’: llvm-project/libc/src/signal/linux/signal_utils.h:51:25: warning: cast between incompatible function types from ‘void (*)(int)’ to ‘void (*)(int, siginfo_t*, void*)’ [-Wcast-function-type] 51 | sa.sa_sigaction = reinterpret_cast<SiginfoHandlerType *>(sa_handler); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Two issues here: 1. Clang supports -Wcast-function-type, but not as part of the -Wextra group. 2. The existing implementation tried to work around the oddity that is the kernel's struct sigaction != POSIX via reinterpret_cast in a way that's not compatible with -Wcast-function-type. Just use a union which is well defined (and two function pointers are the same size.) Link: https://github.com/llvm/llvm-project/issues/76872 Fixes: https://github.com/llvm/llvm-project/issues/74617 -
Boian Petkantchin authored
Make all ops and attributes use the types MeshAxis and MeshAxesAttr instead of int16_t, int32_t, DenseI16ArrayAttr and DenseI32ArrayAttr.
-
Derek Schuff authored
WebAssembly doesn't have a single virtual memory space the way other object formats or architectures do, so "addresses" mean different things depending on the context. Function symbol addresses in object files are offsets from the start of the code section. This is good for linking and relocation. However when dealing with linked binaries, offsets from the start of the file/module are more often used (e.g. for stack traces in browsers), and are more useful for use cases like binary size attribution. This PR changes Object to use the file offset instead of the section offset for function symbols, but only for linked (non-DSO) files. This is a reland of fc5f51cf with a fix for the MSan failure (it was not caused by this change, but it was revealed by the new tests).
-
Aiden Grossman authored
This patch removes the redundant RegisterInitialValues parameter from assembleToStream and friends as it is included within the BenchmarkKey struct that is also passed to all the functions that need this information.
-
Erich Keane authored
Revert "[Clang][Sema] Diagnose unexpanded packs in the template argument lists of function template specializations" (#76876) Reverts llvm/llvm-project#76677 See discussion here: https://github.com/llvm/llvm-project/pull/76677
-
Nicolai Hähnle authored
Consistently treat packed 16-bit operands as 32-bit values, because that's really what they are. The attempt to treat them differently was ultimately incorrect and lead to miscompiles, e.g. when using non-splat constants such as (1, 0) as operands. Recognize 32-bit float constants for i/u16 instructions. This is a bit odd conceptually, but it matches HW behavior and SP3. Remove isFoldableLiteralV216; there was too much magic in the dependency between it and its use in SIFoldOperands. Instead, we now simply rely on checking whether a constant is an inline constant, and trying a bunch of permutations of the low and high halves. This is more obviously correct and leads to some new cases where inline constants are used as shown by tests. Move the logic for switching packed add vs. sub into SIFoldOperands. This has two benefits: all logic that optimizes for inline constants in packed math is now in one place; and it applies to both SelectionDAG and GISel paths. Disable the use of opsel with v_dot* instructions on gfx11. They are documented to ignore opsel on src0 and src1. It may be interesting to re-enable to use of opsel on src2 as a future optimization. A similar "proper" fix of what inline constants mean could potentially be applied to unpacked 16-bit ops. However, it's less clear what the benefit would be, and there are surely places where we'd have to carefully audit whether values are properly sign- or zero-extended. It is best to keep such a change separate. Fixes: Corruption in FSR 2.0 (latent bug exposed by an LLPC change)
-
Alex Langford authored
BreakpointResolverAddress optionally can include the module name related to the address that gets resolved. Currently this will never work because it sets the name to itself (which is empty).
-
Yuxuan Chen authored
As in title, https://github.com/llvm/llvm-project/commit/a8f43974260ec244d78336d2530f8fc097753580 broke CI due to the calling convention not available on certain targets. This patch uses a simpler calling convention and enables the test only when the attribute exists. It's verified that this test crashes the compiler before a8f43974 so it's the same effect as the previous test. Disabling the test on platforms that don't have the calling convention is fine because it's guarding against a frontend bug.
-
Ahmed Bougacha authored
The upstream test relies on jump-tables, which are lowered in dramatically different ways with later arm64e/ptrauth patches. Concretely, it's failing for at least two reasons: - ptrauth removes x16/x17 from tcGPR64 to prevent indirect tail-calls from using either register as the callee, conflicting with their usage as scratch for the tail-call LR auth checking sequence. In the 1/2_available_regs_left tests, this causes the MI scheduler to move the load up across some of the inlineasm register clobbers. - ptrauth adds an x16/x17-using pseudo for jump-table dispatch, which looks somewhat different from the regular jump-table dispatch codegen by itself, but also prevents compression currently. They seem like sensible changes. But they mean the tests aren't really testing what they're intented to, because there's always an implicit x16/x17 clobber when using jump-tables. This updates the test in a way that should work identically regardless of ptrauth support, with one exception, #1 above, which merely reorders the load/inlineasm w.r.t. eachother. I verified the tests still fail the live-reg assertions when applicable.
-
Andrzej Warzyński authored
A mix of "Transform dialect" and "transform dialect" is used ATM. This patch capitalizes the outstanding instances of "transform".
-
Craig Topper authored
[DAGCombiner][RISCV] Preserve disjoint flag in folding (shl (or x, c1), c2) -> (or (shl x, c2), c1 << c2) (#76860) Since we are shifting both inputs to the original Or by the same amount and inserting zeros in the LSBs, the result should still be disjoint.
-
Muhammad Omair Javaid authored
This reverts commit 9191ac0b. Breaks build on following buildbot: https://lab.llvm.org/buildbot/#/builders/177/builds/27432
-
Florian Hahn authored
Simplify the code and rename Result->NewExitingVPV as suggested by @ayalz in https://github.com/llvm/llvm-project/pull/70253.
-
David Goldblatt authored
As requested in https://github.com/llvm/llvm-project/pull/76770#pullrequestreview-1801649466 A few months of experimentation in a large codebase did not reveal any significant build speed regressions, and b07bf16a speeds up hint lookup even further. Co-authored-by:
David Goldblatt <davidgoldblatt@meta.com>
-
Krzysztof Drewniak authored
Expand the copying of attributes on GPU kernel arguments during LLVM lowering. Support copying attributes from values that are already LLVM pointers. Support copying attributes, like `noundef`, that aren't specific to (the pointer parts of) arguments.
-
Craig Topper authored
After 47a1704a we are able to reassociate a disjoint Or used as a GEP index to get the constant closer to a load to fold it. This is show by the first test. We are not able to do this if the GEP created a shift left to scale the index as the second test shows. To make this work, we need to preserve the disjoint flag when pulling the Or through the shift.
-
Craig Topper authored
Keep the haveNoCommonBitsSet check because we haven't started inferring the flag yet. I've added tests for two transforms, but these are not the only transforms that use isADDLike.
-
Krystian Stasiowski authored
[Clang][Sema] Diagnose unexpanded packs in the template argument lists of function template specializations (#76677) This diagnoses unexpanded packs in the _unqualified-id_ of a function template specialization's _declarator-id_. For example: ```cpp template<typename... Ts> struct A { template<typename U> void f(); template<> void f<Ts>(); // error: explicit specialization contains unexpanded parameter pack 'Ts' }; ``` I moved the handling of template-id's so it happens right after we determine whether we are declaring a function template/function template specialization so diagnostics are issued in lexical order. -
Alexey Bataev authored
vectorized. If the insertelement instruction is vectorized, and the extractelement instruction from such insertelement also vectorized as part of the same tree, need to extract from the corresponding for insertelement vectorized value rather than original insertelement instruction.
-
Craig Hesling authored
Fix one spelling typo and remove second newline from end of files.
-
Hassnaa Hamdi authored
Ex: `fdot v26.8H, v22.16B, v9.2B[0]` should be equivalent to `fdot v26.8h, v22.16b, v9.2b[0]`
-
Jacques Pienaar authored
Make it so that PDL in pattern rewrites can be optionally disabled. PDL is still enabled by default and not optional bazel. So this should be a NOP for most folks, while enabling other to disable. This is piped through mlir-tblgen invocation and that could be changed/avoided by splitting up the passes file instead. This only works with tests disabled. With tests enabled this still compiles but tests fail as there is no lit config to disable tests that depend on PDL rewrites yet.
-
Alex Zinenko authored
The change in c1eab576 fixed the behavior of `getDiscardableAttrDictionary` for ops that are not using properties to only return discardable attributes. AsmPrinter was relying on the wrong behavior when printing such ops in the generic form, assuming all attributes are discardable.
-
Puyan Lotfi authored
This PR adds API `makeReproducer` and cl::opt flag `--mlir-generate-reproducer=<filename>` in order to allow for mlir reproducer dumps even when the pipeline doesn't crash. This PR also decouples the code that handles generation of an MLIR reproducer from the crash recovery portion. The purpose is to allow for generating reproducers outside of the context of a compiler crash. This will be useful for frameworks and runtimes that use MLIR where it is needed to reproduce the pipeline behavior for reasons outside of diagnosing crashes. An example is for diagnosing performance issues using offline tools, where being able to dump the reproducer from a runtime compiler would be helpful.
-
Han-Chung Wang authored
-
Hugo Melder authored
This PR updates the list of architectures for which libobjc2 has fast-path objc_msgSend implementations. Related to: https://github.com/gnustep/libobjc2/pull/261
-
Arthur Eubanks authored
Revert "Reapply "RegisterCoalescer: Add implicit-def of super register when coalescing SUBREG_TO_REG"" This reverts commit 0e46b49d. Causes crashes, see repro on https://github.com/llvm/llvm-project/commit/0e46b49de43349f8cbb2a7d4c6badef6d16e31ae.
-
Arthur Eubanks authored
This reverts commit 5cfc7b33. This depends on 0e46b49d which is being reverted.
-