- Oct 25, 2023
-
-
Tom Eccles authored
These turn out to be useful for spec2017/fotonik3d and safe so long as they are not used along side TBAA tags for local allocations. LLVM may be able to figure out local allocations by itself anyway. PR #68727
-
David Spickett authored
So we only have to read cpuinfo once.
-
Momchil Velikov authored
There is a report about a large compile time regression in V8 when generating debug info.
-
Jim Lin authored
-
Oliver Stannard authored
Currently, the SLS hardening pass is run before the machine outliner, which means that the outliner creates new functions and calls which do not have the SLS hardening applied. The fix for this is to move the SLS passes to after the outliner, as has recently been done for the return address signing pass. This also avoids a bug where the SLS outliner emits code with instructions after a return, which the outliner doesn't correctly handle. Reviewed By: kristof.beyls Differential Revision: https://reviews.llvm.org/D158511
-
Markus Böck authored
The current verifier stopped verification with a success value as soon as a type was encountered that cannot be indexed into. The correct behaviour in this case is to error out as there are too many indices for the element type. Not doing so leads to bad user-experience as an invalid GEP is likely to fail only later during LLVM IR translation. This PR implements the correct verification behaviour. Some tests upstream had to also be fixed as they were creating invalid GEPs. Fixes https://github.com/llvm/llvm-project/issues/70168
-
Carlos Alberto Enciso authored
Do not emit call to llvm.dbg.declare when the variable declaration is a DecompositionDecl as its instance class is always unnamed. The emitted debug declare looks like: call void @llvm.dbg.declare(metadata ..., metadata !xx, metadata ...) !xx = !DILocalVariable(scope: !..., file: !..., line: ..., type: !...)
-
Nikita Popov authored
This fold requires a fold against a constant, which will always be on the RHS. If the swapped fold actually did trigger, it would result in a miscompile, because it did not work with the swapped predicate when swapping operands.
-
Oliver Stannard authored
Differential Revision: https://reviews.llvm.org/D158512
-
Nikita Popov authored
The eq/ne pattern being matched will get canonicalized to the ugt/ult form.
-
Benjamin Maxwell authored
This cuts down on a fair amount of boilerplate. Depends on: #68695
-
long.chen authored
add a verifier for tosa::sliceOp
-
David Spickett authored
Fixes #68987 Early on we load the interpreter (most commonly ld-linux) in LoadInterpreterModule. Then later when we get the first DYLD rendezvous we get a list of libraries that commonly includes ld-linux again. Previously we would load this duplicate, see that it was a duplicate, and unload it. Problem was that this unloaded the section information of the first copy of ld-linux. On platforms where you can place a breakpoint using only an address, this wasn't an issue. On ARM you have ARM and Thumb modes. We must know which one the section we're breaking in is, otherwise we'll go there in the wrong mode and SIGILL. This happened on ARM when lldb tried to call mmap during expression evaluation. To fix this, I am making the assumption that the base address we see in the module prior to loading can be compared with what we know the interpreter base address is. Then we don't have to load the module to know we can ignore it. This fixes the lldb test suite on Ubuntu versions where https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/1927192 has been fixed. Which was recently done on Jammy.
-
David Spickett authored
FEAT_SME_FA64 (smefa64 in Linux cpuinfo) allows the use of the full A64 instruction set while in streaming SVE mode. See https://developer.arm.com/documentation/ddi0616/latest/ for details. This means for example if we want to write to the ffr register during or use floating point registers while in streaming mode, we need this extension. I initially was using QEMU which has it by default, and switched to Arm's FVP which does not. So this change adds a more strict check and converts most of the tests to use that. It would be possible in some cases to avoid the offending instructions but it would be a lot of effort and liable to fail randomly as the C library changes. It is also my assumption that the majority of systems will have smefa64 as QEMU has chosen to have. If I turn out to be wrong, we can make the effort to get the tests working without smefa64. `isAArch64SME` remains for some tests, which are as follows: * `test_aarch64_dynamic_regset_config` merely checks for the presence of a register set, which appears for any SME system not just one with smefa64. * `test_aarch64_dynamic_regset_config_sme_za_disabled` only needs the ZA register and does not enter streaming mode. * `test_sme_not_present` tests for the absence of the SME register set, so must be skipped if any form of SME is present. * Various tests in `TestSVERegisters.py` need to know if SME is present at all to generate an expected SVCR value. Earlier in the callstack something else checked `isAArch64SMEFA64` already. * `TestAArch64LinuxTLSRegisters.py` needs to test the `tpidr2` register if any form of SME is present. msr/mrs instructions are used to do this and are allowed even if smefa64 is not present.
-
David Spickett authored
This register reports the configuration of the AArch64 Linux tagged address ABI, part of which is the memory tagging (MTE) settings. It will always be present in core files because even without MTE, there are parts of the tagged address ABI that can be configured (these parts use the Top Byte Ignore feature). I missed adding this when I previously worked on MTE support. Until now you could read memory tags from a core file but not this register.
-
Nikita Popov authored
-
Matthias Springer authored
`foldAttributesIntoMap` is a helper function that folds constant `OpFoldResult` into an affine map. This commit moves the function from the affine dialect to `AffineMap.h`, so that it can be used without depending on the affine dialect.
-
David Spickett authored
Though I doubt that many people will land here directly, I thought it odd that we didn't have one we can at least reference in response to questions. The intro I've copied from the programmer's reference and added a simple example. Then some links to resources and tools, which is the main reason to have this page.
-
Nikita Popov authored
ule/uge with a constant will be converted to ult/ugt, so there is no need to handle these variants.
-
David Spickett authored
This reverts commit 8d80a452. The pointer to the invalidates lists needs to be non-const. Though in this case I don't think it's ever modified. Also I realised that the invalidate list was being set on svg not vg. Should be the other way around.
-
Nikita Popov authored
-
Nikita Popov authored
Gep with zero indices will be folded away independently. It will only be retained for splat geps, for which the transform is not applicable anyway.
-
David Spickett authored
This reverts commit f2c09e5e, due to compilation failures on buildbots.
-
Wang Pengcheng authored
-
David Spickett authored
This fixes a bug where writing vg during streaming mode could prevent you reading za directly afterwards. vg is invalidated just prior to us reading it in AArch64Reconfigure, but svg was not. This lead to some situations where vg would be updated or cleared and re-read, but svg would not be. This meant it had some undefined value which lead to errors that prevented us reading ZA. Likely we received a lot more data than we were expecting. There are at least 2 ways to get into this situation: * Explicit write by the user to vg. * We have just stopped and need to get the potentially new svg and vg. The first is handled by invalidating svg client side before fetching the new one. This also covers some but not all of the second scenario. For the second, I've made writes to vg invalidate svg by noting this in the register information. Whichever one of those kicks in, we'll get the latest value of svg. The bug may depend on timing, I could not find a consistent way to trigger it. I originally found it when checking whether za is disabled after a vg change, so I've added checks for that to TestZAThreadedDynamic. The SVE VG version of the bug did show up on the buildbot, but not consistently. So it's possible that TestZAThreadedDynamic does in fact cover this, but I haven't run it enough times to know.
-
David Spickett authored
As ReadRegister always read into a uint64_t, when it called operator= with uint64_t it was setting the RegisterValue's type to eTypeUInt64 regardless of its size. This mostly works because most registers are 64 bit, and very few bits of code rely on the type being correct. However, cpsr, fpsr and fpcr are in fact 32 bit, and my upcoming register fields code relies on this type being correct. Which is how I found this bug and unfortunately is the only way to test it. As RegisterValue::Type never makes it out via the API anywhere. So this change will be tested once I start adding register field information.
-
Ingo Müller authored
This is a new attempt at #69320. The transform dialect stores a "library module" that the preload pass can populate. Until now, each pass registered an additional module by simply pushing it to a vector; however, the interpreter only used the first of them. This commit turns the registration into "loading", i.e., each newly added module gets merged into the existing one. This allows the loading to be split into several passes, and using the library in the interpreter now takes all of them into account. While this design avoids repeated merging every time the library is accessed, it requires that the implementation of merging modules lives in the TransformDialect target (since it at the dialect depend on each other). This resolves https://github.com/llvm/llvm-project/issues/69111.
-
Karl-Johan Karlsson authored
Constant values of _BitInt have the bitwith to exactly fit the constant number. This patch fix a problem in Sema when building an APInt where the supplied bitwidth can become too small and simply truncate the value leading to a faulty warning.
-
jeanPerier authored
!llvm.ptr<T> typed pointers are depreciated in MLIR LLVM dialects. Flang codegen still generated them and relied on mlir.llvm codegen to LLVM to turn them into opaque pointers. This patch update FIR codegen to directly emit and work with LLVM opaque pointers. Addresses https://github.com/llvm/llvm-project/issues/69303 - All places generating GEPs need to add an extra type argument with the base type (the T that was previously in the llvm.ptr<T> of the base). - llvm.alloca must also be provided the object type. In the process, I doscovered that we were shamelessly copying all the attribute from fir.alloca to the llvm.alloca, which makes no sense for the operand segments. The updated code that cannot take an attribute dictionnary in the llvm.alloca builder with opaque pointers only propagate the "pinned" and "bindc_name" attributes to help debugging the generated IR. - Updating all the places that rely on g...
-
Morten Borup Petersen authored
Fixes #68884.
-
Simon Tatham authored
If clang/test/Driver/cl-offload.cu is run on Unix in a directory whose absolute pathname starts with `/w`, such as the `/workspace` used by at least some Jenkins CI setups, then the file name on the clang command line is misinterpreted as some kind of MSVC warning-control option, and ignored by the catch-all `_SLASH_w` option in Options.td. Other clang-cl tests take care to put a `--` before the input file name, to force clang to treat it as a filename even if it starts with a / and accidentally looks like a cl option. Do the same here.
-
jeanPerier authored
OpenACC/OpenMP atomic lowering needs a finer control over expression lowering. This patch allows mapping evaluate::Expr<T> to mlir::Value so that any subsequent expression lowering will use these values when an operand is a mapped Expr<T>. This is an alternative to https://github.com/llvm/llvm-project/pull/69866 From which I took the test and some of the logic to extract the non-atomic sub-expression. --------- Co-authored-by:
Nimish Mishra <neelam.nimish@gmail.com>
-
Craig Topper authored
This updates our G_SEXTLOAD support to the same level as G_ZEXTLOAD. Still missing some legalizer rules for both though.
-
Craig Topper authored
We weren't legalizing the shift amount to i64.
-
Kazu Hirata authored
C++20 comes with std::erase to erase a value from std::vector. This patch renames llvm::erase_value to llvm::erase for consistency with C++20. We could make llvm::erase more similar to std::erase by having it return the number of elements removed, but I'm not doing that for now because nobody seems to care about that in our code base. Since there are only 50 occurrences of erase_value in our code base, this patch replaces all of them with llvm::erase and deprecates llvm::erase_value.
-
harishch4 authored
…test This fixes failures from a recent merge. [Flang][OpenMP] Port OpenMP single tests to hlfir flow (https://github.com/llvm/llvm-project/pull/69877)
-
Ingo Müller authored
`PyOperations` are Python-level handles to `Operation *` instances. When the latter are modified by C++, the former need to be invalidated. #69746 implements such invalidation mechanism by setting all `PyReferences` to `invalid`. However, that is not enough: they also need to be removed from the `liveOperations` map since other parts of the code (such as `PyOperation::createDetached`) assume that that map only contains valid refs. This is required to actually solve the issue in #69730.
-
Mikhail Gudim authored
Basic way to recursively analyze `select` in `isKnownNonEqual`: `select %c, %t, %f` is non-equal to `%x` if `%t` is non-equal to `%x` and `%f` is non-equal to `%x`.
-
wanglei authored
First, expand all truncationg stores and extending loads. Second, expand everything for `fixedlen_vector_valuetypes`. Finally, we selectively turn on ones that can be effectively codegen'd. Simultaneously, this patch adds floating-point vector types to load/store patterns. Additional test cases will be included in the IR instruction test patchs.
-