- Mar 22, 2022
-
-
Simon Pilgrim authored
Noticed by D122216
-
alex-t authored
In the frame index lowering we have to insert shift and add instructions to adjust stack object access. We need to take care of the stack object user kind and use scalar shift/add for scalar users. Reviewed By: rampitec Differential Revision: https://reviews.llvm.org/D121524
-
Simon Moll authored
VPIntrinsic::getStaticVectorLength infers the operational vector length of a VPIntrinsic instance from a type that is used with the intrinsic. The function used the mask operand before. Yet, vp.merge|select do not have a mask operand (in the predicating sense that the other VP intrinsics are using them - it is a selection mask for them). Fallback to the return type to fix this. Reviewed By: kaz7 Differential Revision: https://reviews.llvm.org/D121913
-
Nikita Popov authored
-
Shengchen Kan authored
Reviewed By: pengfei, RKSimon Differential Revision: https://reviews.llvm.org/D122216
-
serge-sans-paille authored
Regression introduced by f1985a3f
-
Zakk Chen authored
Reviewed By: rogfer01 Differential Revision: https://reviews.llvm.org/D120227
-
Haojian Wu authored
It was reverted, because the test had a lift-time issue. Reland f66d3758 with a fix.
-
Alex Bradbury authored
This fixes bug <https://github.com/llvm/llvm-project/issues/54022>. For now this means that defined functions will have two .functype directives emitted. Given discussion in that bug has suggested interest in moving towards using something other than .functype to mark the beginning of a function (which would, as a side-effect, solve this issue), this patch doesn't attempt to avoid that duplication. Some test cases that used CHECK-LABEL: foo rather than CHECK-LABEL: foo: are broken by this change. This patch updates those test cases to always have a colon at the end of the CHECK-LABEL string. Differential Revision: https://reviews.llvm.org/D122134
-
Nikita Popov authored
-
Martin Storsjö authored
In MinGW mode, it's possible to build LLVM/Clang with LLVM_LINK_LLVM_DYLIB (which implicitly enables plugins too). Other existing ways of building plugins on Windows is to build with LLVM_EXPORT_SYMBOLS_FOR_PLUGINS, where each executable exports its symbols. With LLVM_LINK_LLVM_DYLIB, we can't generally skip building plugins even if they are set up with PLUGIN_TOOL, as some plugins (e.g. under clang/examples) set up that way do build properly (as they manually call clang_target_link_libraries, which links in the libclang-cpp.dll dylib). For CTTestTidyModule, there's no corresponding dylib that would provide the same exports. Differential Revision: https://reviews.llvm.org/D121687
-
serge-sans-paille authored
Preprocessor output diff: -238205 lines Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup Differential Revision: https://reviews.llvm.org/D122183
-
Nikita Popov authored
Remove two stray uses in CodeGenModule and CGCUDANV.
-
serge-sans-paille authored
Preprocessor output diff: -7300 lines Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup Differential Revision: https://reviews.llvm.org/D122182
-
Nikita Popov authored
This requires some adjustment in caller code, because there was a confusion regarding the meaning of the PtrTy argument: This argument is the type of the pointer being loaded, not the addresses being loaded from.
-
Nikita Popov authored
If necessary insert a bitcast beforehand, so the LLVM-level pointer type and the Clang-level pointer type line up.
-
Stanislav Gatev authored
Differential Revision: https://reviews.llvm.org/D122129 Reviewed-by: ymandel, xazax.hun
-
Zakk Chen authored
Add the UsesMaskPolicy flag to indicate the operations result would be effected by the mask policy. (ex. mask operations). It means RISCVInsertVSETVLI should decide the mask policy according by mask policy operand or passthru operand. If UsesMaskPolicy is false (ex. unmasked, store, and reduction operations), the mask policy could be either mask undisturbed or agnostic. Currently, RISCVInsertVSETVLI sets UsesMaskPolicy operations default to MA, otherwise to MU to keep the current mask policy would not be changed for unmasked operations. Add masked-tama, masked-tamu, masked-tuma and masked-tumu test cases. I didn't add all operations because most of implementations are using the same pseudo multiclass. Some tests maybe be duplicated in different tests. (ex. masked vmacc with tumu shows in vmacc-rv32.ll and masked-tumu) I think having different tests only for policy would make the testing clear. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D120226
-
Lian Wang authored
Reviewed By: frasercrmck, jacquesguan Differential Revision: https://reviews.llvm.org/D122211
-
Petr Hosek authored
lld Mach-O backend supports all our use cases now. Differential Revision: https://reviews.llvm.org/D122047
-
Shengchen Kan authored
This reduces the gaps between tables in X86GenFoldTables.inc and X86InstrFoldTables.cpp
-
gysit authored
The revision introduces a affine.min and affine.max canonicalization pattern that orders the result expressions. It flattens the result expressions to arrays of dimension and symbol coefficients plus one constant coefficient and rearranges them in lexicographic order. Without the pattern, CSE will not eliminate two affine.min / affine.max operation if the results are ordered differently. For example, the operations ``` %1 = affine.min affine_map<(d0) -> (8, -d0 + 27)>(%arg4) %2 = affine.min affine_map<(d0) -> (-d0 + 27, 8)>(%arg4) ``` doe not CSE. After applying the pattern, the two operations are equivalent ``` %1 = affine.min affine_map<(d0) -> (8, -d0 + 27)>(%arg4) %2 = affine.min affine_map<(d0) -> (8, -d0 + 27)>(%arg4) ``` which enables CSE. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D121819
-
Siva Chandra Reddy authored
An unnecessary dep of the getenv function is removed. From the x86_64 loader, a call to __llvm_libc::memcpy is replaced with call to __llvm_libc::inline_memcpy.
-
Chuanqi Xu authored
The CoroSplit pass would check the existence of coroutine intrinsic before starting work. It is not necessary and wasteful since it would iterate over the Module. This patch also removes the constraint on the corresponding of the SmallVector for the possible coroutines in the Modules. The original value is 4. Given coroutines is used actually in practice. 4 is really relatively a low threshold.
-
Yeting Kuo authored
To perform the cost model of vector casting, the patch consider most vector casts as their scalar form and consider those vector form of free scalr castings as 1. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D121771
-
Sheng authored
`getValueAsBitsInit` will assert when the "SoftFail" isn't presented. But given the 'if' statement below, we should've allowed this situation. This patch fix this.
-
Petr Hosek authored
This reverts commit 240e06df.
-
Shraiysh Vaishay authored
This patch attempts to deduce when the oilist element must be printed based on the optional arguments to it. This especially helps creating an operation accurately because with the current implementation, the inferred unit attributes must be manually added to print the clauses appropriately. Reviewed By: Mogball Differential Revision: https://reviews.llvm.org/D121579
-
jacquesguan authored
Differential Revision: https://reviews.llvm.org/D122120
-
Ella Ma authored
[analyzer][ctu] Fix wrong 'multiple definitions' errors caused by space characters in lookup names when parsing the ctu index file This error was found when analyzing MySQL with CTU enabled. When there are space characters in the lookup name, the current delimiter searching strategy will make the file path wrongly parsed. And when two lookup names have the same prefix before their first space characters, a 'multiple definitions' error will be wrongly reported. e.g. The lookup names for the two lambda exprs in the test case are `c:@S@G@F@G#@Sa@F@operator int (*)(char)#1` and `c:@S@G@F@G#@Sa@F@operator bool (*)(char)#1` respectively. And their prefixes are both `c:@S@G@F@G#@Sa@F@operator` when using the first space character as the delimiter. Solving the problem by adding a length for the lookup name, making the index items in the format of `<USR-Length>:<USR File> <Path>`. --- In the test case of this patch, we found that it will trigger a "triple mismatch" warning when using `clang -cc1` to analyze the source file with CTU using the on-demand-parsing strategy in Darwin systems. And this problem is also encountered in D75665, which is the patch introducing the on-demand parsing strategy. We temporarily bypass this problem by using the loading-ast-file strategy. Refer to the [discourse topic](https://discourse.llvm.org/t/60762) for more details. Differential Revision: https://reviews.llvm.org/D102669
-
jacquesguan authored
This revision add constant folder for abs, copysign, ctlz, cttz and ctpop. Differential Revision: https://reviews.llvm.org/D122115
-
Carl Ritson authored
Sinking must check for interference between the block prologue and the instruction being sunk. Specifically check for clobbering of uses by the prologue, and overwrites to prologue defined registers by the sunk instruction. Reviewed By: rampitec, ruiling Differential Revision: https://reviews.llvm.org/D121277
-
Louis Dionne authored
See https://reviews.llvm.org/D121626 for details -- this re-enables the CTAD we removed, since it does break some stuff as well (even though it's not nearly as bad as the removed constructors fixed by D121626). Differential Revision: https://reviews.llvm.org/D122184
-
Louis Dionne authored
This patch uses CMAKE_OSX_SYSROOT, which should contain the SDK path that we're building against on Apple platforms, to determine which platform we are compiling for and set the compiler-rt suffix accordingly. Differential Revision: https://reviews.llvm.org/D122161
-
Petr Hosek authored
This test assumes that the driver will set -object_path_lto linker flag and it requests the platform linker with -fuse-ld=. When lld is used as the host linker, the host linker version is unset and so Clang won't set -object_path_lto since that flag is set conditionally only when linker version is at least 116. We set the linker version explicitly to make sure that -object_path_lto is set. That approach is already used elsewhere in the test. Differential Revision: https://reviews.llvm.org/D122110
-
Petr Hosek authored
When lld is being used as host linker, skip version detection since lld version cannot be used interchangeably with ld64 version and lld is already handled specially in Clang driver. Differential Revision: https://reviews.llvm.org/D122109
-
Joseph Huber authored
The unroll pragma did not properly work as the loop bound was not known when we optimize the runtime and we then added a "unroll disable" metadata which prevented unrolling later when the bounds were known. For now we manually unroll to make sure up to 16 elements are handled nicely. This helps optimizations to look through the argument passing. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D109164
-
Arthur Eubanks authored
This reverts commit 9c96a6bb. Issues were already fixed at head.
-
Arthur Eubanks authored
Revert "Revert "[OpaquePointers][BitcodeReader] Enable -opaque-pointers if we see an opaque pointer type"" This reverts commit 80ec0ebf. Issues were already fixed at head.
-
wren romano authored
This is (tangential) work towards fixing: https://github.com/llvm/llvm-project/issues/51652 Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D122059
-