- Jul 28, 2021
-
-
Matt Arsenault authored
I forgot to squash the test updates for b32d3d9e
-
- Jul 27, 2021
-
-
Stella Laurenzo authored
* Implements all of the discussed features: - Links against common CAPI libraries that are self contained. - Stops using the 'python/' directory at the root for everything, opening the namespace up for multiple projects to embed the MLIR python API. - Separates declaration of sources (py and C++) needed to build the extension from building, allowing external projects to build custom assemblies from core parts of the API. - Makes the core python API relocatable (i.e. it could be embedded as something like 'npcomp.ir', 'npcomp.dialects', etc). Still a bit more to do to make it truly isolated but the main structural reset is done. - When building statically, installed python packages are completely self contained, suitable for direct setup and upload to PyPi, et al. - Lets external projects assemble their own CAPI common runtime library that all extensions use. No more possibilities for TypeID issues. - Begins modularizing the API so that external projects that just include a piece pay only for what they use. * I also rolled in a re-organization of the native libraries that matches how I was packaging these out of tree and is a better layering (i.e. all libraries go into a nested _mlir_libs package). There is some further cleanup that I resisted since it would have required source changes that I'd rather do in a followup once everything stabilizes. * Note that I made a somewhat odd choice in choosing to recompile all extensions for each project they are included into (as opposed to compiling once and just linking). While not leveraged yet, this will let us set definitions controlling the namespacing of the extensions so that they can be made to not conflict across projects (with preprocessor definitions). * This will be a relatively substantial breaking change for downstreams. I will handle the npcomp migration and will coordinate with the circt folks before landing. We should stage this and make sure it isn't causing problems before landing. * Fixed a couple of absolute imports that were causing issues. Differential Revision: https://reviews.llvm.org/D106520
-
Aart Bik authored
The order of testing in two sparse tensor ops was incorrect, which could cause an invalid cast (crashing the compiler instead of reporting the error). This revision fixes that bug. Reviewed By: gussmith23 Differential Revision: https://reviews.llvm.org/D106841
-
Matt Arsenault authored
This is partially a workaround. SILowerI1Copies does not understand unstructured loops. This would result in inserting instructions to merge a mask register in the same block where it was defined in an unstructured loop.
-
Thomas Lively authored
Replace the clang builtins and LLVM intrinsics for the SIMD extmul instructions with normal codegen patterns. Differential Revision: https://reviews.llvm.org/D106724
-
Riccardo Mori authored
This is needed for having the functions isl_{set,map}_n_basic_{set,map} exported to the C++ interface. Some tests have been modified to reflect the isl changes. -
Anastasia Stulova authored
Redefines NULL as nullptr instead of ((void*)0) in C++ for OpenCL. Such internal representation of NULL provides compatibility with C++11 and later language standards. Patch by Topotuna (Justas Janickas)! Differential Revision: https://reviews.llvm.org/D105987
-
Hans Wennborg authored
> `#pragma clang include_instead(<header>)` is a pragma that can be used > by system headers (and only system headers) to indicate to a tool that > the file containing said pragma is an implementation-detail header and > should not be directly included by user code. > > The library alternative is very messy code that can be seen in the first > diff of D106124, and we'd rather avoid that with something more > universal. > > This patch takes the first step by warning a user when they include a > detail header in their code, and suggests alternative headers that the > user should include instead. Future work will involve adding a fixit to > automate the process, as well as cleaning up modules diagnostics to not > suggest said detail headers. Other tools, such as clangd can also take > advantage of this pragma to add the correct user headers. > > Differential Revision: https://reviews.llvm.org/D106394 This caused compiler crashes in Chromium builds involving PCH and an include directive with macro expansion, when Token::getLiteralData() returned null. See the code review for details. This reverts commit e8a64e54.
-
Anirudh Prasad authored
- This patch consists of the bare basic code needed in order to generate some assembly for the z/OS target. - Only the .text and the .bss sections are added for now. - The relevant MCSectionGOFF/Symbol interfaces have been added. This enables us to print out the GOFF machine code sections. - This patch enables us to add simple lit tests wherever possible, and contribute to the testing coverage for the z/OS target - Further improvements and additions will be made in future patches. Reviewed By: tmatheson Differential Revision: https://reviews.llvm.org/D106380
-
Anna Thomas authored
When hoisting/moving calls to locations, we strip unknown metadata. Such calls are usually marked `speculatable`, i.e. they are guaranteed to not cause undefined behaviour when run anywhere. So, we should strip attributes that can cause immediate undefined behaviour if those attributes are not valid in the context where the call is moved to. This patch introduces such an API and uses it in relevant passes. See updated tests. Fix for PR50744. Reviewed By: nikic, jdoerfert, lebedev.ri Differential Revision: https://reviews.llvm.org/D104641
-
Marek Kurdej authored
* https://wg21.link/P2166 Reviewed By: ldionne, #libc Differential Revision: https://reviews.llvm.org/D106801
-
David Spickett authored
This adds memory tag writing to Process and the GDB remote code. Supporting work for the "memory tag write" command. (to follow) Process WriteMemoryTags is similair to ReadMemoryTags. It will pack the tags then call DoWriteMemoryTags. That function will send the QMemTags packet to the gdb-remote. The QMemTags packet follows the GDB specification in: https://sourceware.org/gdb/current/onlinedocs/gdb/General-Query-Packets.html#General-Query-Packets Note that lldb-server will be treating partial writes as complete failures. So lldb doesn't need to handle the partial write case in any special way. Reviewed By: omjavaid Differential Revision: https://reviews.llvm.org/D105181
-
Jeremy Morse authored
Avoid several crashes when DBG_INSTR_REF and DBG_PHI instructions are fed to the instruction scheduler. DBG_INSTR_REFs should be treated like DBG_LABELs, and just ignored for the purpose of scheduling [0]. DBG_PHIs however behave much more like DBG_VALUEs: they refer to register operands, and if some register defs get shuffled around during instruction scheduling, there's a risk that the debug instr will refer to the wrong value. There's already a facility for updating DBG_VALUEs to reflect this; add DBG_PHI to the list of instructions that it will update. [0] Suboptimal, but it's what instr scheduling does right now. Differential Revision: https://reviews.llvm.org/D106663
-
Vassil Vassilev authored
We have the basic infrastructure in place. We can recover from simple errors (recovering from errors in template instantiations is not yet supported). It looks like we are in a reasonably functional state for llvm13. Differential revision: https://reviews.llvm.org/D106813
-
Louis Dionne authored
-
Tres Popp authored
-
Anna Thomas authored
The Exit instruction passed in for checking if it's an ordered reduction need not be an FPAdd operation. We need to bail out at that point instead of assuming it is an FPAdd (and hence has two operands). See added testcase. It crashes without the patch because the Exit instruction is a phi with exactly one operand. This latent bug was exposed by 95346ba8 which added support for multi-exit loops for vectorization. Reviewed-By: kmclaughlin Differential Revision: https://reviews.llvm.org/D106843
-
Chris Jackson authored
This reapplies commit 76f3ffb2 that was reverted due to buildbot failures. - Update lit tests with REQUIRES condition. - Abandon salvage attempt if SCEVUnknown::getValue() returns nullptr. Differential Revision: https://reviews.llvm.org/D105207
-
Kadir Cetinkaya authored
This reverts commit 04e21fbc.
-
Kadir Cetinkaya authored
Set driver mode before parsing arglist. Depends on D106789. Differential Revision: https://reviews.llvm.org/D106794
-
Kadir Cetinkaya authored
Also use it in other places that performed it on their own. Differential Revision: https://reviews.llvm.org/D106789
-
Jeremy Morse authored
When working out which instruction defines a value, the instruction-referencing variable location code has a few special cases for physical registers: * Arguments are never defined by instructions, * Constant physical registers always read the same value, are never def'd This patch adds a third case for the llvm.frameaddress intrinsics: you can read the framepointer in any block if you so choose, and use it as a variable location, as shown in the added test. This rather violates one of the assumptions behind instruction referencing, that LLVM-ir shouldn't be able to read from an arbitrary register at some arbitrary point in the program. The solution for now is to just emit a DBG_PHI that reads the register value: this works, but if we wanted to do something clever with DBG_PHIs in the future then this would probably get in the way. As it stands, this patch avoids a crash. Differential Revision: https://reviews.llvm.org/D106659
-
Chris Jackson authored
This reverts commit 76f3ffb2 because of a failure on sanitixer-X86-64-linux-autoconf.
-
Sam McCall authored
Useful in logs to understand issues around some platforms we don't have much experience with (e.g. m1, mingw) Differential Revision: https://reviews.llvm.org/D105681
-
Andrzej Warzynski authored
`-Mfixed` is not supported by the new driver and hence `flang`, the bash wrapper script, forwards it to the host compiler. The forwarded options are used by the host compiler when compiling the unparsed files. As the unparsed source files are always in the free form, forwarding `-Mfixed` is problematic. With this patch, `-Mfixed` (and `-Mfree` for consistency) will be ignored altogether. The user will only see a warning. This is not a particularly sound approach, but `flang` is only a temporary solution for us and this workaround is a fair compromise. Differential Revision: https://reviews.llvm.org/D106428
-
Sam McCall authored
With GCC <6 constructing a function_ref from a free function reference leads to it referencing a temporary function pointer. If the lifetime of that temporary is insufficient it can crash. Fixes https://github.com/clangd/clangd/issues/800
-
Chris Jackson authored
This patch extends salvaging of debuginfo in the Loop Strength Reduction (LSR) pass by translating Scalar Evaluations (SCEV) into DIExpressions. The method is as follows: - Cache dbg.value intrinsics that are salvageable. - Obtain a loop Induction Variable (IV) from ScalarExpressionExpander or the loop header. - Translate the IV SCEV into an expression that recovers the current loop iteration count. Combine this with the dbg.value's location op SCEV to create a DIExpression that salvages the value. Review by: jmorse Differential Revision: https://reviews.llvm.org/D105207
-
Raphael Isemann authored
Speculative fix for the failing lldb-aarch64-ubuntu bot.
-
Vignesh Balasubramanian authored
OMPD is enabled by default on Linux machines and disabled on others. However, if explicitly enabled it throws an error and exit while configuring. It is mentioned in Bug: https://bugs.llvm.org/show_bug.cgi?id=51121 This patch, instead of throwing error, disables OMPD support with a warning message, so configuration can continue. Reviewed By: @protze.joachim Differential Revision: https://reviews.llvm.org/D106682
-
Nico Weber authored
This reverts the functional change of https://reviews.llvm.org/D35385 because it sounds like this is no longer necessary (https://bugs.llvm.org/show_bug.cgi?id=51135#c11) and makes clang's behavior more uniform across platforms. Differential Revision: https://reviews.llvm.org/D106733
-
Chen Zheng authored
-
Fraser Cormack authored
-
Simon Pilgrim authored
-
David Spickett authored
This is implemented using the QMemTags packet, as specified by GDB in: https://sourceware.org/gdb/current/onlinedocs/gdb/General-Query-Packets.html#General-Query-Packets (recall that qMemTags was previously added to read tags) On receipt of a valid packet lldb-server will: * align the given address and length to granules (most of the time lldb will have already done this but the specification doesn't guarantee it) * Repeat the supplied tags as many times as needed to cover the range. (if tags > range we just use as many as needed) * Call ptrace POKEMTETAGS to write the tags. The ptrace step will loop just like the tag read does, until all tags are written or we get an error. Meaning that if ptrace succeeds it could be a partial write. So we call it again and if we then get an error, return an error to lldb. We are not going to attempt to restore tags after a partial write followed by an error. This matches the behaviour of the existing memory writes. The lldb-server tests have been extended to include read and write in the same test file. With some updated function names since "qMemTags" vs "QMemTags" isn't very clear when they're next to each other. Reviewed By: omjavaid Differential Revision: https://reviews.llvm.org/D105180
-
Sander de Smalen authored
The loop vectorizer may decide to use tail folding when the trip-count is low. When that happens, scalable VFs are no longer a candidate, since tail folding/predication is not yet supported for scalable vectors. This can be re-enabled in a future patch. Reviewed By: kmclaughlin Differential Revision: https://reviews.llvm.org/D106657
-
Diana Picus authored
-
Diana Picus authored
We used to test that end > start, but it can well be >= (otherwise the loop doesn't make sense).
-