- May 17, 2022
-
-
Nikita Popov authored
This allows us to compute known high bits. It's not optimal, but better than nothing.
-
Fraser Cormack authored
This patch adds a simple test which demonstrates a miscompilation of 16-byte-aligned scalar (non-RVV) objects when combined with RVV stack objects. The RISCV stack is assumed to be aligned to 16 bytes, and this is guaranteed/assumed to be true when setting up the stack. However, when the stack contains RVV objects, we decrement the stack pointer by some multiple of vlenb, which is only guaranteed to be aligned to 8 bytes. This means that non-RVV objects specifically requiring 16-byte alignment fall through the cracks and are misaligned. Objects requiring larger alignment trigger stack realignment and thus should be okay. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D125382
-
Fraser Cormack authored
The documentation for this specifically mentions that this should not happen. We could think about adding target hooks to permit it (and how to merge IDs) in the future if that is desirable. This specific test case was merging a scalable-vector slot into a non-scalable one and dropping the notion of scalability, meaning we failed to allocate enough stack space for the object. Reviewed By: arsenm, MaskRay, sdesmalen Differential Revision: https://reviews.llvm.org/D125699
-
Nikita Popov authored
Checking whether two KnownBits are the same is somewhat common, mainly in test code. I don't think there is a lot of room for confusion with "determine what the KnownBits for an icmp eq would be", as that has a different result type (this is what the eq() method implements, which returns Optional<bool>). Differential Revision: https://reviews.llvm.org/D125692
-
Peixin-Qiao authored
As Fortran 2018 15.8.1(3), in a reference to an elemental procedure, if any argument is an array, each actual argument that corresponds to an INTENT (OUT) or INTENT (INOUT) dummy argument shall be an array. Add this semantic check. Reviewed By: klausler Differential Revision: https://reviews.llvm.org/D125685
-
Peixin-Qiao authored
This supports the lowering parse-tree to MLIR for ordered clause in worksharing-loop directive. Also add the test case for operation conversion. Part of this patch is from the fir-dev branch of https://github.com/flang-compiler/f18-llvm-project . Co-authored-by:
Sourabh Singh Tomar <SourabhSingh.Tomar@amd.com> Reviewed By: kiranchandramohan, NimishMishra Differential Revision: https://reviews.llvm.org/D125456
-
luxufan authored
Reviewed By: kito-cheng Differential Revision: https://reviews.llvm.org/D123978
-
jacquesguan authored
Add support for translating llvm::InsertElement and llvm::ExtractElement. Differential Revision: https://reviews.llvm.org/D125674
-
Chuanqi Xu authored
function in promise_type According to https://cplusplus.github.io/CWG/issues/2585.html, this fixes https://github.com/llvm/llvm-project/issues/54881 Simply, the clang tried to found (do lookup and overload resolution. Is there any better word to use than found?) allocation function in promise_type and global scope. However, this is not consistent with the standard. The standard behavior would be that the compiler shouldn't lookup in global scope in case we lookup the allocation function name in promise_type. In other words, the program is ill-formed if there is incompatible allocation function in promise type. Reviewed By: erichkeane Differential Revision: https://reviews.llvm.org/D125517
-
Mitch Phillips authored
This reverts commit 4680982b. Broke a fuchsia windows bot. More details in the review: https://reviews.llvm.org/D123534
-
Vy Nguyen authored
Need -DAG in the first expect statement too
-
wren romano authored
This is a followup to D125431, to keep from confusing the machinery that generates diffs (since combining these two changes into one would obfuscate the changes actually made in the previous differential). Depends On D125431 Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D125432
-
Thomas Lively authored
to reflect the latest state of the proposal: https://github.com/WebAssembly/relaxed-simd/blob/main/proposals/relaxed-simd/Overview.md#binary-format. Moves code around to match the instruction order from the proposal, but the only functional changes are to the names and opcodes. Reviewed By: aheejin Differential Revision: https://reviews.llvm.org/D125726
-
https://reviews.llvm.org/D125732Vy Nguyen authored
Details: The test was incorrectly expecting the error messages for the export symbols to have a particular order. It shouldn't because the export symbol list is processed concurrently.
-
Vy Nguyen authored
The metadata seems to be demangled differently
-
Philip Reames authored
Our current implementation of the InsertVSETVLI dataflow allows phase 3 to arrive at a different block end state than the data flow in phase 1/2 computed. This arises because a block which contains instructions (e.g. load or stores) which don't consume all the incoming bits of the VL/VTYPE can be compatible with multiple incoming states. The algorithm effectively changes the SEW on such instructions, and propagates the prior state forward. As phase 3 uses the block input state for this propagation, but phase 1/2 doesn't, this can result in different block end states. If we don't correct for it, this discrepancy can result in miscompiles. This was the source of multiple recent bugs. However, by now we have fixes for all known correctness issues. The basic strategy we use is to insert a compensation vsetvli to bring the block state leaving the block back into consistency with the one computed. This is correct, but results in extra vsetvlis being placed at the end of blocks. This change adjusts the phase 1/2 algorithm to propagate the incoming block state through the block, allowing the compatibility rules to modify the end state. The algorithm may need to run slightly more iterations, but the end result is consistent with what phase 3 does. The benefit of doing this is two fold. First, we reverse some of the code quality introductions introduced in the functional fixes. Second, we simplify the invariants, and allow the strict assertions to be enabled. Several humans, myself included, have found it quite surprising that invariant didn't hold already, and arguably that confusion is the cause of several of our recent miscompiles in this code. The downside to this patch is that the dataflow may require additional iterations to stabilize. In the worse case, we go from O(Edges) to O(E + UniquePaths) as the incoming state (and thus the outgoing one) can now change once for each path from the entry block. Differential Revision: https://reviews.llvm.org/D125232
-
Philip Reames authored
We've got a lurking problem with our data flow implementation where different phases disagree, resulting in possible miscompiles. D119518 introduced a workaround, but failed to consider blocks which only contain load/stores compatible with their incoming state. When I went to rebase and simplify D125232, it turned out that not all of the correctness issues had been fixed yet after all. This is the correctness fix accidentally embedded in the original more complicated version. Note that the test changes here are mostly regressions. It's worth noting that the simplified version of D125232 exactly reverses all the non-functional diffs in the test caused here. D125232 should be the immediate following commit. Differential Revision: https://reviews.llvm.org/D125703
-
Grace Jennings authored
This patch sorts unit test targets into directories corresponding to the test source file directories to improve target navigation. Reviewed By: smeenai Differential Revision: https://reviews.llvm.org/D124810
-
Mitch Phillips authored
An upcoming patch will extend llvm-symbolizer to provide the source line information for global variables. The goal is to move AddressSanitizer off of internal debug info for symbolization onto the DWARF standard (and doing a clean-up in the process). Currently, ASan reports the line information for constant strings if a memory safety bug happens around them. We want to keep this behaviour, so we need to emit debuginfo for these variables as well. Reviewed By: dblaikie, rnk, aprantl Differential Revision: https://reviews.llvm.org/D123534
-
Vy Nguyen authored
PR/55512 Reviewed By: keith Differential Revision: https://reviews.llvm.org/D125732
-
River Riddle authored
-
River Riddle authored
This commit enables proper highlighting when inner statements are outside of a constraint/pattern/etc. This shouldn't really happen in actual code, but can happen in documentation (which uses the same syntax grammar).
-
wren romano authored
In addition to reducing code repetition, this also helps ensure that the various API functions follow the naming convention of mlir::sparse_tensor::primaryTypeFunctionSuffix (e.g., due to typos in the repetitious code). Depends On D125428 Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D125431
-
Philip Reames authored
The existing redundant copy elimination required a virtual register source, but the same logic works for any physreg where we don't have to worry about clobbers. On RISCV, this helps eliminate redundant CSR reads from VLENB. Differential Revision: https://reviews.llvm.org/D125564
-
Ben Dunbobbin authored
Remove errant whitespace. AIX uses big archive format so check for both !<arch> and <bigaf>. Only the "gnu" format has thin archives; specify --format=gnu for thin archive test-cases.
-
River Riddle authored
-
Keith Smiley authored
All of the other tests here either check that the copy fails, or that the resulting binary is the same, it seems like this check was omitted for the universal object case. Differential Revision: https://reviews.llvm.org/D125478
-
River Riddle authored
This follows the same general structure of the MLIR and PDLL language servers. This commits adds the basic functionality for setting up the server, and initially only supports providing diagnostics. Followon commits will build out more comprehensive behavior. Realistically this should eventually live in llvm/, but building in MLIR is an easier initial step given that: * All of the necessary LSP functionality is already here * It allows for proving out useful language features (e.g. compilation databases) without affecting wider scale tablegen users * MLIR has a vscode extension that can immediately take advantage of it Differential Revision: https://reviews.llvm.org/D125440
-
Ken Matsui authored
This patch is itended to avoid suggesting typoed directives in `.S` files to support the cases of `#` directives treated as comments or various pseudo-ops. The feature is implemented in https://reviews.llvm.org/D124726. Fixes: https://reviews.llvm.org/D124726#3516346. Reviewed By: nickdesaulniers Differential Revision: https://reviews.llvm.org/D125727
-
wren romano authored
This enables the compiler to perform devirtualization. And benchmarks indicate devirtualization can sometimes give considerable speedup. Depends On D122061 Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D125428
-
wren romano authored
Fixes: https://github.com/llvm/llvm-project/issues/51652 Depends On D122060 Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D122061
-
River Riddle authored
In the overwhelmingly majority of cases only one dialect is generated at a time anyways, and this restriction more easily catches user error when multiple dialects might be generated. We hit this semi-recently with the PDL dialect, and circt+other downstream users are also actively hitting this as well. Differential Revision: https://reviews.llvm.org/D125651
-
Jason Molenda authored
This patch addresses two perf issues when we find a dSYM on macOS after calling into the DebugSymbols framework. First, when we have a local (probably stripped) binaary, we find the dSYM and we may be told about the location of the symbol rich binary (probably unstripped) which may be on a remote filesystem. We don't need the unstripped binary, use the local binary we already have. Second, after we've found the path to the dSYM, save that in the Module so we don't call into DebugSymbols a second time later on to rediscover it. If the user has a DBGShellCommands set, we need to exec that process twice, serially, which can add up. Differential Revision: https://reviews.llvm.org/D125616 rdar://84576917
-
Joseph Huber authored
The Clang driver additional stages to build a complete offloading program for applications using CUDA or OpenMP offloading. This normally requires either a source file input or a valid object file to be handled. This would cause problems when trying to compile an assembly or LLVM IR file through clang with flags that would enable offloading. This patch simply adds a check to prevent the offloading toolchain from being used if we don't have a valid source file. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D125705
-
Joseph Huber authored
The OpenMP device offloading library is a bitcode library and thus only expect to build and linked with the same version of clang that was used to create it. This somewhat copmlicates the building process as we require the Clang that was just built to be used to create the library. This is either done with a two-step build, where OpenMP is built with the Clang that was just installed, or through the `-DLLLVM_ENABLE_RUNTIMES=openmp` option. This has always been the case, but recent changes have caused this to make it difficult to build the rest of OpenMP. This patchs adds a check to not build the OpenMP device runtime if the current compiler is not Clang with the same version as the LLVM installation. This should allow users to build OpenMP as a project using any compiler without it erroring out due to the bitcode library, but if users require it they will need to use the above methods to compile it. Reviewed By: jdoerfert, tianshilei1992, ye-luo Differential Revision: https://reviews.llvm.org/D125698
-
Alex Zinenko authored
Op registration mechanism does not allow for ops with the same name to be re-registered. This is okay to avoid name conflicts and debug double-registration, but may be problematic for dialect extensions that may get registered several times (unlike dialects that are deduplicated in the registry). When registering ops through the Transform dialect extension mechanism, check first if the ops are already registered and only complain in the case of repeated registration with the same name but different TypeID. Differential Revision: https://reviews.llvm.org/D125554
-
Jonas Devlieghere authored
Avoid a OverflowError (an underflow really) when the pc is zero. This can happen for "unknown frames" where the crashlog generator reports a zero pc. We could omit them altogether, but if they're part of the crashlog it seems fair to display them in lldb as well. rdar://92686666 Differential revision: https://reviews.llvm.org/D125716
-
Sanjay Patel authored
This reverts commit 3794cc0e. This change is suspected of causing bots to hang at stage 2 compiles, so reverting to confirm and investigate.
-
Martin Storsjö authored
This allows sharing opcodes between prolog and epilog even when there is more than one epilog. I didn't make any handcrafted special MC level testcases for this (yet at least), but it does seem to have the expected effect on two existing CodeGen level testcases. Differential Revision: https://reviews.llvm.org/D125619
-
Martin Storsjö authored
[MC] [Win64EH] Try writing an ARM64 "packed epilog" even if the epilog doesn't share opcodes with the prolog The "packed epilog" form only implies that the epilog is located exactly at the end of the function (so the location of the epilog is implicit from the epilog opcodes), but it doesn't have to share opcodes with the prolog - as long as the total number of opcode bytes and the offset to the epilog fit within the bitfields. This avoids writing a 4 byte epilog scope in many cases. (I haven't measured how much this shrinks actual xdata sections in practice though.) Differential Revision: https://reviews.llvm.org/D125536
-