aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-10-07[NFC] Refactor ThinBackendusers/kyulee-com/thinback2Kyungwoo Lee2-78/+104
- Change it to a type from a function. - Store the parallelism in the type for the future use.
2024-10-07[Clang] Check that we have the correct RecordDecl (#111448)Bill Wendling1-1/+1
Ensure we have the correct RecordDecl before returning the Expr we're looking for.
2024-10-07[WebAssembly] Allow try_table to target loops in AsmTypeCheck (#111432)Heejin Ahn4-6/+72
2024-10-07Revert "[ELF] Change Ctx::target to unique_ptr (#111260)" (#111449)Paul Kirth19-81/+122
This patch seems to be breaking the windows build bots. https://lab.llvm.org/buildbot/#/builders/63/builds/1953 We also see this in Fuchsia's Linux CI: https://fxbug.dev/372010530 This reverts commit 4ec06b17435e32ece5e1aa2bc8a6d26dbf0bb312.
2024-10-07[SandboxIR][NFC] Use accessor for DataLayout rather than passing it down ↵Sterling-Augustine2-19/+19
(#111447)
2024-10-07[mlir][debuginfo] Add support for subprogram annotations (#110946)Walter Erquinigo12-24/+127
LLVM already supports `DW_TAG_LLVM_annotation` entries for subprograms, but this hasn't been surfaced to the LLVM dialect. I'm doing the minimal amount of work to support string-based annotations, which is useful for attaching metadata to functions, which is useful for debuggers to offer features beyond basic DWARF. As LLVM already supports this, this patch is not controversial.
2024-10-07Added include of common interfaces (#111374)gbMattN1-0/+2
Pull request for issue #110823 Including the file which defines the macros we use here. This would let user code only include this interface, rather than having to include two files.
2024-10-07[libc++] Document the de-facto status of compiler extension support (#110877)Louis Dionne1-0/+9
This was brought up in a maintainer's meeting a few months ago. This simply documents the current status quo.
2024-10-07[rtsan] Add stats summary even when halt_on_error=true (#110165)Chris Apple2-2/+10
2024-10-07[rtsan][NFC] Refactor to scoped bypasser for __rtsan::Context (#111438)Chris Apple2-2/+18
2024-10-07[scudo] Fix isOwned on MTE devices. (#111060)Evgenii Stepanov2-2/+10
If called on address that is actually not owned, the tags could not match. Disable tag checks in isOwned().
2024-10-07[LLVM][AsmParser] Make error reporting of lexer errors more precise (#111077)Rahul Joshi9-37/+75
When the lexer hits an error during assembly parsing, it just logs the error in the `ErrorMsg` object, and it's possible that error gets overwritten later in by the parser with a more generic error message. This makes some errors reported by the LLVM's asm parser less precise. Address this by not having the parser overwrite the message logged by the lexer by assigning error messages generated by the lexer higher "priority" than those generated by parser and overwriting the error message only if its same or higher priority. Update several Assembler unit test to now check the more precise error messaged reported by the LLVM's AsmParser.
2024-10-07Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (#102835)Dmitrii Galimzianov1-6/+23
When we search for a symbol, we first check if it is in the module_sp of the current SymbolContext, and if not, we check in the target's modules. However, the target's ModuleList also includes the already checked module, which leads to a redundant search in it.
2024-10-07[WebAssembly] Merge eh-assembly-legacy.s into eh-assembly.s (#111411)Heejin Ahn2-99/+90
Now that we don't need to specify `--no-type-check` on `eh-assembly.s`, we can test the two modes in the same file.
2024-10-07[rtsan][compiler-rt] Get rid of [[blocking]] stub in tests (#111392)Chris Apple1-19/+14
2024-10-07[flang] Catch errors with INTENT(OUT) assumed rank dummy arguments (#111204)Peter Klausler3-30/+189
Emit an error when an actual argument with potentially unknown size (assumed size, or non-pointer non-allocatable assumed rank) with any risk of needing initialization, finalization, or destruction is associated with an INTENT(OUT) dummy argument with assumed rank. Emit an optional portability warning for cases where the type is known to be safe from needing initialization, finalization, or destruction, since it's not conforming and might elicit an error from other compilers. Fixes https://github.com/llvm/llvm-project/issues/111120.
2024-10-07[flang] Silence bogus error message (#111057)Peter Klausler2-7/+8
Fortran doesn't permit the use of a polymorphic I/O list item for intrinsic data transfers, so the compiler emits an error message for polymorphic items whose types can't possibly be handled by a defined I/O subroutine. This check didn't allow for the possibility that the defined I/O subroutine might apply to the parent component of an extended type. Fixes https://github.com/llvm/llvm-project/issues/111021.
2024-10-07[flang] Finer error detection in separate module procedure case (#110912)Peter Klausler3-6/+31
When a separate module procedure has a dummy procedure argument that is simply declared EXTERNAL in its interface but is actually called as a subroutine or function in its definition, the compiler is emitting an error message. This is too strong; an error is appropriate only when the dummy procedure in the definition has an interface that is incompatible with the one in the interface definition. However, this is not a safe coding practice, and can lead to trouble during execution if a function is passed as an actual argument but called as a subroutine in the procedure (or the other way around), so add a warning message as well for this case (off by default). Fixes https://github.com/llvm/llvm-project/issues/110797.
2024-10-07[flang] Fix typo in warning message text (#110888)Peter Klausler1-1/+1
I accidentally deleted a space character; put it back.
2024-10-08AMDGPU: Add noalias.addrspace metadata when autoupgrading atomic intrinsics ↵Matt Arsenault2-22/+36
(#102599) This will be needed to continue generating the raw instruction in the flat case.
2024-10-07[CIR] Add .clang-tidy files for ClangIR specific coding style rulesNathan Lanza3-0/+177
https://llvm.github.io/clangir/GettingStarted/coding-guideline.html Reviewers: dkolsen-pgi, bcardosolopes, erichkeane Reviewed By: erichkeane, dkolsen-pgi Pull Request: https://github.com/llvm/llvm-project/pull/111417
2024-10-07[clang] Don't lose track of explicit specializations of member function ↵Matheus Izvekov3-13/+39
templates (#111267) When instantiating a class template, we would lose track of function template explicit specializations, marking them with the wrong specialization kind. This would lead to improperly using the explcit specialization arguments to instantiate the function body. This also better matches MSVC on the behaviour of explicitly vs implicitly instantiating these. Fixes #111266
2024-10-07[SandboxVectorizer][NFC] Remove erroneous expensive check assert (#111425)Sterling-Augustine1-5/+0
2024-10-07[SandboxIR][NFC] Remove unused include (#111422)Sterling-Augustine1-1/+1
2024-10-07[RFC] IR: Define noalias.addrspace metadata (#102461)Matt Arsenault8-10/+337
This is intended to solve a problem with lowering atomics in OpenMP and C++ common to AMDGPU and NVPTX. In OpenCL and CUDA, it is undefined behavior for an atomic instruction to modify an object in thread private memory. In OpenMP, it is defined. Correspondingly, the hardware does not handle this correctly. For AMDGPU, 32-bit atomics work and 64-bit atomics are silently dropped. We therefore need to codegen this by inserting a runtime address space check, performing the private case without atomics, and fallback to issuing the real atomic otherwise. This metadata allows us to avoid this extra check and branch. Handle this by introducing metadata intended to be applied to atomicrmw, indicating they cannot access the forbidden address space.
2024-10-07Remove redundant checks related to quantized type (#110604)Sandeep Dasgupta2-5/+1
[APFloat::getSmallest](https://github.com/llvm/llvm-project/blob/915df1ae41652e2f595ce741dcd8f01878ef4e30/llvm/include/llvm/ADT/APFloat.h#L1060) (and similarly `APFloat:getLargest`) ``` APFloat getSmallest(const fltSemantics &Sem, bool Negative = false); ``` return the positive number when the default value for the second argument is used. With that being said, the check [QuantTypes.cpp#L325](https://github.com/llvm/llvm-project/blob/96f37ae45310885e09195be09d9c05e1c1dff86b/mlir/lib/Dialect/Quant/IR/QuantTypes.cpp#L325) ```c++ if (scale <= 0.0 || std::isinf(scale) || std::isnan(scale)) return emitError() << "illegal scale: " << scale; ``` is already covered by the check which follows [QuantTypes.cpp#L327](https://github.com/llvm/llvm-project/blob/96f37ae45310885e09195be09d9c05e1c1dff86b/mlir/lib/Dialect/Quant/IR/QuantTypes.cpp#L327) ```c++ if (scale < minScale || scale > maxScale) return emitError() << "scale out of expressed type range [" << minScale << ", " << maxScale << "]"; ``` given that range `[positive-smallest-finite-number, positive-largest-finite-number]` does not include `inf` and `nan`s. I propose to remove the redundant check. Any suggestion for improving the error message is welcome.
2024-10-07[SandboxVectorizer][NFC] Remove unused include (#111418)Sterling-Augustine1-2/+1
2024-10-07[clang-tidy] Fix incorrect command-line option in docs (#111405)hill1-1/+1
Updated the `HeaderFilterRegex` description to reference `--header-filter` instead of the incorrect `--header-filter-regex` in the clang-tidy documentation.
2024-10-07Revert "[RISCV][TTI] Recognize CONCAT_VECTORS if a shufflevector mask is ↵Philip Reames5-74/+3
multiple insert subvector. (#110457)" This reverts commit 554eaec63908ed20c35c8cc85304a3d44a63c634. Change was not approved when landed.
2024-10-07[lldb][test] Support remote run of Shell tests (#95986)Vladislav Dzhidzhoev11-31/+136
1. This commit adds LLDB_TEST_PLATFORM_URL, LLDB_TEST_SYSROOT, LLDB_TEST_PLATFORM_WORKING_DIR, LLDB_SHELL_TESTS_DISABLE_REMOTE cmake flags to pass arguments for cross-compilation and remote running of both Shell&API tests. 2. To run Shell tests remotely, it adds 'platform select' and 'platform connect' commands to %lldb substitution. 3. 'remote-linux' feature added to lit to disable tests failing with remote execution. 4. A separate working directory is assigned to each test to avoid conflicts during parallel test execution. 5. Remote Shell testing is run only when LLDB_TEST_SYSROOT is set for building test sources. The recommended compiler for that is Clang. --------- Co-authored-by: Vladimir Vereschaka <vvereschaka@accesssoftek.com>
2024-10-07[SandboxVectorizer] Define SeedBundle: a set of instructions to be ↵Sterling-Augustine5-1/+325
vectorized [retry] (#111073) [Retry 110696 with a proper rebase.] Seed collection will assemble instructions to be vectorized into SeedBundles. This data structure is not intended to be used directly, but will be the basis for load bundles, store bundles, and so on.
2024-10-07[Clang] omit parentheses in fold expressions with a single expansion (#110761)Oleksandr T.8-2/+77
Fixes #101863
2024-10-07[MLIR] AMDGPUToROCDL: Use a bitcast op to reintepret a vector of i8 as ↵Benoit Jacob2-35/+25
single integer. (#111400) Found by inspecting AMDGPU assembly - so the arithmetic ops created there were definitely making their way into the target ISA. A `LLVM::BitcastOp` seems equivalent, and evaporates as expected in the target asm. Along the way, I thought that this helper function `mfmaConcatIfNeeded` could be renamed to `convertMFMAVectorOperand` to better convey its contract; so I don't need to think about whether a bitcast is a legitimate "concat" :-) --------- Signed-off-by: Benoit Jacob <jacob.benoit.1@gmail.com>
2024-10-07[llvm][gold] Fix syntax error (#111412)Paul Kirth1-1/+1
This seems to have been overlooked in #109847, probably because most bots don't build w/ gold enabled.
2024-10-07[FMV][AArch64][NFC] Cleanup attribute metadata from test files. (#111386)Alexandros Lamprineas6-194/+146
We have a dedicated test to check the target-features for FMV (clang/test/CodeGen/aarch64-fmv-dependencies.c) therefore I am removing the autogenerated checks from irrelevant tests since the noise is making it harder to review actual codegen changes.
2024-10-07[DirectX] Fix broken test and accidental fallthrough in #110616 (#111410)Justin Bogner2-7/+7
Fix an obvious typo in these tests to get them passing, and also fix the -Wimplicit-fallthrough warning that fires when trying to build. Reverting #110616 was tricky because of dependencies, so I'm just doing the easy fix directly here.
2024-10-07[WebAssembly] Support type checker for new EH (#111069)Heejin Ahn5-15/+113
This adds supports for the new EH instructions (`try_table` and `throw_ref`) to the type checker. One thing I'd like to improve on is the locations in the errors for `catch_***` clauses. Currently they just point to the starting column of `try_table` instruction itself. But to figure out where catch clauses start you need to traverse `OperandVector` and check `WebAssemblyOperand::isCatchList` on them to see which one is the catch list operand, but `WebAssemblyOperand` class is in AsmParser and AsmTypeCheck does not have access to it: https://github.com/llvm/llvm-project/blob/cdfdc857cbab0418b7e5116fd4255eb5566588bd/llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp#L43-L204 And even if AsmTypeCheck has access to it, currently it treats the list of catch clauses as a single `WebAssemblyOperand` so there is no way to get the starting location of each `catch_***` clause in the current structure. This also renames `valTypeToStackType` to `valTypesToStackTypes`, given that it takes two type lists.
2024-10-07[flang] Remove failing integration testNimish Mishra1-42/+0
2024-10-07[clang] Fix std::tm etc. mangling on Solaris (#106353)Rainer Orth4-3/+60
Recently, Solaris bootstrap got broken because Solaris uses a non-standard mangling of `std::tm` and a few others. This was fixed with a hack in PR #100724. The Solaris ABI requires mangling `std::tm` as `tm` and similarly for `std::div_t`, `std::ldiv_t`, and `std::lconv`, which is what this patch implements. The hack needs to stay in place to allow building with older versions of `clang`. Tested on `amd64-pc-solaris2.11`, `sparcv9-sun-solaris2.11` (2-stage builds with both `clang-19` and `gcc-14` as build compiler), and `x86_64-pc-linux-gnu`.
2024-10-07[MLIR] Don't drop attached discardable attributes (#111261)Prashant Kumar2-5/+21
The creation of pack op was dropping discardable attributes.
2024-10-07[LLDB][DYLD] Remove logic around not rebasing when main executable has a ↵Jacob Lalonde1-15/+0
load address (#110885) This is a part of #109477 that I'm making into it's own patch. Here we remove logic from the DYLD that prevents it's logic from running if the main executable already has a load address. Instead we let the DYLD fully determine what should be loaded and what shouldn't.
2024-10-07Make env and source map dictionaries #95137 (#106919)Da-Viper10-33/+266
Fixes #95137
2024-10-07[clang][x86] Update MMX intrinsic tests for both C/C++ and 32/64-bit targetsSimon Pilgrim1-0/+2
2024-10-07[clang][x86] Update AVX512F intrinsic tests for both C/C++Simon Pilgrim1-1465/+1467
Requires some better checking of labels and some call instructions to handle additional markers
2024-10-07Reapply "[SPIRV] Add radians intrinsic"Justin Bogner4-0/+102
I had too many tabs open and reverted #110800 by mistake, it was supposed to be #110616. This reverts commit dec6fe3de0f6475ea83391e5b0b4036cf56db35b.
2024-10-07Revert "[SPIRV] Add radians intrinsic" (#111398)Justin Bogner4-102/+0
Reverts llvm/llvm-project#110800 `llvm\test\CodeGen\DirectX\radians.ll` is failing after this change. @adam-yang please send a new PR with the issue resolved once you've had time to investigate.
2024-10-07[LLD] Deprecate --lto-basic-block-sections=labels (#110697)Rahman Lavaee2-2/+6
This option is now replaced by `--lto-basic-block-address-map`.
2024-10-07[memprof] Simplify code with MapVector::operator[] (NFC) (#111335)Kazu Hirata1-5/+2
Note that the following are all equivalent to each other: Map.insert({Key, Value()}).first->second Map.try_emplace(Key).first->second Map[Key]
2024-10-07[lldb][test] TestDataFormatterLibcxxOptionalSimulator.py: don't use ↵Michael Buch1-2/+1
__builtin_printf This caused Windows CI to fail with: ``` Build Command Output: make: Entering directory 'C:/Users/tcwg/llvm-worker/lldb-aarch64-windows/build/lldb-test-build.noindex/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/optional/TestDataFormatterLibcxxOptionalSimulator.test_r0' "C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\bin\clang++.exe" -std=c++11 -gdwarf -O0 -IC:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\packages\Python\lldbsuite\test\make/../../../../..//include -IC:/Users/tcwg/llvm-worker/lldb-aarch64-windows/build/tools/lldb/include -IC:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\test\API\functionalities\data-formatter\data-formatter-stl\libcxx-simulators\optional -IC:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\packages\Python\lldbsuite\test\make -include C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\packages\Python\lldbsuite\test\make/test_common.h -fno-limit-debug-info -fno-exceptions -D_HAS_EXCEPTIONS=0 -fms-compatibility-version=19.0 -std=c++14 -DREVISION=0 -std=c++14 --driver-mode=g++ -MT main.o -MD -MP -MF main.d -c -o main.o C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\test\API\functionalities\data-formatter\data-formatter-stl\libcxx-simulators\optional/main.cpp C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\build\bin\clang.exe main.o -gdwarf -O0 -IC:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\packages\Python\lldbsuite\test\make/../../../../..//include -IC:/Users/tcwg/llvm-worker/lldb-aarch64-windows/build/tools/lldb/include -IC:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\test\API\functionalities\data-formatter\data-formatter-stl\libcxx-simulators\optional -IC:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\packages\Python\lldbsuite\test\make -include C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\packages\Python\lldbsuite\test\make/test_common.h -fno-limit-debug-info -fuse-ld=lld --driver-mode=g++ -o "a.out" lld-link: error: undefined symbol: printf >>> referenced by main.o:(main) clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [Makefile.rules:515: a.out] Error 1 make: Leaving directory 'C:/Users/tcwg/llvm-worker/lldb-aarch64-windows/build/lldb-test-build.noindex/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/optional/TestDataFormatterLibcxxOptionalSimulator.test_r0' ```
2024-10-07[lldb][test] Mark test() in TestBSDArchives.py as passing remotely (#111199)Vladislav Dzhidzhoev1-1/+0
It was xfail'ed in de2ddc8f3146b. However, it passes on a buildbot https://lab.llvm.org/staging/#/builders/195/builds/3988.