- Oct 13, 2022
-
-
Pavel Labath authored
It's fine right now, but will break as soon as someone else declares a PluginProperties class in the same way. Also tighten up the scope of the anonymous namespaces surrounding the other PluginProperties classes.
-
Joseph Huber authored
Summary: Recent changes made the default behaviour to error when given an undefined symbol in a version script. A previous patch fixed this for `libomptarget` by removing the single undefined symbol. However, the plguins are expected to only define a subset of the availible functions so we shouldn't treat it as an error. This patch updates the build flags to work appropriately.
-
Florian Hahn authored
This fixes an UBSan failure after 359bc5c5. For inbounds GEP with index sizes <= 64, having the coefficients overflowing is fine.
-
Valentin Clement authored
When calling a type-bound procedure from a polymoprhic array element, the dynamic type needs to be extracted from the array descriptor and passed to the embox operation for the pass-object. Depends on D135809 Reviewed By: jeanPerier Differential Revision: https://reviews.llvm.org/D135856
-
Joseph Huber authored
Summary: A recent patch made undefined symbols in version scripts cause errors by default. The `omp_get_interop_rc_desc` function is declared but not defined, so it is undefined in the final link unit. This patch removes it from the exports list, it should be added back in when actually defined and used.
-
Tobias Gysi authored
The revision imports compare operations using TableGen generated builders, instead of using the special handlers defined by the Importer. It therefore adds a new llvmArgIndexes field that allows to specify a mapping between MLIR argument and LLVM IR operand indexes if they do not match. Additionally, the FCmp op is extended with an additional builder and all compare operations are extended with verification traits to ensure the operands types match. These extensions simplify the logic of the newly introduced builders and are in line with the compare operations define by the arithmetic dialect. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D135855
-
Jean Perier authored
This document describes a new HLFIR dialect with a new value type (hlfir.expr) and some new higher level FIR operations to make lowering to FIR more straightforward and make pattern matching of high level Fortran concepts (array and character assignments, character operations, and transformational intrinsics) easier in FIR. This should allow implementing the remaining gaps in Fortran 95 features without increasing the lowering code complexity too much, and get a clean start for the remaining F2003 and F2018 features. Differential Revision: https://reviews.llvm.org/D134285
-
Weining Lu authored
On LoongArch, currently neither of "f" and "d" feature is passed from clang driver to cc1 by default. This means the backend generates code for soft float. In order to run programs in current LoongArch machines (hard float environment) this patch temporarily enables "f" and "d" features. In future, we should conditionally turn on these features depend on various clang options, e.g. -mdouble-float, -msingle-float, -msoft-float and -mfpu.
-
WANG Xuerui authored
The old MCJIT won't be accepting new architectures so it can only be appropriate to add ourselves to the exclude list. Differential Revision: https://reviews.llvm.org/D134367
-
WANG Xuerui authored
Similar to D69390 for RISCV, use a guaranteed non-existing insn for llvm.trap and the break insn for llvm.debugtrap. Differential Revision: https://reviews.llvm.org/D134365
-
Rupert Nash authored
The paragraph numbers used previously did not match the C++20 nor C++17 standards. I have updated them to the textual dotted names to avoid this problem in future. Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D135861
-
WANG Xuerui authored
The e_flags of existing object files are all 0x3 which happens to be compatible. From this commit on, all LoongArch objects produced with upstream LLVM will be of object file ABI v1, which is already supported by binutils' master branch (to be released as 2.40), and is allowed by the same binutils version to interlink with v0 objects so the existing distributions have time to migrate. Differential Revision: https://reviews.llvm.org/D134601
-
Sheng authored
To achieve this, we need this observation: `uzp1` is just a `xtn` that operates on two registers For example, given the following register with type v2i64: LSB_______MSB x0 x1 x2 x3 Applying xtn on it we get: x0 x2 This is equivalent to bitcast it to v4i32, and then applying uzp1 on it: x0 x1 x2 x3 | uzp1 v x0 x2 <value from other register> We can transform xtn to uzp1 by this observation, and vice versa. This observation only works on little endian target. Big endian target has a problem: the uzp1 cannot be replaced by xtn since there is a discrepancy in the behavior of uzp1 between the little endian and big endian. To illustrate, take the following for example: LSB____________________MSB x0 x1 x2 x3 On little endian, uzp1 grabs x0 and x2, which is right; on big endian, it grabs x3 and x1, which doesn't match what I saw on the document. But, since I'm new to AArch64, take my word with a pinch of salt. This bevavior is observed on gdb, maybe there's issue in the order of the value printed by it ? Whatever the reason is, the execution result given by qemu just doesn't match. So I disable this on big endian target temporarily until we find the crux. Fixes #57502 Reviewed By: dmgreen, mingmingl Co-authored-by:
Mingming Liu <mingmingl@google.com> Differential Revision: https://reviews.llvm.org/D133850
-
Sam McCall authored
Need to take a break from this, so write down where we got to. Differential Revision: https://reviews.llvm.org/D135696
-
Daniel Grumberg authored
ExtractAPI was emitting a separate symbol for anonymous record declaration that define the type of a member of another record declaration. Now ExtractAPI ignores these declarations and just records the existence of the actual member. Differential Revision: https://reviews.llvm.org/D135804
-
Simon Pilgrim authored
[X86][AVX2] Add shuffle test case where we fail to merge vpunpcklqdq(vextracti128(x,0),vextracti128(x,1)) -> vpermq These are likely to appear during truncation
-
Caroline Concatto authored
First patch in a series adding MC layer support for Scalable Matrix Extension 2 (SME2). This patch adds the following feature: sme2 The 2022 Architecture Extension release adds other feature flags(eg.:sme2.1), that will be in follow-up patches. The reference can be found here: https://developer.arm.com/documentation/ddi0602/2022-09 Differential Revision: https://reviews.llvm.org/D135448
-
Nikita Popov authored
This reverts commit b05f5b90. There are thread sanitizer buildbot failures in simple_stack.c. I think that's because this ended up affecting the handling of volatile accesses to allocas. Reverting for now.
-
Nikita Popov authored
This is in preparation for https://discourse.llvm.org/t/rfc-unify-memory-effect-attributes/65579. FunctionModRefBehavior will be used by attributes, and as such has to be available in IR, not just Analysis. Differential Revision: https://reviews.llvm.org/D135589
-
Sam McCall authored
This check performs an extremely large amount of work (for each variable, it runs very many full matcher-driven traversals of the whole scope the variable is defined in). When (inadvertently) enabled for Fuchsia, it regressed BuildAST times by >10x (400ms -> 7s on my machine). Differential Revision: https://reviews.llvm.org/D135829
-
Valentin Clement authored
In some cases, it is useful to be able to embox a polymorphic entity together with its dynamic type. This patch adds an optional tdesc operand to fir.embox so the dynamic type can be provided while emboxing the entity. This will be used in follow-up patch that lowers tbp calls for element of polymorphic entities array. Reviewed By: jeanPerier Differential Revision: https://reviews.llvm.org/D135809
-
Archibald Elliott authored
fp16 and bf16 values can be used in GCC's inline assembly using the "w" constraint, which means "VFP floating-point registers d0-d31" - fp16 and bf16 values are stored in S registers (which alias the D registers). This change ensures that LLVM is compatible with GCC for programs that use fp16 and the 'w' constraint. Differential Revision: https://reviews.llvm.org/D135662
-
Nikita Popov authored
Don't add argmem if the pointer is clearly not an argument (e.g. a global). I don't think this makes a difference right now, but gives more obvious results with D135780.
-
Nikita Popov authored
-
Florian Hahn authored
Limit pointer decomposition to pointers with index sizes of at most 64 bits. int64_t is used for coefficients, so as long as the index size <= 64 bits we should be able to represent all pointer offsets. Pointer decomposition is limited to inbounds GEPs, so if a index computation would overflow the result is poison, so it doesn't matter that the coefficient overflows. This allows replacing MulOverflow with regular multiplications.
-
Nikita Popov authored
We have to account for accesses to argument memory via captures. I don't think there's any way to make this produce incorrect results right now (because as soon as "other" is set, we lose the ability to infer argmemonly), but this avoids incorrect results once we have more precise representation.
-
Haojian Wu authored
Differential Revision: https://reviews.llvm.org/D135857
-
Bjorn Pettersson authored
-
Bjorn Pettersson authored
-
Bjorn Pettersson authored
-
Bjorn Pettersson authored
-
Simon Tatham authored
MachineInstr's copy constructor works by calling the addOperand method to add each operand of the old MachineInstr to the new one, one by one. But addOperand deliberately avoids trying to replicate ties between operands, on the grounds that the tie refers to operands by index, and the indices aren't necessarily finalized yet. This led to a code generation fault when the machine pipeliner cloned an Arm conditional instruction, and lost the tie between the output register and the input value to be used when the condition failed to execute. Reviewed By: dmgreen Differential Revision: https://reviews.llvm.org/D135434
-
Valentin Clement authored
non-polymorphic derived-type can call type-bound procedure with passed-object. In that case, the derived-type is emboxed in order to be passed to the call. Until now the emboxing was done to a fir.box followed by a fir.convert. This patch update the createBox function so that we can directly embox to a fir.class and avoid the extra fir.convert. Reviewed By: PeteSteinfeld Differential Revision: https://reviews.llvm.org/D135790
-
Nikita Popov authored
Conversion performed using the script at: https://gist.github.com/nikic/98357b71fd67756b0f064c9517b62a34
-
Nikita Popov authored
-
Nikita Popov authored
The code for inferring memory attributes on arguments claims that inalloca/preallocated arguments are always clobbered: https://github.com/llvm/llvm-project/blob/d71ad4108056d685f48407447095d8d92fd7685d/llvm/lib/Transforms/IPO/FunctionAttrs.cpp#L640-L642 However, we would still infer memory attributes for the whole function without taking this into account, so we could still end up inferring readnone for the function. This adds an argument clobber if there are any inalloca/preallocated arguments. Differential Revision: https://reviews.llvm.org/D135783
-
Andi Drebes authored
The MemRef to LLVM conversion pass emits `llvm.alloca` operations to promote MemRef descriptors to the stack when lowering `memref.copy` operations for operands which do not have a contiguous layout in memory. The original stack position is never restored after the allocations, which creates an issue when the copy operation is embedded into a loop with a high trip count, ultimately resulting in a segmentation fault due to the stack growing too large. Below is as a minimal example illustrating the issue: ``` module { func.func @main() { %arg0 = memref.alloc() : memref<32x64xi64> %arg1 = memref.alloc() : memref<16x32xi64> %lb = arith.constant 0 : index %ub = arith.constant 100000 : index %step = arith.constant 1 : index %slice = memref.subview %arg0[16,32][16,32][1,1] : memref<32x64xi64> to memref<16x32xi64, #map> scf.for %i = %lb to %ub step %step { memref.copy %slice, %arg1 : memref<16x32xi64, #map> to memref<16x32xi64> } return } } ``` When running the code above, e.g., with mlir-cpu-runner, the execution crashes with a segmentation fault: ``` $ mlir-opt \ --convert-scf-to-cf \ --convert-memref-to-llvm \ --convert-func-to-llvm --convert-cf-to-llvm \ --reconcile-unrealized-casts <file> | \ mlir-cpu-runner \ -e main -entry-point-result=void \ --shared-libs=$PWD/build/lib/libmlir_c_runner_utils.so [...] Segmentation fault ``` This patch causes the code lowering a `memref.copy` operation in the MemRefToLLVM pass to emit a pair of matching `llvm.intr.stacksave` and `llvm.intr.stackrestore` operations around the promotion of memory descriptors and the subsequent call to `memrefCopy` in order to restore the stack to its original position after the call. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D135756 -
Oleg Shyshkov authored
`getIteratorTypesArray` should be used instead. It's a better substitute for all the current usages of the interface. The current `ArrayAttr iterator_types()` has a few problems: * It creates an assumption operation has iterators types as an attribute, but it's not always the case. Sometime iterator types can be inferred from other attribute, or they're just static. * ArrayAttr is an obscure contained and required extracting values in the client code. * Makes it hard to migrate iterator types from strings to enums ([RFC](https://discourse.llvm.org/t/rfc-enumattr-for-iterator-types-in-linalg/64535/9)). Concrete ops, like `linalg.generic` will still have iterator types as an attribute if needed. As a side effect, this change helps a bit with migration to prefixed accessors. Differential Revision: https://reviews.llvm.org/D135765
-
Benjamin Kramer authored
-
Leon Clark authored
Add FileCheck directives to existing tests in preparation for new tests. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D135788
-