- Jan 11, 2022
-
-
Anastasia Stulova authored
Add support of linking files compiled into SPIR-V objects using spirv-link. Command line inteface examples: clang --target=spirv64 test1.cl test2.cl clang --target=spirv64 test1.cl -o test1.o clang --target=spirv64 test1.o test2.cl -o test_app.out This works independently from the SPIR-V generation method (via an external tool or an internal backend) and applies to either approach that is being used. Differential Revision: https://reviews.llvm.org/D116266
-
Pavel Labath authored
By forwarding it to the host platform.
-
Roman Lebedev authored
This reverts commit f62f47f5.
-
Roman Lebedev authored
As reported in https://reviews.llvm.org/D116766#3233042
-
Florian Hahn authored
Make the test more robust by replacing undef by pointer arguments. This ensures that the GEPs cannot be folded to undef.
-
David Green authored
It turns out this is conflating a few different PMU extensions. And on Arm ended up breaking M-Profile code generation. Reverting for the moment whilst we sort out the details. This reverts commit d17fb46e.
-
Egor Zhdan authored
If a class declares an instance property, and an inheritor class declares a class property with the same name, Clang Sema currently treats the latter as an overridden property, and compares the attributes of the two properties to check for a mismatch. The resulting diagnostics might be misleading, since neither of the properties actually overrides the another one. rdar://86018435 Differential Revision: https://reviews.llvm.org/D116412
-
Nikita Popov authored
-
David Sherwood authored
For certain negative indices passed to the VECTOR_SPLICE operation we can actually directly use the SVE splice instruction by creating the appropriate predicate. The predicate needs to be constructed in such a way that all but the last -idx elements are false. We can do this efficiently using a combination of 'ptrue' (with the appropriate fixed pattern, e.g. vl1, vl2, etc.) and 'rev'. The advantage of using these instructions to generate the predicate is they do not set any flags, unlike the whilelo instruction. This is critical when the splice operation is in a loop, since we want MachineLICM to hoist the predicate generation out of the loop. Differential Revision: https://reviews.llvm.org/D115863
-
Tim Northover authored
The interface for these instructions changed with support for mandatory tail calls, and now -1 indicates the CalleePopAmount argument is not valid. Unfortunately I didn't realise FastISel or GISel did calls at the time so didn't update them.
-
Simon Pilgrim authored
The pointer is always dereferenced immediately below, so assert the cast is correct instead of returning nullptr
-
Nikita Popov authored
This function is no longer used since 2cafbcb5.
-
Nikita Popov authored
This function is no longer used after dcbc91f4.
-
Nikita Popov authored
For these "visible on unwind/ret" checks we only care about the fact that no other code has access to the pointer (unless it escapes). A noalias call is sufficient for this, it does not have to be a known allocation function. This is basically the same change as D116728, but for DSE rather than LICM.
-
Florian Hahn authored
llvm/test/Transforms/LoopStrengthReduce/uglygep-address-space.ll has exactly the same checks and input. Remove the duplicated test.
-
Matthias Springer authored
Previously, CallOps did not have any aliasing OpResult/OpOperand pairs. Therefore, CallOps were mostly ignored by the analysis and buffer copies were not inserted when necessary. This commit introduces the following changes: * Function bbArgs writable by default. A function can now be bufferized without inspecting its callers. * Callers must introduce buffer copies of function arguments when necessary. If a function is external, the caller must conservatively assume that a function argument is modified by the callee after bufferization. If the function is not external, the caller inspects the callee to determine if a function argument is modified. Differential Revision: https://reviews.llvm.org/D116457
-
Nikita Popov authored
Currently this is special-cased to TLI alloc functions only.
-
Haojian Wu authored
Reland 55d96ac3 and 37ec65e1 with a clang-tidy fix.
-
Hans Wennborg authored
and use that to simplify MD5's hex string code which was previously using a string stream, as well as Clang's CGDebugInfo::computeChecksum(). Differential revision: https://reviews.llvm.org/D116960
-
Nikita Popov authored
If the allocation is not captured, then all the stores before the ret are dead anyway.
-
Hans Wennborg authored
A lookup table, which toHex() was using, seems like the better approach. Having two implementations is redundant, so put the lookup table in hexdigit() and make toHex() call that. Differential revision: https://reviews.llvm.org/D116960
-
Simon Pilgrim authored
[SemaOverload] compareConversionFunctions - use castAs<> instead of getAs<> to avoid dereference of nullptr The pointer is dereferenced immediately below, so assert the cast is correct instead of returning nullptr
-
Simon Pilgrim authored
The pointer is always dereferenced inside BuildSimilarlyQualifiedPointerType, so assert the cast is correct instead of returning nullptr
-
Martin Storsjö authored
This reinstates a test that was temporarily removed in e26bbae3, in a form that works on Darwin. Use -LD instead of -link as a linker argument that is unused when compiling, that produces warnings normally. -LD can be placed anywhere in the command line, so that the command line ends with "-- %s", making paths starting with /U correctly interpreted as paths, not options.
-
Nikita Popov authored
-
Julian Gross authored
Changed the remaining appearances of alloc to memref.alloc in several documentation sections, since they lead to misunderstandings, if they are used. Differential Revision: https://reviews.llvm.org/D116999
-
wangpc authored
The code can only address the whole RV32 address space or the lower 2 GiB of the RV64 address space in small code model, so 32 bits entry is enough. Cache hit ratio and code size have some improvements. Reviewed By: asb Differential Revision: https://reviews.llvm.org/D116435
-
Diana Picus authored
Cover more of the code paths from LLVMTypeConverter::convertPointerLike and LLVMTypeConverter::convertSequenceType. Differential Revision: https://reviews.llvm.org/D116927
-
Sam McCall authored
This saves about 10% of SelectionVisitor::pop().
-
Florian Hahn authored
Use PtrToInt instead Add when creating temporary instructions. The add might get folded away with more sophisticated folding.
-
David Sherwood authored
I've changed the definition of the experimental.vector.splice instrinsic to reject indices that are known to be or possibly out-of-bounds. In practice, this means changing the definition so that the index is now only valid in the range [-VL, VL-1] where VL is the known minimum vector length. We use the vscale_range attribute to take the minimum vscale value into account so that we can permit more indices when the attribute is present. The splice intrinsic is currently only ever generated by the vectoriser, which will never attempt to splice vectors with out-of-bounds values. Changing the definition also makes things simpler for codegen since we can always assume that the index is valid. This patch was created in response to review comments on D115863 Differential Revision: https://reviews.llvm.org/D115933
-
Sam McCall authored
This seems to be strictly faster in all cases. Before fixing D116978 it was one of the hot paths, and may become one again.
-
Martin Storsjö authored
These tests were recently added in 50ec1306. The clang-cl invocations interpret the source path, %s, which begins with /Users, as a cl option /U. Normally this is worked around by passing -- before the arguments that must be interpreted as files, not options, but in the current test, the -link option must be passed last, after any file names.
-
Florian Hahn authored
This makes improvements in follow-up patches more obvious.
-
Diego Caballero authored
D115722 added a DL spec to GPU modules. It happens that the DL default interface implementation is sensitive to the name of the DL spec attribute. This patch is fixing the name of the attribute to be the expected one. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D116956
-
Nikita Popov authored
When calling emitArrayDestroy(), the pointer will usually have ConvertTypeForMem(EltType) as the element type, as one would expect. However, globals with initializers sometimes don't use the same types as values normally would, e.g. here the global uses { double, i32 } rather than %struct.T as element type. Add an early cast to the global destruction path to avoid this special case. The cast would happen lateron anyway, it only gets moved to an earlier point. Differential Revision: https://reviews.llvm.org/D116219 -
Zi Xuan Wu authored
Loading constants inline is expensive on CSKY and it's in general better to place the constant nearby in code space and then it can be loaded with a simple 16/32 bit load instruction like lrw. It needs lift or duplicates constant pool entry to make constant nearby so that lrw instruction can reach.
-
wangpc authored
When `Zbt` is enabled, we can generate SELECT for division by power of 2, so that there is no data dependency. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D114856
-
Martin Storsjö authored
[clang] Add --start-no-unused-arguments/--end-no-unused-arguments to silence some unused argument warnings When passing a set of flags to configure defaults for a specific target (similar to the cmake settings `CLANG_DEFAULT_RTLIB`, `CLANG_DEFAULT_UNWINDLIB`, `CLANG_DEFAULT_CXX_STDLIB` and `CLANG_DEFAULT_LINKER`, but without hardcoding them in the binary), some of the flags may cause warnings (e.g. `-stdlib=` when compiling C code). Allow requesting selectively ignoring unused arguments among some of the arguments on the command line, without needing to resort to `-Qunused-arguments` or `-Wno-unused-command-line-argument`. Fix up the existing diagnostics.c testcase. It was added in response to PR12181 to fix handling of `-Werror=unused-command-line-argument`, but the command line option in the test (`-fzyzzybalubah`) now triggers "error: unknown argument" instead of the intended warning. Change it into a linker input (`-lfoo`) which triggers the intended diagnostic. Extend the existing test case to check more cases and make sure that it keeps testing the intended case. Add testing of the new option to this existing test. Differential Revision: https://reviews.llvm.org/D116503
-
LLVM GN Syncbot authored
-