- Oct 22, 2021
-
-
Ben Langmuir authored
Reapply 5692ed0c, but with the ORC runtime disabled explicitly on CrossWinToARMLinux to match the other compiler-rt runtime libraries. Differential Revision: https://reviews.llvm.org/D112229 --- Enable building the ORC runtime for 64-bit and 32-bit ARM architectures, and for all Darwin embedded platforms (iOS, tvOS, and watchOS). This covers building the cross-platform code, but does not add TLV runtime support for the new architectures, which can be added independently. Incidentally, stop building the Mach-O TLS support file unnecessarily on other platforms. Differential Revision: https://reviews.llvm.org/D112111
-
- Oct 21, 2021
-
-
Kazu Hirata authored
-
Yonghong Song authored
Clang patch ([1]) added support for btf_decl_tag attributes with typedef types. This patch added llvm support including dwarf generation. For example, for typedef typedef unsigned * __u __attribute__((btf_decl_tag("tag1"))); __u u; the following shows llvm-dwarfdump result: 0x00000033: DW_TAG_typedef DW_AT_type (0x00000048 "unsigned int *") DW_AT_name ("__u") DW_AT_decl_file ("/home/yhs/work/tests/llvm/btf_tag/t.c") DW_AT_decl_line (1) 0x0000003e: DW_TAG_LLVM_annotation DW_AT_name ("btf_decl_tag") DW_AT_const_value ("tag1") 0x00000047: NULL [1] https://reviews.llvm.org/D110127 Differential Revision: https://reviews.llvm.org/D110129 -
Yonghong Song authored
Previously, btf_del_tag attribute supports record, field, global variable, function and function parameter ([1], [2]). This patch added support for typedef. The main reason is for typedef of an anonymous struct/union, we can only apply btf_decl_tag attribute to the anonymous struct/union like below: typedef struct { ... } __btf_decl_tag target_type In this case, the __btf_decl_tag attribute applies to anonymous struct, which increases downstream implementation complexity. But if typedef with btf_decl_tag attribute is supported, we can have typedef struct { ... } target_type __btf_decl_tag which applies __btf_decl_tag to typedef "target_type" which make it easier to directly associate btf_decl_tag with a named type. This patch permitted btf_decl_tag with typedef types with this reason. [1] https://reviews.llvm.org/D106614 [2] https://reviews.llvm.org/D111588 Differential Revision: https://reviews.llvm.org/D110127 -
Mark de Wever authored
This addresses the usage of `operator&` in `<vector>`. I now added tests for the current offending cases. I wonder whether it would be better to add one addressof test per directory and test all possible violations. Also to guard against possible future errors? (Note there are still more headers with the same issue.) Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D111961
-
Jez Ng authored
While attempting to simplify it, I discovered a concerning discrepancy between our handling of LC_LINKER_OPTION vs ld64's. In particular, ld64 does not appear to check for `-all_load` nor `-ObjC` when processing those options. Thus, if/when we fix this behavior, no duplicate symbol error will be expected regardless of the use-after-free. As such, I've removed the test logic that tries to induce the duplicate symbol error. We can just rely on ASAN to do the verification. In order to make the test run on Windows, I've removed the symlink logic. Both ld64 and LLD handle this un-symlinked framework just fine. I also capitalized the framework name, since that's the typical convention. Reviewed By: #lld-macho, oontvoo Differential Revision: https://reviews.llvm.org/D112195
-
Lang Hames authored
These were accidentally picked up in an earlier commit.
-
Nicolas Vasilache authored
In the stride == 1 case, conv1d reads contiguous data along the input dimension. This can be advantageaously used to bulk memory transfers and compute while avoiding unrolling. Experimentally, this can yield speedups of up to 50%. Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D112139
-
Jon Chesterfield authored
Step towards building the DeviceRTL for amdgpu. Mostly replaces cuda-specific toolchain finding logic with the generic logic currently found in the amdgpu deviceRTL cmake. Also deletes dead code and changes the default to build on systems without cuda installed, as the library doesn't use cuda and the amdgpu-only systems generally won't have cuda installed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D111983
-
Sanjay Patel authored
This updates the recent D112108 / b92412fb to handle the flipped logic ('or') sibling: https://alive2.llvm.org/ce/z/Y2L6Ch
-
Sanjay Patel authored
These are direct mutations of the tests added for D112108 - we should handle the sibling folds for 'or'.
-
Kirill Bobyrev authored
Context: https://reviews.llvm.org/D110925#inline-1070046
-
Louis Dionne authored
In 395271ad, I simplified how we handled the target triple for the runtimes. However, in doing so, we stopped considering the default in CMAKE_CXX_COMPILER_TARGET, so we'd use the LLVM_DEFAULT_TARGET_TRIPLE (which is the host triple) even if CMAKE_CXX_COMPILER_TARGET was specified. This commit fixes that problem and also refactors the code so that it's easy to see what the default value is. The fact that nobody seems to have been broken by this makes me think that perhaps nobody is using CMAKE_CXX_COMPILER_TARGET to specify the triple -- but it should still work. Differential Revision: https://reviews.llvm.org/D111672
-
Anirudh Prasad authored
- This patch provides the initial implementation for lowering a call on z/OS according to the XPLINK64 calling convention - A series of changes have been made to SystemZCallingConv.td to account for these additional XPLINK64 changes including adding a new helper function to shadow the stack along with allocation of a register wherever appropriate - For the cases of copying a f64 to a gr64 and a f128 / 128-bit vector type to a gr64, a `CCBitConvertToType` has been added and has been bitcasted appropriately in the lowering phase - Support for the ADA register (R5) will be provided in a later patch. Reviewed By: uweigand Differential Revision: https://reviews.llvm.org/D111662
-
Sanjay Patel authored
(i8 X ^ 128) & (i8 X s>> 7) --> usubsat X, 128 I haven't found a generalization of this identity: https://alive2.llvm.org/ce/z/_sriEQ Note: I was actually looking at the first form of the pattern in that link, but that's part of a long chain of potential missed transforms in codegen and IR....that I hope ends here! The predicates for when this is profitable are a bit tricky. This version of the patch excludes multi-use but includes custom lowering (as opposed to legal only). On x86 for example, we have custom lowering for some vector types, and that uses umax and sub. So to enable that fold, we need add use checks to avoid regressions. Even with legal-only lowering, we could see code with extra reg move instructions for extra uses, so that constraint would have to be eased very carefully to avoid penalties. Differential Revision: https://reviews.llvm.org/D112085
-
Anirudh Prasad authored
- There are certain instructions most notably those with extended mnemonics that restricted to only the gnu/att variant - There are also certain instruction aliases/mnemonic aliases that are restricted only to the HLASM variant (see https://reviews.llvm.org/D97581, https://reviews.llvm.org/D94250 and https://reviews.llvm.org/D92185 for reference) - This patch adds a few tests to check for the behaviour introduced in the above patches. The testing coverage could not be added in at the same time, due to parallel work being done introducing the HLASM syntax Reviewed By: uweigand, abhina.sreeskantharajan Differential Revision: https://reviews.llvm.org/D112172
-
Alexey Bataev authored
Vectorization of PHIs and stores very similar, it might be beneficial to try to revectorize stores (like PHIs) if the total number of stores with the same/alternate opcode is less than the vector size but number of stores with the same type is larger than the vector size. Differential Revision: https://reviews.llvm.org/D109831
-
Matthias Springer authored
This is the same fix as for scf.for. Differential Revision: https://reviews.llvm.org/D112218
-
Matthias Springer authored
Differential Revision: https://reviews.llvm.org/D112123
-
Matthias Springer authored
Differential Revision: https://reviews.llvm.org/D111956
-
Matthias Springer authored
An InitTensorOp is replaced with an ExtractSliceOp on the InsertSliceOp's destination. This optimization is applied after analysis and only to InsertSliceOps that were decided to bufferize inplace. Another analysis on the new ExtractSliceOp is needed after the rewrite. Differential Revision: https://reviews.llvm.org/D111955
-
Jon Chesterfield authored
Fixes a compiler assert on passing a compile time integer to atomic builtins. Assert introduced in D61522 Function changed from ->bool to ->Optional in D76646 Simplifies call sites to getIntegerConstantExpr to elide the now-redundant isValueDependent checks. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D112159
-
Jan Svoboda authored
The `clang-scan-deps` CLI tool invokes the compiler with `-print-resource-dir` in case the `-resource-dir` argument is missing from the compilation command line. This is to enable running the tool on compilation databases that use compiler from a different toolchain than `clang-scan-deps` itself. While this doesn't make sense when scanning modular builds (due to the `-cc1` arguments the tool generates), the tool can can be used to efficiently scan for file dependencies of non-modular builds too. This patch stops deducing the resource directory by invoking the compiler by default. This mode can still be enabled by invoking `clang-scan-deps` with `--resource-dir-recipe invoke-compiler`. The new default is `--resource-dir-recipe modify-compiler-path` which relies on the resource directory deduction taking place in `Driver::Driver` which is based on the compiler path. This makes the default more aligned with the intended usage of the tool while still allowing it to serve other use-cases. Note that this functionality was also influenced by D108979, where the dependency scanner stopped going through `ClangTool::run`. The function tried to deduce the resource directory based on the current executable path, which might not be what the users expect when invoked from within a shared library. Depends on D108979. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D108366
-
Pavel Labath authored
An empty plugin name means we should try everything. Picked up by the windows bot.
-
Kerry McLaughlin authored
When splitting a masked load, `GetDependentSplitDestVTs` is used to get the MemVTs of the high and low parts. If the masked load is extended, this may return VTs with different element types which are used to create the high & low masked load instructions. This patch changes `GetDependentSplitDestVTs` to ensure we return VTs with the same element type. Reviewed By: david-arm Differential Revision: https://reviews.llvm.org/D111996
-
YunQiang Su authored
If clang driver gets 64-bit r6 target triple like `mipsisa64r6` and additional option forces switching to generation of 32-bit code, it loses r6 abi and generates 32-bit r2-r5 abi code. ``` $ clang -target mipsisa64r6-linux-gnu -mabi=32 ``` This patch fixes the problem. - Add optional `SubArchType` argument to the `Triple::setArch()` method. - Implement generation of mips r6 target triples in the `Triple::getArchName()` method. Differential Revision: https://reviews.llvm.org/D110514.diff
-
David Green authored
-
Jan Svoboda authored
The dependency scanner works with multiple instances of `Compiler{Instance,Invocation}`. From names of the variables/members, their purpose is not obvious. This patch gives descriptive name to the generated `CompilerInvocation` that can be used to derive the command-line to build a modular dependency. Depends on D111725. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D111728 -
Jan Svoboda authored
The dependency scanner works with multiple instances of `Compiler{Instance,Invocation}`. From names of the variables/members, their purpose is not obvious. This patch gives a distinct name to the `CompilerInstance` that's used to run the implicit build during dependency scan. Depends on D111724. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D111725 -
Jan Svoboda authored
The `ModuleDepCollectorPP` class holds a reference to `ModuleDepCollector` as well as `ModuleDepCollector`'s `CompilerInstance`. The fact that these refer to the same object is non-obvious. This patch removes the `CompilerInvocation` reference from `ModuleDepCollectorPP` and accesses it through `ModuleDepCollector` instead. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D111724
-
Jan Svoboda authored
One of main goals of the dependency scanner is to be strict about module compatibility. This is achieved through strict context hash. This patch ensures that strict context hash is enabled not only during the scan itself (and its minimized implicit build), but also when actually reporting the dependency. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D111720
-
Aaron Ballman authored
This reverts commit 121b2252. The following code causes a crash in some circumstances: struct k { ~k() __attribute__((annotate(""))) {} }; void m() { k(); }
-
Benjamin Kramer authored
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:3635:10: error: moving a local object in a return statement prevents copy elision [-Werror,-Wpessimizing-move] return std::move(merged); ^ -
Pavel Labath authored
This patch deals with ObjectFile, ObjectContainer and OperatingSystem plugins. I'll convert the other types in separate patches. In order to enable piecemeal conversion, I am leaving some ConstStrings in the lowest PluginManager layers. I'll convert those as the last step. Differential Revision: https://reviews.llvm.org/D112061
-
Benjamin Kramer authored
Fixes a regression introduced in f9be7a7a Differential Revision: https://reviews.llvm.org/D112208
-
Adrian Kuegel authored
These are based on findings from the ClangTidy readability-container-size-empty check.
-
Jaroslav Sevcik authored
This patch fixes a problem introduced by clang change https://reviews.llvm.org/D95617 and described by https://bugs.llvm.org/show_bug.cgi?id=50076#c6, where inlined functions omit unused parameters both in the stack trace and in `frame var` command. With this patch, the parameters are listed correctly in the stack trace and in `frame var` command. Specifically, we parse formal parameters from the abstract version of inlined functions and use those formal parameters if they are missing from the concrete version. Differential Revision: https://reviews.llvm.org/D110571
-
Dawid Jurczak authored
Patch simplifies for loops in LIR following LLVM guidelines: https://llvm.org/docs/CodingStandards.html#use-range-based-for-loops-wherever-possible. Differential Revision: https://reviews.llvm.org/D112077
-
Mikhail Maltsev authored
According to the standard [vector.capacity]/5, std::vector<T>::reserve shall throw an exception of type std::length_error when the requested capacity exceeds max_size(). This behavior is not implemented correctly: the function 'reserve' simply propagates the exception from allocator<T>::allocate. Before D110846 that exception used to be of type std::length_error (which is correct for vector<T>::reserve, but incorrect for allocator<T>::allocate). This patch fixes the issue and adds regression tests. Reviewed By: Quuxplusone, ldionne, #libc Differential Revision: https://reviews.llvm.org/D112068
-
Mikhail Maltsev authored
std::vector<bool> rebinds the supplied allocator to construct objects of type '__storage_type' rather than 'bool'. Allocators are allowed to use explicit conversion constructors, so care must be taken when performing conversions. Reviewed By: ldionne, #libc Differential Revision: https://reviews.llvm.org/D112150
-