- Apr 23, 2022
-
-
Peter Klausler authored
Blanks are allowed in more places than I allowed for, and "NAN(foobar)" is allowed to have any parenthesis-balanced characters in parentheses. Update: Fix up old sanity test, then avoid usage of "limit" when null. Differential Revision: https://reviews.llvm.org/D124294
-
Paul Kirth authored
MisExpect diagnostics should not prevent compilation from succeeding, and the assertion is insufficient to prevent division by zero in release builds. This patch addresses that by replacing the assert with an early return. Additionally, it disables MisExpect diagnostics when using sample profiling, since this is the only known case where this error has manifested. Reviewed By: tejohnson Differential Revision: https://reviews.llvm.org/D124302
-
Vasileios Porpodas authored
This reverts commit 7052a0ad.
-
Ye Luo authored
Consider checking whether a pointer has been mapped can be achieved via omp_get_mapped_ptr. omp_target_is_present is more needed to check whether the storage being pointed is mapped. This restore the old behavior of omp_target_is_present before D123093 Fixes https://github.com/llvm/llvm-project/issues/54899 Reviewed By: jdenny Differential Revision: https://reviews.llvm.org/D123891
-
Ye Luo authored
When hwloc is used and is installed outside of the default paths, the omp CMake target needs to provide the needed include path thru the CMake target by adding it with target_include_directories to it, so libompd gets it as well when it defines it's cmake target using target_link_libraries. As suggested in D122667 Reviewed By: ye-luo Differential Revision: https://reviews.llvm.org/D123888
-
Vitaly Buka authored
By default -fsanitize=address already compiles with this check, why not use it. For compatibly it can be disabled with env ASAN_OPTIONS=detect_stack_use_after_return=0. Reviewed By: eugenis, kda, #sanitizers, hans Differential Revision: https://reviews.llvm.org/D124057
-
Matt Arsenault authored
This was promoting an unset max call frame size to a max call frame size of 0.
-
Matt Arsenault authored
-
Markus Böck authored
As a fallback mechanism, if no entry was supplied for a given address space, the size or alignment for a pointer type with the default address space is returned instead. This code currently crashes with opaque pointers, as it tries to construct a typed pointer type from the opaque pointer type, leading to a null pointer dereference when fetching the element type. This patch fixes the issue by handling the opaque pointer cases explicitly. Differential Revision: https://reviews.llvm.org/D124290
-
Markus Böck authored
Using opaque pointers in function signatures leads to an attempt to recursively convert all types, including sub types in LLVM types. In the case of LLVM pointers, it may not have a subtype aka element type if it is opaque which would then lead to a null pointer dereference. Differential Revision: https://reviews.llvm.org/D124291
-
Shilei Tian authored
[Clang][OpenMP] Fix the issue that temp cubin files are not removed after compilation when using new OpenMP driver The root cause of this is, in `NVPTX::Assembler::ConstructJob`, the output file name might not match the `Output`'s file name passed into the function because `CudaToolChain::getInputFilename` is a specialized version. That means the real output file is not added to the temp files list, which will be all removed in the d'tor of `Compilation`. In order to "fix" it, in the function `NVPTX::OpenMPLinker::ConstructJob`, before calling `clang-nvlink-wrapper`, the function calls `getToolChain().getInputFilename(II)` to get the right output file name for each input, and add it to temp file, and then they can be removed w/o any issue. However, this whole logic doesn't work when using the new OpenMP driver because `NVPTX::OpenMPLinker::ConstructJob` is not called at all, which causing the issue that the cubin file generated in each single unit compilation is out of track. In this patch, we add the real output file into temp files if its name doesn't match `Output`. We add it when the file is an output instead of doing it when it is an input, like what we did in `NVPTX::OpenMPLinker::ConstructJob`, which makes more sense. Reviewed By: jhuber6 Differential Revision: https://reviews.llvm.org/D124253
-
Yi Zhang authored
This change fixes `CollapsedLayoutMap` for cases where the collapsed dims are size 1. The cases where inner most dims are size 1 and noncontiguous can be represented by the strided form and therefore can be allowed. For such cases, the new stride should be of the next entry in an association whose dimension is not size 1. If the next entry is dynamic, it's not possible to decide which stride to use at compilation time and the stride is set to dynamic. Differential Revision: https://reviews.llvm.org/D124137
-
Valery N Dmitriev authored
Test case to show not quite optimal SLP vectorization. Reviewed By: Vasileios Porpodas (vporpo) Differential Revision: https://reviews.llvm.org/D124293
-
Michael Jones authored
The PrintfMatcher depends on printf which is in stdio. Stdio is currently fullbuild only, but the matcher wasn't, causing failing builds when fullbuild was off. This patch adds the fullbuild condition to the PrintfMatcher cmake. Differential Revision: https://reviews.llvm.org/D124304
-
Petr Hosek authored
This matches the behavior prior to b0e2ffe1. Fixes: https://github.com/llvm/llvm-project/issues/55046 Differential Revision: https://reviews.llvm.org/D120682
-
Alex Zinenko authored
Currently, the sequence of Transform dialect operations only supports a single use of each operand (verified by the `transform.sequence` operation). This was originally motivated by the need to guard against accessing a payload IR operation associated with a transform IR value after this operation has likely been rewritten by a transformation. However, not all Transform dialect operations rewrite payload IR, in particular the "navigation" operation such as `transform.pdl_match` do not. Introduce memory effects to the Transform dialect operations to describe their effect on the payload IR and the mapping between payload IR opreations and transform IR values. Use these effects to replace the single-use rule, allowing repeated reads and disallowing use-after-free, where operations with the "free" effect are considered to "consume" the transform IR value and rewrite the corresponding payload IR operations). As an additional improvement, this enables code motion transformation on the transform IR itself. Reviewed By: Mogball Differential Revision: https://reviews.llvm.org/D124181
-
Michael Jones authored
This patch changes the printf parser tests to use a more robust matcher. This allows for better debugging of parsing issues. This does not affect the actual printf code at all, only the tests. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D124130
-
Yaxun (Sam) Liu authored
This patch is a continuation of https://reviews.llvm.org/D123353. Not only kernels in anonymous namespace, but also template kernels with template arguments in anonymous namespace need to be externalized. To be more generic, this patch checks the linkage of a kernel assuming the kernel does not have __global__ attribute. If the linkage is internal then clang will externalize it. This patch also fixes the postfix for externalized symbol since nvptx does not allow '.' in symbol name. Reviewed by: Artem Belevich Differential Revision: https://reviews.llvm.org/D124189 Fixes: https://github.com/llvm/llvm-project/issues/54560
-
Fangrui Song authored
-
Florian Hahn authored
Add an additional test for D123473.
-
Shafik Yaghmour authored
Applied clang-tidy modernize-use-override over LLDB and added it to the LLDB .clang-tidy config. Differential Revision: https://reviews.llvm.org/D123340
-
Florian Hahn authored
We only need to insert a Freeze instruction if any of the conditions may be poison. Similar checks are already done in the other places SimpleLoopUnswitch creates Freeze instruction. Reviewed By: aeubanks, efriedma Differential Revision: https://reviews.llvm.org/D124259
-
Matt Arsenault authored
The builtin predicate handling has a strange behavior where the code assumes that a PatFrag is a stack of PatFrags, and each level adds at most one predicate. I don't think this particularly makes sense, especially without a diagnostic to ensure you aren't trying to set multiple at once. This wasn't followed for address spaces and alignment, which could potentially fall through to report no builtin predicate was added. Just switch these to follow the existing convention for now.
-
Peter Klausler authored
".", possibly followed by an exponent, is a valid REAL input value (meaning zero). Differential Revision: https://reviews.llvm.org/D124279
-
Jez Ng authored
Previously, when encountering a symbol reloc located in a literal section, we would look up the contents of the literal at the `symbol value + addend` offset within the literal section. However, it seems that this offset is not guaranteed to be valid. Instead, we should use just the symbol value to retrieve the literal's contents, and compare the addend values separately. ld64 seems to do this. Reviewed By: #lld-macho, thevinster Differential Revision: https://reviews.llvm.org/D124223
-
Jez Ng authored
Previously, we stored a pointer from the ObjFile to its compact unwind section in order to avoid iterating over the file's sections a second time. However, given the small number of sections (not subsections) per file, this caching was really quite unnecessary. We will soon do lookups for more sections (such as the `__eh_frame` section), so let's simplify the code first. Reviewed By: #lld-macho, Roger Differential Revision: https://reviews.llvm.org/D123434
-
Peter Klausler authored
When editing numeric input, always skip leading spaces, even if BZ mode (or BLANK='ZERO') is in effect; otherwise, a sign character preceded by blanks will not be recognized. Differential Revision: https://reviews.llvm.org/D124278
-
Peter Klausler authored
A recent change that corrected the name resolution of a generic interface when the same name was visible in scope incorrectly prevented a local generic from shadowing an outer name that is not a generic, subprogram, or derived type -- e.g., a simple variable -- leading to an inappropriate error message. Differential Revision: https://reviews.llvm.org/D124276
-
Okwan Kwon authored
The bubble up logic was written by assuming the slice operation is always a normal slice that outputs a tensor with the same rank. Differential Revision: https://reviews.llvm.org/D124283
-
Nico Weber authored
Several systems no longer ship `python`. Differential Revision: https://reviews.llvm.org/D124280
-
Nico Weber authored
Differential Revision: https://reviews.llvm.org/D124282
-
Evgenii Stepanov authored
These "new" syscalls have been added in 2.6.16, more than 16 years ago. Surely that's enough time to migrate. Glibc 2.33 is using them on both i386 and x86_64. Android has an selinux filter to block the legacy syscalls in the apps. Differential Revision: https://reviews.llvm.org/D124212
-
cpillmayer authored
This allows printing the users of an operation as proposed in the git issue #53286. To be able to refer to operations with no result, these operations are assigned an ID in SSANameState. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D124048
-
Nikolas Klauser authored
`vector<bool>::const_reference` and `vector<bool>::const_iterator::reference` should be the same type. Reviewed By: Mordante, #libc Spies: libcxx-commits Differential Revision: https://reviews.llvm.org/D123851
-
Jacques Pienaar authored
Add shape func op for use (primarily) in shape function_library op. Allows setting default dialect for some simpler authoring. This is a minimal version of the ops needed. Differential Revision: https://reviews.llvm.org/D124055
-
Lei Zhang authored
If there is only one single element in the vector, then we can just extract the element to compute the final result. Reviewed By: mravishankar Differential Revision: https://reviews.llvm.org/D124129
-
Vitaly Buka authored
-
Mohammed Nurul Hoque authored
Backwards search The sext.w removal pass (before the new patch) checks if the input to sext.w is already in sign-extended form, so it can eliminate it. It does that by checking every definition/source that reaches the sext.w is an instruction that produces a sign-extended value, either by definition (e.g. ADDW), or it propagates sign-extension (e.g. OR) so we check its sources recursively. Forward search Sometimes, one of the sources is an instruction that doesn't always produce a sign-extended value, but it has a W-version that does (e.g. ADD / ADDW). If we transform the ADD to ADDW, the sext.w can be removed (assuming other def paths are satisfied), but this transformation is sound only if every use of this ADD/W only reqruires the lower 32-bits either directly (like sll %x, 32) or they propagate dependency (lower word of output only depends on lower word of input) so we check its uses recursively. When searching backwards, if an instruction that can be replaced with W-variant is encountered, this pass runs the forward search to verify it can be replaced, then adds it to a list of fixable instructions. After verifying all paths, it replaces the instruction and removes the sext.w. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D119928
-
Krzysztof Parzyszek authored
At some point in instruction selection, A2_tfrsi Constant:i32<...> was created, where the "Constant" came from SelectAnyInt. Since it wasn't a TargetConstant, it was selected again, leading to %vreg = A2_tfrsi ... ... = A2_tfrsi %vreg which is not a valid code.
-
Keith Smiley authored
Previously these would crash because `file` is null in the case there is an invalid tbd file. Differential Revision: https://reviews.llvm.org/D124271
-