- Apr 12, 2022
-
-
Fraser Cormack authored
-
Fraser Cormack authored
-
Nico Weber authored
lib.exe by default exits successfully without writing an output file when no inputs are passed. llvm-lib has the same behavior, for compatibility. This behavior interacts poorly with build systems: If a static library target had no inputs, llvm-lib would not produce an output file, causing ninja (or make, or a similar system) to successfully run that step, but then re-run it on the next build. After this patch, llvm-lib emits a warning in this case, that with /WX can be turned into an error. That way, ninja (or make, or...) will mark the initial build as failed. People who don't like the warning can use /ignore:emptyoutput to suppress it. The warning also points out the existing flag /llvmlibempty which forces creation of an empty .lib file (this is an extension to lib.exe). Differential Revision: https://reviews.llvm.org/D123517
-
Craig Topper authored
This was added before Zve extensions were defined. I think users should use Zve32x or Zve32f now. Though we will lose support for limiting ELEN to 16 or 8, but I hope no one was using that. Reviewed By: frasercrmck Differential Revision: https://reviews.llvm.org/D123418
-
Craig Topper authored
Having an enum with names that contain the string representation of their value doesn't add any value. We can just use the numbers. Reviewed By: kito-cheng, frasercrmck Differential Revision: https://reviews.llvm.org/D123417
-
Martin Storsjö authored
Move them to the only source file that included RegisterInfos_arm64.h that actually used these variables. This silences warnings like these: In file included from lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp:42: lldb/source/Plugins/Process/Utility/RegisterInfos_arm64.h:790:35: warning: ‘g_register_infos_mte’ defined but not used [-Wunused-variable] 790 | static lldb_private::RegisterInfo g_register_infos_mte[] = { | ^~~~~~~~~~~~~~~~~~~~ lldb/source/Plugins/Process/Utility/RegisterInfos_arm64.h:787:35: warning: ‘g_register_infos_pauth’ defined but not used [-Wunused-variable] 787 | static lldb_private::RegisterInfo g_register_infos_pauth[] = { | ^~~~~~~~~~~~~~~~~~~~~~ Differential Revision: https://reviews.llvm.org/D123206 -
Craig Topper authored
We're just trying to canonicalize here and won't be using the constant value returned. The attached test changes are because we were previously commuting a seteq X, (splat_vector 0) because we also have (sub 0, X). The 0 is larger than the element type so we don't detect it as a splat without the AllowTruncation flag. By preventing the commute we are able to match it to the vmseq.vx instruction during isel. We only look for constants on the RHS in isel. Reviewed By: spatel Differential Revision: https://reviews.llvm.org/D123256
-
Martin Storsjö authored
On non-Windows platforms, get_temp_file_name() uses `mkstemp()`, which picks a unique name and creates a file atomically. The Windows implementation uses `_mktemp_s()`, which doesn't create the file. The documentation of `_mktemp_s()` also says that by design, the function uses the same pattern within a process, as long as that file doesn't exist. Thus previously, two consecutive calls to `get_temp_file_name()` on Windows returned the same file name. Try to create the suggested temp file with `_O_EXCL` (marking the file name as already used for future calls to `_mktemp_s`) and retry if we weren't able to exclusively create the file. This fixes the test failures on Windows observed in D122257. Differential Revision: https://reviews.llvm.org/D122612
-
Louis Dionne authored
We build the library with C++20 anyways, so we can use noexcept directly.
-
Siva Chandra Reddy authored
Not all attributes have been added to phtread_attr_t in this patch. They will be added gradually in future patches. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D123423
-
Stephen Tozer authored
Currently in Dexter, every step at which a DexExpectWatchValue/Type does not have the correct value is printed on a separate line. This patch reduces the size of the text output by instead printing each incorrect result (i.e. each incorrect value seen, 'Variable optimized out', and so on) on its own line, alongside a list of the steps at which that result was seen. This makes for much less spam in the output when watches are missing or wrong for many steps. Differential Revision: https://reviews.llvm.org/D120716
-
Vy Nguyen authored
Details: The test previously expected a specific order of those symbols, which is not guaranteed (could change simply due to hashing changes, etc). So we change it to explicitly sort the symbols before checking contents. PR/53026 Differential Revision: https://reviews.llvm.org/D116813
-
- Apr 11, 2022
-
-
Sanjay Patel authored
With one-use, we handle this via demanded-bits. But We need to handle extra uses to improve issue #54750. https://alive2.llvm.org/ce/z/aDYkPv
-
Sanjay Patel authored
-
Florian Hahn authored
This reverts commit 42229b96. This appears to cause crashes on multiple bots.
-
Kadir Cetinkaya authored
- Inline SymbolID hashing to header - Don't collect references for symbols without a SymbolID - Store referenced symbols, rather than separately storing decls and macros. - Don't defer ref collection to end of translation unit - Perform const_cast when updating reference counts (~0.5% saving) - Introduce caching for getSymbolID in SymbolCollector. (~30% saving) - Don't modify symbolslab if there's no definition location - Don't lex the whole file to deduce spelled tokens, just lex the relevant piece (~8%) Overall this achieves ~38% reduction in time spent inside SymbolCollector compared to baseline (on my machine :)). I'd expect the last optimization to affect dynamic index a lot more, I was testing with clangd-indexer on clangd subfolder of LLVM. As clangd-indexer runs indexing of whole TU at once, we indeed see almost every token from every source included in the TU (hence lexing full files vs just lexing referenced tokens are almost the same), whereas during dynamic indexing we mostly index main file symbols, but we would touch the files defining/declaring those symbols, and lex complete files for nothing, rather than just the token location. The last optimization is also a functional change (added test), previously we used raw tokens from syntax::tokenize, which didn't canonicalize trigraphs/newlines in identifiers, wheres Lexer::getSpelling canonicalizes them. Differential Revision: https://reviews.llvm.org/D122894
-
LLVM GN Syncbot authored
-
Simon Pilgrim authored
-
Nikita Popov authored
Even if the GEP is not inbounds, the GEP will have provenance of the global, and accessing past the extent of the global would be undefined behavior.
-
Nikita Popov authored
-
Louis Dionne authored
This supersedes and incoroporates content from both D108906 and D54966, and also some original content. Co-Authored-by:
Marshall Clow <mclow.lists@gmail.com> Co-Authored-by: Gonzalo Brito Gadeschi Differential Revision: https://reviews.llvm.org/D118938
-
Florian Hahn authored
When only a store is sunk, there is no need to create a load in the pre-header, as the result of the load will never get used. The dead load can can introduce UB, if the function is marked as writeonly. Fixes #51248. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D123473
-
Louis Dionne authored
We don't really need to run them.
-
Groverkss authored
This patch makes inheritence from PresburgerSpace for PWMAFunction private. The reasoning for this patch is to prevent implicit conversion to PresburgerSpace from PWMAFunction and to not expose all functions exposed by PresburgerSpace in PWMAFunction. Reviewed By: arjunp Differential Revision: https://reviews.llvm.org/D123076
-
gysit authored
The pattern folds chains of tensor::ExtractSliceOp, tensor::PadOp pairs if they pad different dimensions. Repeated tiling and padding of the tiled dimensions may introduce such chains. This canonicalization pattern folds these chains to a single tensor::ExtractSliceOp, tensor::PadOp pair that pads all dimensions at once, which simplifies vectorization and bufferization. Example: ```mlir %0 = tensor.extract_slice %input[16, 0] [%sz0, 64] [1, 1] : tensor<64x64xf32> to tensor<?x64xf32> %1 = tensor.pad %0 low[0, 0] high[%pw0, 0] { ... } : tensor<?x64xf32> to tensor<8x64xf32> %2 = tensor.extract_slice %1[0, 4] [8, %sz1] [1, 1] : tensor<8x64xf32> to tensor<8x?xf32> %res = tensor.pad %2 nofold low[0, 0] high[0, %pw1] { ... } : tensor<8x?xf32> to tensor<8x4xf32> ``` folds into: ```mlir %0 = tensor.extract_slice %input[16, 4] [%sz0, %sz1] [1, 1] : tensor<64x64xf32> to tensor<?x?xf32> %res = tensor.pad %0 nofold low[0, 0] high[%pw0, %pw1] { ... } : tensor<?x?xf32> to tensor<8x4xf32> ``` Reviewed By: nicolasvasilache, hanchung Differential Revision: https://reviews.llvm.org/D122722 -
Hans Wennborg authored
InstantiateDefaultCtorDefaultArgs() is supposed to mark default constructor args as odr-used, since those args will be used when emitting the constructor closure. However, constexpr vars were not getting odr-used since DoMarkVarDeclReferenced() defers them in MaybeODRUseExprs, and the code was calling CleanupVarDeclMarking() which discarded those uses instead of processing them. (This came up in Chromium, crbug.com/1312086) Differential revision: https://reviews.llvm.org/D123405
-
Ulrich Weigand authored
This test is currently marked as XFAIL on s390x, but it is randomly passing, causing build bot issues. Setting as UNSUPPORTED for now.
-
Nikita Popov authored
Either remove legacy PM run lines or change them to use new PM.
-
Nikolas Klauser authored
`operator+` currently calls `__init`. This patch removes the usage of implementation details. Reviewed By: ldionne, Mordante, #libc Spies: libcxx-commits Differential Revision: https://reviews.llvm.org/D123058
-
David Spickett authored
This takes the AARCH64_ARCH_EXT_NAME in AArch64TargetParser.def and uses it to generate all the "if bit is set add this feature name" code. Which gives us a bunch that we were missing. I've updated testing to include those and reordered them to match the order in the .def. The final part of the test will catch any missing extensions if we somehow manage to not generate an if block for them. This has changed the order of cc1's "-target-feature" output so I've updated some tests in clang to reflect that. Reviewed By: tmatheson Differential Revision: https://reviews.llvm.org/D123296
-
LLVM GN Syncbot authored
-
Guoxiong Li authored
Fixes https://llvm.org/PR54521 Differential Revision: https://reviews.llvm.org/D123452
-
Momchil Velikov authored
This pass inserts the necessary CFI instructions to compensate for the inconsistency of the call-frame information caused by linear (non-CGA aware) nature of the unwind tables. Unlike the `CFIInstrInserer` pass, this one almost always emits only `.cfi_remember_state`/`.cfi_restore_state`, which results in smaller unwind tables and also transparently handles custom unwind info extensions like CFA offset adjustement and save locations of SVE registers. This pass takes advantage of the constraints taht LLVM imposes on the placement of save/restore points (cf. `ShrinkWrap.cpp`): * there is a single basic block, containing the function prologue * possibly multiple epilogue blocks, where each epilogue block is complete and self-contained, i.e. CSR restore instructions (and the corresponding CFI instructions are not split across two or more blocks. * prologue and epilogue blocks are outside of any loops Thus, during execution, at ... -
Christian Sigg authored
Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D123490
-
Marius Brehler authored
Replaces `!emitc.opaque` types used to express pointers with `!emitc.ptr` types.
-
Sanjay Patel authored
fshl (or X, Y), X, C ==/!= 0 --> or (shl Y, C), X ==/!= 0 fshl X, (or X, Y), C ==/!= 0 --> or (srl Y, BW-C), X ==/!= 0 This is similar to an existing setcc-of-rotate fold, but the matching requires more checks for the more general funnel op: https://alive2.llvm.org/ce/z/Ab2jDd We are effectively decomposing the funnel shift into logical shifts, reassociating, and removing a shift. This should get us the final improvements for x86-64 that were originally shown in D111530 ( https://github.com/llvm/llvm-project/issues/49541 ); x86-32 still shows some SHLD/SHRD, so the pattern is not matching there yet. Differential Revision: https://reviews.llvm.org/D122919
-
Florian Hahn authored
-
Tim Northover authored
It was on ToT when I pushed and committed unintentionally.
-
Tim Northover authored
-
Tim Northover authored
Asynchronous exception support for the prologue means that there can be multiple .cfi_def_cfa_offset instructions in a single function, which tripped up an assertion in the compact unwind generator. In reality the compact unwind format is far too restrictive to represent asynchronous frames so if we ever wanted that on Darwin we'd fall back to DWARF (possibly keeping compact unwind around for synchronous users). So the compact format should continue to represent the synchronous situation, and the assertion can be removed.
-