- Feb 21, 2022
-
-
Shilei Tian authored
In 'cond-update-stmt', `else` statement is not expected. This patch adds the check in Sema. Reviewed By: ABataev Differential Revision: https://reviews.llvm.org/D120225
-
Max Kazantsev authored
-
Simon Pilgrim authored
Cleanup for D120192
-
Kito Cheng authored
-
Sam McCall authored
This makes hover/go-to-definition/expand-auto etc work for auto params in many common cases. This includes when a generic lambda is passed to a function accepting std::function. (The tests don't use this case, it requires a lot of setup). Note that this doesn't affect the AST of the function body itself, cause its nodes not to be dependent, improve code completion etc. (These sort of improvements seem possible, in a similar "if there's a single instantiation, traverse it instead of the primary template" way). Fixes https://github.com/clangd/clangd/issues/493 Fixes https://github.com/clangd/clangd/issues/1015 Differential Revision: https://reviews.llvm.org/D119537
-
Tom Stellard authored
Fixes #53288 Reviewed By: mehdi_amini, asl, Quuxplusone Differential Revision: https://reviews.llvm.org/D117745
-
Alex Zinenko authored
The `.def` and `.def_property_readonly` functions in PybindAdaptors.h should construct the functions as method of the current class rather than as method of pybind11:none(), which is an object and not even a class. Depends On D117658 Reviewed By: gysit Differential Revision: https://reviews.llvm.org/D117659
-
LLVM GN Syncbot authored
-
Nicolas Miller authored
The section name encoding for `llvm-objcopy` had two main issues, the first is that the size used for the `snprintf` in the original code is incorrect because `snprintf` adds a null byte, so this code was only able to encode offsets of 6 digits - `/`, `\0` and 6 digits of the offset - rather than the 7 digits it should support. And the second part is that it didn't support the base64 encoding for offsets larger than 7 digits. This issue specifically showed up when using the `clang-offload-bundler` with a binary containing a lot of symbols/sections, since it uses `llvm-objcopy` to add the sections containing the offload code. Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D118692
-
Nicolas Miller authored
Large COFF section names are moved into the string table and the section header field is the offset into the string table encoded in ASCII for offset smaller than 7 digits and in base64 for larger offsets. The operation of taking the string table offsets is done in a few places in the codebase, so it is helpful to move this operation into `BinaryFormat` so that it can be shared everywhere it's done. So this patch takes the implementation of this operation from `llvm/lib/MC/WinCOFFObjectWriter.cpp` and moves it into `BinaryFormat`. Reviewed By: jhenderson, rnk Differential Revision: https://reviews.llvm.org/D118793
-
Max Kazantsev authored
-
Sven van Haastregt authored
This simplifies completeness comparisons against OpenCLBuiltins.td and also makes the header no longer "claim" the identifiers "success", "failure", "desired", "value". Differential Revision: https://reviews.llvm.org/D119560
-
Florian Hahn authored
This reverts commit 2a464508. This triggers the following assertion in an internal project: Assertion failed: (VRegInfo[Reg.id()].first.is<const TargetRegisterClass *>() && "Register class not set, wrong accessor"), function getRegClass, file MachineRegisterInfo.h, line 646. I'll work with the author directly to get a reproducer.
-
Jay Foad authored
Previously when combining two loads this pass would sink the first one down to the second one, putting the combined load where the second one was. It would also sink any intervening instructions which depended on the first load down to just after the combined load. For example, if we started with this sequence of instructions (code flowing from left to right): X A B C D E F Y After combining loads X and Y into XY we might end up with: A B C D E F XY But if B D and F depended on X, we would get: A C E XY B D F Now if the original code had some short disjoint live ranges from A to B, C to D and E to F, in the transformed code these live ranges will be long and overlapping. In this way a single merge of two loads could cause an unbounded increase in register pressure. To fix this, change the way the way that loads are moved in order to merge them so that: - The second load is moved up to the first one. (But when merging stores, we still move the first store down to the second one.) - Intervening instructions are never moved. - Instead, if we find an intervening instruction that would need to be moved, give up on the merge. But this case should now be pretty rare because normal stores have no outputs, and normal loads only have address register inputs, but these will be identical for any pair of loads that we try to merge. As well as fixing the unbounded register pressure increase problem, moving loads up and stores down seems like it should usually be a win for memory latency reasons. Differential Revision: https://reviews.llvm.org/D119006
-
Max Kazantsev authored
-
Benjamin Kramer authored
We're really close to the limit $ grep -c DIAG tools/clang/include/clang/Basic/DiagnosticParseKinds.inc 598
-
Jay Foad authored
This allows stableHashValue to be used on Machine IR that is not in SSA form. Differential Revision: https://reviews.llvm.org/D120121
-
Rainer Orth authored
`DebugInfo/Generic/no-empty-child-vars.ll` `FAIL`s on SPARC. As discussed in D95617 <https://reviews.llvm.org/D95617>, this is yet another instance of Issue #46473. As was done for other failures due to this bug, this patch `XFAIL`s the test. Tested on `sparcv9-sun-solaris2.11`. Differential Revision: https://reviews.llvm.org/D120238
-
Lian Wang authored
Supplement tests alias of SHFLI and UNSHFLI instructions. RV32: zip8/zip4/zip2/unzip8/unzip4/unzip2 RV64: zip8.w/zip4.w/zip2.w/zip.w/zip8/zip4/zip2/zip/ unzip8.w/unzip4.w/unzip2.w/unzip.w/unzip8/unzip4/unzip2/unzip Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D120015 -
Simon Moll authored
Packed vector and mask registers (v512) are composed of two v256 subregisters that occupy the even and odd element positions. We add packing support SDNodes (vec_unpack_lo|hi and vec_pack) and splitting of v512i1 mask arithmetic ops with those. Reviewed By: kaz7 Differential Revision: https://reviews.llvm.org/D120053
-
Iain Sandoe authored
In C++20 modules imports must be together and at the start of the module. Rather than growing more ad-hoc flags to test state, this keeps track of the phase of of a valid module TU (first decl, global module frag, module, private module frag). If the phasing is broken (with some diagnostic) the pattern does not conform to a valid C++20 module, and we set the state accordingly. We can thus issue diagnostics when imports appear in the wrong places and decouple the C++20 modules state from other module variants (modules-ts and clang modules). Additionally, we attempt to diagnose wrong imports before trying to find the module where possible (the latter will generally emit an unhelpful diagnostic about the module not being available). Although this generally simplifies the handling of C++20 module import diagnostics, the motivation was that, in particular, it allows detecting invalid imports like: import module A; int some_decl(); import module B; where being in a module purview is insufficient to identify them. Differential Revision: https://reviews.llvm.org/D118893
-
Fangrui Song authored
In many call sites we know uncompression cannot happen (non-SHF_ALLOC, or the data (even if compressed) must have been uncompressed by a previous pass). Prefer rawData in these cases. data() increases code size and prevents optimization on rawData.
-
Matthias Springer authored
This is for consistency with other dialects. Differential Revision: https://reviews.llvm.org/D120190
-
Prateek Gupta authored
This commit adds canonicalization pattern in `linalg.generic` op for static shape inference. If any of the inputs or outputs have static shape or is casted from a tensor of static shape, then shapes of all the inputs and outputs can be inferred by using the affine map of the static shape input/output. Signed-Off-By:
Prateek Gupta <prateek@nod-labs.com> Reviewed By: mravishankar Differential Revision: https://reviews.llvm.org/D118929
-
Shraiysh Vaishay authored
This patch adds assemblyFormat for omp.sections operation. Some existing functions have been altered to fit the custom directive in assemblyFormat. This has led to their callsites to get modified too, but those will be removed in later patches, when other operations get their assemblyFormat. All operations were not changed in one patch for ease of review. Reviewed By: Mogball Differential Revision: https://reviews.llvm.org/D120176
-
Kito Cheng authored
Resource folder[1] should include before sysroot[2] in general (Linux clang toolchain, BareMetal clang toolchain, and GCC using that order), and that prevent sysroot's header file override resource folder's one, this change is reference from BareMetal::AddClangSystemIncludeArgs@BareMetal.cpp[3]. And also fix the behavior of `-nobuiltininc`. [1] Include path from resource folder is something like this: `<toolchain-path>/lib/clang/13.0.0/include/` [2] Include path from sysroot is something like this: `<toolchain-path>/riscv32-unknown-elf/include` [3] https://github.com/llvm/llvm-project/blob/llvmorg-13.0.1/clang/lib/Driver/ToolChains/BareMetal.cpp#L193 Reviewed By: asb Differential Revision: https://reviews.llvm.org/D119837 The recommit fixes the Windows build failure due to path issue.
-
Kito Cheng authored
This reverts commit 47b1fa5f.
-
Craig Topper authored
This function was added in D49837, but no setOperationAction call was added with it. The code is equivalent to what is done by the default ExpandIntRes_ABS implementation when ADDCARRY is supported. Test case added to verify this. There was some existing coverage from Thumb2 MVE tests, but they started from vectors.
-
Kito Cheng authored
Resource folder[1] should include before sysroot[2] in general (Linux clang toolchain, BareMetal clang toolchain, and GCC using that order), and that prevent sysroot's header file override resource folder's one, this change is reference from BareMetal::AddClangSystemIncludeArgs@BareMetal.cpp[3]. And also fix the behavior of `-nobuiltininc`. [1] Include path from resource folder is something like this: `<toolchain-path>/lib/clang/13.0.0/include/` [2] Include path from sysroot is something like this: `<toolchain-path>/riscv32-unknown-elf/include` [3] https://github.com/llvm/llvm-project/blob/llvmorg-13.0.1/clang/lib/Driver/ToolChains/BareMetal.cpp#L193 Reviewed By: asb Differential Revision: https://reviews.llvm.org/D119837 The recommit fixes the Windows build failure due to path issue.
-
Kito Cheng authored
This reverts commit 079d1366.
-
Kito Cheng authored
Resource folder[1] should include before sysroot[2] in general (Linux clang toolchain, BareMetal clang toolchain, and GCC using that order), and that prevent sysroot's header file override resource folder's one, this change is reference from BareMetal::AddClangSystemIncludeArgs@BareMetal.cpp[3]. And also fix the behavior of `-nobuiltininc`. [1] Include path from resource folder is something like this: `<toolchain-path>/lib/clang/13.0.0/include/` [2] Include path from sysroot is something like this: `<toolchain-path>/riscv32-unknown-elf/include` [3] https://github.com/llvm/llvm-project/blob/llvmorg-13.0.1/clang/lib/Driver/ToolChains/BareMetal.cpp#L193 Reviewed By: asb Differential Revision: https://reviews.llvm.org/D119837
-
Craig Topper authored
[SelectionDAG][RISCV][ARM][PowerPC][X86][WebAssembly] Change default abs expansion to use sra (X, size(X)-1); sub (xor (X, Y), Y). Previous we used sra (X, size(X)-1); xor (add (X, Y), Y). By placing sub at the end, we allow RISCV to combine sign_extend_inreg with it to form subw. Some X86 tests for Z - abs(X) seem to have improved as well. Other targets look to be a wash. I had to modify ARM's abs matching code to match from sub instead of xor. Maybe instead ISD::ABS should be made legal. I'll try that in parallel to this patch. This is an alternative to D119099 which was focused on RISCV only. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D119171
-
Serguei Katkov authored
LR is modified at the moment of the call and before any use is read. Reviewers: reames Reviewed By: reames Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D120114
-
esmeyi authored
Fix the Buildbot failure #19373. Differential Revision: https://reviews.llvm.org/D117642
-
Chen Zheng authored
Reviewed By: RKSimon, craig.topper Differential Revision: https://reviews.llvm.org/D120049
-
Lian Wang authored
Add sched to brev8, zip and unzip instruction. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D120009
-
Luo, Yuanke authored
This patch extract the sub folding from D119654 and leave only add folding in that patch. Differential Revision: https://reviews.llvm.org/D120116
-
Amir Ayupov authored
This adds a target that would consume random binary as an input ELF file. TBD: add structured input support (ELF). Build: ``` cmake /path/to/llvm-project/llvm -GNinja \ -DLLVM_TARGETS_TO_BUILD="X86;AArch64" \ -DCMAKE_BUILD_TYPE=Release \ -DLLVM_ENABLE_ASSERTIONS=1 \ -DCMAKE_C_COMPILER=<sanitizer-capable clang> \ -DCMAKE_CXX_COMPILER=<sanitizer-capable clang++> \ -DLLVM_ENABLE_PROJECTS="bolt" \ -DLLVM_USE_SANITIZER=Address \ -DLLVM_USE_SANITIZE_COVERAGE=On ninja llvm-bolt-fuzzer ``` Test Plan: ninja llvm-bolt-fuzzer Reviewed By: maksfb Differential Revision: https://reviews.llvm.org/D120016
-
Amir Ayupov authored
Fix data race reported by ThreadSanitizer in clang.test: ``` ThreadSanitizer: data race /data/llvm-project/bolt/lib/Passes/ShrinkWrapping.cpp:1359:28 in llvm::bolt::ShrinkWrapping::moveSaveRestores() ``` The issue is with incrementing global counters from multiple threads. Reviewed By: yota9 Differential Revision: https://reviews.llvm.org/D120218
-
Krystian Kuzniarek authored
Differential Revision: https://reviews.llvm.org/D120220
-