- Jan 25, 2024
-
-
Nico Weber authored
This reverts commit 32f79226. Doesn't build, see https://github.com/llvm/llvm-project/pull/79205#issuecomment-1908730527
-
Schrodinger ZHU Yifan authored
-
Michael Maitland authored
TargetSchedule.td explicitly allows the usage of a ProcResource for zero cycles, in order to represent that the ProcResource must be available but is not consumed by the instruction. On the other hand, ResourceSegments explicitly does not allow for a zero sized interval. In order to remedy this, this patch handles the special case of when there is an empty interval usage of a resource by not adding an empty interval. We ran into this issue downstream, but it makes sense to have this upstream since it is explicitly allowed by TargetSchedule.td.
-
William Moses authored
In Bazel, Clang current separates the clang executable into a clang-driver library, and the actual clang executable. This allows downstream users to make their own variations of clang, without having to redo/maintain separate build pipelines. This adds the same for opt for both CMake and Bazel.
-
lntue authored
[libc][NFC] Fix `-DSHOW_INTERMEDIATE_OBJECTS=DEPS` to work properly for entry points and unit tests. (#79254)
-
Nikolas Klauser authored
-
Fangrui Song authored
Fix missing test coverage after #70740 #70760 When compiling for CUDA/HIP, the driver creates a cc1 job to compile for amdgcn/nvptx triple using most options. Certain target-specific options should be ignored, not lead to an error (`err_drv_unsupported_opt_for_target`).
-
Jeremy Morse authored
Background: BPI stores a collection of edge branch-probabilities, and also a set of Callback value-handles for the blocks in the edge-collection. When a block is deleted, BPI's eraseBlock method is called to clear the edge-collection of references to that block, to avoid dangling pointers. However, when move-constructing or assigning a BPI object, the edge-collection gets moved, but the value-handles are discarded. This can lead to to stale entries in the edge-collection when blocks are deleted without the callback -- not normally a problem, but if a new block is allocated with the same address as an old block, spurious branch probabilities will be recorded about it. The fix is to transfer the handles from the source BPI object. This was exposed by an unrelated debug-info change, it probably just shifted around allocation orders to expose this. Detected as nondeterminism and reduced by Zequan Wu: https://github.com/llvm/llvm-project/commit/f1b0a544514f3d343f32a41de9d6fb0b6cbb6021#commitcomment-136737090 (No test because IMHO testing for a behaviour that varies with memory allocators is likely futile; I can add the reproducer with a CHECK for the relevant branch weights if it's desired though)
-
Nico Weber authored
-
Vojislav Tomasevic authored
This patch addresses the issue regarding the call of bcopy function in a conditional expression. It is analogous to the already accepted patch which deals with the same problem, just regarding the bzero function [0]. Here is the testcase which illustrates the issue: ``` void bcopy(const void *, void *, unsigned long); void foo(void); void test_bcopy() { char dst[20]; char src[20]; int _sz = 20, len = 20; return (_sz ? ((_sz >= len) ? bcopy(src, dst, len) : foo()) : bcopy(src, dst, len)); } ``` When processing it with clang, following issue occurs: Instruction does not dominate all uses! %arraydecay2 = getelementptr inbounds [20 x i8], ptr %dst, i64 0, i64 0, !dbg !38 %cond = phi ptr [ %arraydecay2, %cond.end ], [ %arraydecay5, %cond.false3 ], !dbg !33 fatal error: error in backend: Broken module found, compilation aborted! This happens because an incorrect phi node is created. It is created because bcopy function call is lowered to the call of llvm.memmove intrinsic and function memmove returns void *. Since llvm.memmove is called in two places in the same return statement, clang creates a phi node in the final basic block for the return value and that phi node is incorrect. However, bcopy function should return void in the first place, so this phi node is unnecessary. This is what this patch addresses. An appropriate test is also added and no existing tests fail when applying this patch. Also, this crash only happens when LLVM is configured with -DLLVM_ENABLE_ASSERTIONS=On option. [0] https://reviews.llvm.org/D39746 -
Alexey Bataev authored
weak ordering. Compared NumUses to meet the reaquirements of the strict weak ordering.
-
Alex MacLean authored
The PTX ISA specifies that initializers may be incomplete ([5.4.4. Initializers](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#initializers)) > As in C, array initializers may be incomplete, i.e., the number of initializer elements may be less than the extent of the corresponding array dimension, with remaining array locations initialized to the default value for the specified array type. Emitting initializers in this form is preferable because it reduces the size of the PTX, in some cases significantly, and can improve compile time of ptxas as a result.
-
Kazu Hirata authored
Moving the contents of Coefficients saves 0.43% of heap allocations during the compilation of a large preprocessed file, namely X86ISelLowering.cpp, for the X86 target.
-
Philip Reames authored
The two single source cases aren't effected by the swap or select matching as those are dual operand specific. Similarly, a two source shuffle can't be a rotate. We can extend this idea for some of the shuffle types above, but some of them are validly either single or dual source. We don't want to loose that and the code complexity of versioning early and having to repeat some shuffle kinds doesn't (currently) seem worth it.
-
Jan Svoboda authored
After building the ClangdXPC target, `ninja clean` fails with the following error: ``` ninja: error: remove(lib/ClangdXPC.framework): Directory not empty ninja: error: remove(<build>/lib/ClangdXPC.framework): Directory not empty ``` I did not find better way to make this work. I guess we could list all generated files (and directories) in `OUTPUT` of the custom command, but that seems fairly tedious/fragile.
-
ostannard authored
This adds a '!loc' field to each record containing the file name and line number of the record declaration.
-
Louis Dionne authored
The "scheduled build" pipeline on BuildKite had been disabled for months and doesn't exist anymore, so this script is effectively dead code. When we set up a cron-activated build again, we should do it using Github actions (which could trigger a BK pipeline if needed). Keeping this script around just creates additional confusion about what's used and what's not used for doing CI.
-
Valentin Clement (バレンタイン クレメン) authored
Lower basic DO CONCURRENT with acc loop construct. The DO CONCURRENT is lowered to an acc.loop operation. This does not currently cover the DO CONCURRENT with locality specs.
-
Fangrui Song authored
A SHN_ABS symbol has never been considered for InputSection::relocateNonAlloc. Before #74686, the code did made it work in the absence of `-z dead-reloc-in-nonalloc=`. There is now a report about such SHN_ABS uses (https://github.com/llvm/llvm-project/pull/74686#issuecomment-1904101711) and I think it makes sense for non-SHF_ALLOC to support SHN_ABS, like SHF_ALLOC sections do. ``` // clang -g __attribute__((weak)) int symbol; int *foo() { return &symbol; } 0x00000023: DW_TAG_variable [2] (0x0000000c) ... DW_AT_location [DW_FORM_exprloc] (DW_OP_addrx 0x0) ``` .debug_addr references `symbol`, which can be redefined by a symbol assignment or --defsym to become a SHN_ABS symbol. The problem is that `!sym.getOutputSection()` cannot discern SHN_ABS from a symbol whose section has been discarded. Since commit 1981b1b6...
-
Philip Reames authored
Follow up to 396b6bbc, sink code into consuming branch, and fix one comment I realized used the misleading wording. (Permute is a specific sub-type of single source shuffle.)
-
Jan Svoboda authored
The files and directories that Clang accesses are uniqued by their inode. For each inode `FileManager` will create exactly one `FileEntry` or `DirectoryEntry` object, which makes answering the question _"Are these two files/directories the same?"_ a simple pointer equality check. However, since the same inode can be accessed through multiple different paths, asking the `FileEntry` or `DirectoryEntry` object _"What is your name?"_ doesn't have clear semantics. In c0ff9908 we started reporting the most recent name used to access the entry, which turned out to be necessary for Clang modules. However, the long-term solution has always been to explicitly track the as-requested name. This has been implemented in 4dc5573a as `FileEntryRef` and `DirectoryEntryRef`. The `DirectoryEntry::getName()` interface has been deprecated since the Clang 17 release and `FileEntry::getName()` since Clang 18. We have replaced uses of these deprecat...
-
Nikita Popov authored
This is currently broken, because the check is performed on the wrong repository. repo here is llvm/llvm-project, which is not a fork (so this will always trigger), then we'll push a new branch to llvmbot/llvm-project, and then again set the wrong owner, so we'll look for the branch in llvm/llvm-project rather than llvmbot/llvm-project. Rather than fixing this, I'm removing the code entirely, as it shouldn't be needed anymore (llvmbot/llvm-project is a fork of llvm/llvm-project).
-
Christian Sigg authored
-
Christian Sigg authored
-
Philip Reames authored
This builds on bdc41106. This change completes the migration to a recursive shuffle lowering strategy where when we encounter an unknown two argument shuffle, we lower each operand as a single source permute, and then use a vselect (i.e. a vmerge) to combine the results. This relies for code quality on the post-isel combine which will aggressively fold that vmerge back into the materialization of the second operand if possible. Note: The change includes only the most immediately obvious of the stylistic cleanup. There's a bunch of code movement that this enables that I'll do as a separate patch as rolling it into this creates an unreadable diff.
-
Danial Klimkin authored
and keep things sorted.
-
Louis Dionne authored
-
- Jan 24, 2024
-
-
Louis Dionne authored
-
Christian Sigg authored
-
Jan Leyonberg authored
This patch adds the omp.distribute operation to the OMP dialect. The purpose is to be able to represent the distribute construct in OpenMP with the associated clauses. The effect of the operation is to distributes the loop iterations of the loop(s) contained inside the region across multiple teams.
-
Louis Dionne authored
-
Ivan Kosarev authored
Part of <https://github.com/llvm/llvm-project/issues/62629>.
-
Christian Sigg authored
-
quic-asaravan authored
This patch inlines float division function calls for hexagon. Co-authored-by:Awanish Pandey <awanpand@codeaurora.org>
-
Jeremy Morse authored
We're using this flag (IsNewDbgInfoFormat) to detect the boundaries in LLVM of what's treating debug-info as intrinsics (i.e. dbg.value), and what's using DPValue objects (the non-intrinsic replacement). The attributor tends to create new wrapper functions and doesn't insert them into Modules in the usual way, thus we have to manually update that flag to signal what debug-info mode it's using. I've added some --try-experimental-debuginfo-iterators RUN lines to tests that would otherwise crash because of this, so that they're exercised by our new-debuginfo-iterators buildbot. NB: there's an attributor test with a dbg.value in it, however attributes re-order themselves in RemoveDIs mode for various reasons, so we're going to address that in a different patch.
-
Timm Bäder authored
-
felixh5678 authored
Co-authored-by:
Tue Ly <lntue@google.com> Co-authored-by:
Felix <felix@Dirks-MacBook-Pro.local>
-
Tom Stellard authored
CMAKE_TRY_COMPILE_TARGET_TYPE defaults to EXECUTABLE, which causes any feature detection code snippet without a main function to fail, so we need to make sure it gets explicitly set to STATIC_LIBRARY. Bug: https://github.com/ROCm/rocFFT/issues/439 Bug: https://github.com/ROCm/rocBLAS/issues/1350 Bug: https://bugs.gentoo.org/916069 Closes: https://github.com/llvm/llvm-project/pull/69842 Reviewed by: thesamesam, mgorny
-
Jay Foad authored
-
Nikita Popov authored
We should use the normal github.token for interacting with issues/PRs on the repo, and separately pass the `--branch-repo-token` for creating the branch in the llvmbot repo.
-