summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [𝘀𝗽𝗿] changes introduced through rebaseupstream/users/fmayer/sprmain.scudo-allow-to-resize-allocation-ring-bufferFlorian Mayer2024-02-23657-10844/+36382
|\ | | | | | | | | | | Created using spr 1.3.4 [skip ci]
| * [NFC] Make RingBuffer an atomic pointer (#82547)Florian Mayer2024-02-231-62/+86
| | | | | | | | | | This will allow us to atomically swap out RingBuffer and StackDepot. Patched into AOSP and ran debuggerd_tests.
| * [llvm-link] Improve missing file error message (#82514)Michael Halkenhäuser2024-02-231-1/+9
| | | | | | | | | | | | | | Add error messages showing the missing filenames. Currently, we only get 'No such file or directory' without any(!) further info. This patch will (only upon ENOENT error) iterate over all requested files and print which ones are actually missing.
| * [clangd] Fix renaming single argument ObjC methods (#82396)David Goldman2024-02-232-5/+152
| | | | | | | | | | | | | | | | Use the legacy non-ObjC rename logic when dealing with selectors that have zero or one arguments. In addition, make sure we don't add an extra `:` during the rename. Add a few more tests to verify this works (thanks to @ahoppen for the tests and finding this bug).
| * [gn build] Port 5874874c2472LLVM GN Syncbot2024-02-231-0/+1
| |
| * [SelectionDAG] Introducing the SelectionDAG pattern matching framework (#78654)Min-Yih Hsu2024-02-233-0/+987
| | | | | | | | | | Akin to `llvm::PatternMatch` and `llvm::MIPatternMatch`, the `llvm::SDPatternMatch` introduced in this patch provides a DSL-alike framework to match SDValue / SDNode with a more succinct syntax.
| * [mlir][sparse] cleanup sparse runtime library (#82807)Aart Bik2024-02-235-121/+12
| | | | | | | | remove some obsoleted APIs from the library that have been fully replaced with actual direct IR codegen
| * [flang][bbc] Fix dangling reference to `envDefaults` (#82800)Krzysztof Parzyszek2024-02-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | The lowering bridge stores the evvironment defaults (passed to the constructor) as a reference. In the call to the constructor in bbc, the defaults were passed as `{}`, which creates a temporary whose lifetime ends immediately after the call. The flang driver passes a member of the compilation instance to the constructor, which presumably remains alive long enough, so storing the reference in the bridge is justified. To avoid the dangling reference, create an actual object `envDefaults` in bbc.
| * [AMDGPU] Simplify AMDGPUDisassembler::getInstruction by removing Res. (#82775)Jay Foad2024-02-232-151/+119
| | | | | | | | | | | | Remove all the code that set and tested Res. Change all convert* functions to return void since none of them can fail. getInstruction only has one main point of failure, after all calls to tryDecodeInst have failed.
| * [SelectionDAG] Remove unused VP strided load/store creation functions that ↵Craig Topper2024-02-232-113/+8
| | | | | | | | | | | | | | | | build an MMO. (#82676) The base case of these call InferPtrInfo. This is dangerous due to #82657, but it turns out none of these are used. It seemed best to reduce the surface area until these are needed.
| * [OpenACC] Fix branch-in/out to not refer to a 'region'erichkeane2024-02-232-8/+8
| | | | | | | | | | 'region' is not a term of art in OpenACC, so switch it to refer to 'Compute Construct', which is accurate/reflects the standard.
| * [FPEnv][SystemZ] Correct strictfp test.Kevin P. Neal2024-02-231-12/+12
| | | | | | | | | | | | | | | | | | | | Correct llvm-reduce strictfp test to follow the rules documented in the LangRef: https://llvm.org/docs/LangRef.html#constrained-floating-point-intrinsics This test needed the strictfp attribute added to function definitions. Test changes verified with D146845.
| * [libc] Fix standard cross build targeting the GPU (#82724)Joseph Huber2024-02-232-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The GPU target has recently been changed to support standard `libc` build rules. This means we should be able to build for it both in `LLVM_ENABLE_PROJECTS` mode, or targeting the runtimes directory directly as in the LLVM `libc` documentation. Previously this failed because the version check on the compiler was too strict and the `--target=` options were not being set on the link jobs unless in CMake cross compiliation mode. This patch fixes those so the following config should work now to build the GPU target directly if using NVPTX. ``` cmake ../runtimes -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang \ -DLLVM_ENABLE_RUNTIMES=libc -DLLVM_RUNTIMES_TARGET=nvptx64-nvidia-cuda \ -DLLVM_DEFAULT_TARGET_TRIPLE=nvptx64-nvidia-cuda \ -DLIBC_HDRGEN_EXE=/path/to/hdrgen/libc-hdrgen \ -DLLVM_LIBC_FULL_BUILD=ON -GNinja ```
| * [libc][NFC] Remove redundant external clock symbol for AMDGPU (#82794)Joseph Huber2024-02-231-6/+0
| | | | | | | | | | | | | | Summary: The AMDGPU target needs an external clock symbol so the driver can set the frequency with the correct value. This was left over from the previous implementation and I forgot to remove it when actually implementing the timing utilities.
| * [hwasan] Add missing printf parameter in __hwasan_handle_longjmp (#82559)Thurston Dang2024-02-231-1/+1
| | | | | | | | | | The diagnostic message had four format specifiers but only three parameters. This patch adds what I assume to be the missing parameter.
| * [AMDGPU][NFC] Have helpers to deal with encoding fields. (#82772)Ivan Kosarev2024-02-2310-89/+74
| | | | | | | | | | These are hoped to provide more convenient and less error prone facilities to encode and decode fields than manually defined constants and functions.
| * [NFC] clean up memtag-stack code (#80906)Florian Mayer2024-02-231-9/+2
| | | | | | | | | | we would replace the alloca with tagp for debug instructions, then replace it back with the original alloca. it's easier to just skip the replacement.
| * [mlir][ArmSME] Follow MLIR constant style in VectorLegalization.cpp (NFC)Benjamin Maxwell2024-02-231-14/+14
| |
| * [VPlan] Remove unused VPTransformState::CanonicalIV (NFCI).Florian Hahn2024-02-231-3/+0
| | | | | | | | Clean up unused member variable.
| * [mlir][Transforms] Fix crash in dialect conversion (#82783)Matthias Springer2024-02-231-5/+5
| | | | | | | | | | This is a follow-up to #82333. It is possible that the target block of a `BlockTypeConversionRewrite` is detached, so the `MLIRContext` cannot be taken from the block.
| * Improve and modernize logging for Process::CompleteAttach() (#82717)Adrian Prantl2024-02-231-7/+4
| | | | | | | | | | | | Target::SetArchitecture() does not necessarily set the triple that is being passed in, and will unconditionally log the real architecture to the log channel. By flipping the order between the log outputs, the resulting combined log makes a lot more sense to read.
| * [AArch64][SVE] Add intrinsincs to assembly mapping for svpmov (#81861)Lukacma2024-02-233-126/+47
| | | | | | | | This patch enables translation of svpmov intrinsic to the correct assembly instruction, instead of function call.
| * [mlir][linalg] `LinalgOp`: Disallow mixed tensor/buffer semantics (#80660)Matthias Springer2024-02-234-81/+29
| | | | | | | | | | | | Related discussion: https://github.com/llvm/llvm-project/pull/73908/files#r1414913030. This change fixes #73547.
| * [RISCV][NFC] Allow SchedVar to be a def inside our scheduler model files. ↵Michael Maitland2024-02-232-8/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#82634) All SchedModel files have a line that looks like: ``` def SomeModel : SchedMachineModel; let SchedModel = SomeModel in { ... } ``` TableGen requires that all records defined within the top level `let` must have a field `SchedModel` somewhere in their nested record hierarchy (i.e. the record has a field `SchedModel : SchedMachineModel` or recursively, one of its members has a field `SchedModel : SchedMachineModel`). Classes such as `SchedPredicate` have added a field `SchedModel : SchedMachineModel`, even though the field is never used, just to supress **errors** (not warnings) caused from having the top level let in the model files. This decision was made to avoid having hundreds of the same `let` statement littered in every scheduler model file. The reason we have never seen an error for `SchedVar` before is because `SchedVar` is never instantiated with a `def`. Instead, it is only created as a value that is consumed by `SchedWriteVariant`: ``` ... : SchedWriteVariant<[SchedVar<...>, SchedVar<...>]>; ``` There is a problem with this style of instantiation. In particular, the problem arises as we try to take a class based approach to building scheduler models. I will describe the problem from the bottom up. The `LMULWriteResMXVariant` multiclass takes in a `SchedPredicateBase Pred`. Today, the RISCVSchedSiFive7.td file defines `VLDSX0Pred` outside the scope of any class. That means that `VLDSX0Pred` exists before `LMULWriteResMXVariant` multiclass is instantiated. With this approach, there is no error since the predicate is instantated in entirety before the variant multiclass is instantiated. However, I have the intention to move the definition of both the predicate and the variant multiclass records inside a multiclass to factor out common parts between multiple scheduler models. I plan to have something like: ``` multiclass SiFive7Base<SiFive7BaseConfig c> { def VLDSX0Pred : ...; // Need defvar since record is prefixed with NAME. defvar VLDSX0Pred = !cast<...>(NAME # VLDSX0Pred); defm SiFive7 : LMULWriteResMXVariant<VLDSX0Pred>; } defm "SiFive7Version1" : SiFive7Base<SiFive7BaseConfig<...>>; defm "SiFive7Version2" : SiFive7Base<SiFive7BaseConfig<...>>; ``` In this scheme, VLDSX0Pred is defined within the same multiclass transaction that the `LMULWriteResMXVariant` is defined in. For some reason, TableGen does not allow `Values` to reference records that were created in the same parent record construction. If the `SchedVar` is not a `def`, then it will not be able to find the record `NAME # VLDSX0Pred`. Making it a def, allows TableGen to find `NAME # VLDSX0Pred` in scope. The simplest example of this is: ``` class A {} class B<A a> { A x = a;} class C<B b> { B y = b;} multiclass D { def MyA : A; defvar aa = !cast<A>(NAME # MyA); // This works def : B<aa>; // This does not work because constructing B by value cannot find `NAME # MyA` // error: Undefined reference to record: 'MyA' def : C<B<aa>>; // To fix it, define it like such: def MyB : B<aa>; defvar bb = !cast<B>(NAME # MyB); def : C<bb>; } defm "" : D; ``` In summary, in order to use a class based approach to creating scheduler resources to promote resusability, `SchedVar`s must be created using defs instead of being instantiated by value so that it can resolve records that were part of the instantiation of the parent record being created. In order to do this without refactoring the top level `let` statement that all scheduler model files use, we add an unused field `SchedModel : SchedMachineModel` to `SchedVar`, similiar to what has been done in `SchedPredicate`.
| * build_llvm_release.bat: add tarball export to x64 release (#79840)Benoît Amiaux2024-02-231-0/+9
| | | | | | | | | | | | | | | | | | | | Like linux releases, export a tar.xz files containing most llvm tools, including non toolchain utilities, llvm-config, llvm-link and others. We do this by reconfiguring cmake one last time at the last step, running the install target so we do not need to recompile anything. Fix #51192 Fix #53052
| * [RemoveDIs] Enable DPLabels conversion [3b/3] (#82639)Orlando Cazalet-Hyams2024-02-233-8/+45
| | | | | | Enables conversion between llvm.dbg.label and DPLabel.
| * [NFC] Precommit a memcpy test for isOrEquivalentToAdd (#82758)hev2024-02-231-0/+34
| |
| * [LLVM] Fix incorrect GPU triple detection for runtimes buildsJoseph Huber2024-02-231-4/+4
| | | | | | | | | | | | | | | | Summary: This block of code is used to prevent a GPU-based cross compiling build from taking incompatible arguments. However this incorrectly used the LLVM default triple instead of the runtimes target. Fix that so the bots can continue to default the triple to NVPTX.
| * [mlir] Fix memory leaks after #81759 (#82762)Matthias Springer2024-02-232-12/+14
| | | | | | | | | | | | | | | | | | This commit fixes memory leaks that were introduced by #81759. The way ops and blocks are erased changed slightly. The leaks were caused by an incorrect implementation of op builders: blocks must be created with the supplied builder object. Otherwise, they are not properly tracked by the dialect conversion and can leak during rollback.
| * [clang][Interp] Don't return success for already failed global variablesTimm Bäder2024-02-232-0/+9
| | | | | | | | | | | | We might be visiting them more than once. We used to return true for second and subsequent cases, just because we had already visited it before.
| * [libcxx][test] Change UNSUPPORTED to XFAIL for target-related failures (#81513)Abhina Sree2024-02-2334-46/+33
| | | | | | | | | | | | This is a followup from this discussion https://github.com/llvm/llvm-project/pull/80735#discussion_r1486586017 to mark targets that were initially marked as UNSUPPORTED with an XFAIL instead.
| * [ValueTracking] Handle more integer intrinsics in `propagatesPoison` (#82749)Yingwei Zheng2024-02-233-38/+40
| | | | | | | | | | | | This patch extends `propagatesPoison` to handle more integer intrinsics. It will turn more logical ands/ors into bitwise ands/ors. See also https://reviews.llvm.org/D99671.
| * Users/tsitdikov (#82757)tsitdikov2024-02-232-0/+4
| | | | | | Fix Test ARM SME library and build rule.
| * [ClangFormat] Fix indent in child lines within a macro argument. (#82523)r4nt2024-02-236-73/+163
| | | | | | | | | | When reconstructing lines from a macro expansion, make sure that lines at different levels in the expanded code get indented correctly as part of the macro argument.
| * [MLIR] Expose approximation patterns for tanh/erf. (#82750)Johannes Reifferscheid2024-02-232-0/+13
| | | | | | | | | | | | | | | | | | | | These patterns can already be used via populateMathPolynomialApproximationPatterns, but that includes a number of other patterns that may not be needed. There are already similar functions for expansion. For now only adding tanh and erf since I have a concrete use case for these two.
| * [Clang] Fix acle_sme_zero.c once more.Sander de Smalen2024-02-231-0/+2
| |
| * [RISCV] Disable generation of asynchronous unwind tables for RISCV baremetal ↵Garvit Gupta2024-02-233-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#81727) The below culprit patch enabled the generation of asynchronous unwind tables (-funwind-tables=2) by default for RISCV for both linux and RISCVToolChain baremetal object. However, since there are 2 baremetal toolchain objects for RISCV, this created a discrepancy between their behavior. Moreover, enabling the generation of asynchronous unwind tables based on whether `-gcc-toolchain` option is present or not doesn't seem to be the best criteria to decide on the same. This patch make the behavior consistent by disabling the unwind tables in RISCVToolChain Baremetal object. Culprit Patch - https://reviews.llvm.org/D145164
| * Add TestArmSME dependency to mlir-opt library.tsitdikov2024-02-231-0/+1
| | | | | | TestArmSME was added in https://github.com/llvm/llvm-project/commit/e1326434742980b03433464dd9435ea66ad5be47, now we need to add dependency on it.
| * [mlir][NFC] Fix format specifier warning on WindowsMarkus Böck2024-02-231-1/+2
| | | | | | | | | | | | `%ld` specifier is defined to work on values of type `long`. The parameter given to `fprintf` is of type `intptr_t` whose actual underlying integer type is unspecified. On Unix systems it happens to commonly be `long` but on 64-bit Windows it is defined as `long long`. The cross-platform way to print a `intptr_t` is to use `PRIdPTR` which expands to the correct format specifier for `intptr_t`. This avoids any undefined behaviour and compiler warnings.
| * [AMDGPU] Fix encoding of VOP3P dpp on GFX11 and GFX12 (#82710)Stanislav Mekhanoshin2024-02-2311-22/+25
| | | | | | | | The bug affects dpp forms of v_dot2_f32_f16. The encoding does not match SP3 and does not set op_sel_hi bits properly.
| * Add build rule for MLIRArmSMETestPassestsitdikov2024-02-231-0/+17
| | | | | | MLIRArmSMETestPasses was added in https://github.com/llvm/llvm-project/commit/b39f5660a408b47307e57a0882eb8af85d72e283, we need to add a build rule for it as well.
| * [Clang] Fix acle_sme_zero.c (missing aarch64-registered-target)Sander de Smalen2024-02-231-0/+1
| | | | | | | | This test was added in #82648
| * [RemoveDIs] Add DPLabels support [3a/3] (#82633)Orlando Cazalet-Hyams2024-02-2313-44/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch 2 of 3 to add llvm.dbg.label support to the RemoveDIs project. The patch stack adds the DPLabel class, which is the RemoveDIs llvm.dbg.label equivalent. 1. Add DbgRecord base class for DPValue and the not-yet-added DPLabel class. 2. Add the DPLabel class. -> 3. Add support to passes. The next patch, #82639, will enable conversion between dbg.labels and DPLabels. AssignemntTrackingAnalysis support could have gone two ways: 1. Have the analysis store a DPLabel representation in its results - SelectionDAGBuilder reads the analysis results and ignores all DbgRecord kinds. 2. Ignore DPLabels in the analysis - SelectionDAGBuilder reads the analysis results but still needs to iterate over DPLabels from the IR. I went with option 2 because it's less work and is no less correct than 1. It's worth noting that causes labels to sink to the bottom of packs of debug records. e.g., [value, label, value] becomes [value, value, label]. This shouldn't be a problem because labels and variable locations don't have an ordering requirement. The ordering between variable locations is maintained and the label movement is deterministic
| * [Clang][AArch64] Add missing prototypes for streaming-compatible routines ↵Sander de Smalen2024-02-232-2/+63
| | | | | | | | (#82649)
| * [Clang][AArch64] Fix 'svzero_za' intrinsic to take no arguments. (#82648)Sander de Smalen2024-02-232-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | We previously defined svzero_za as: void svzero_za(); rather than: void svzero_za(void); Which meant that Clang accepted arguments. Compiling for example `svzero_za(<non-constant integer>)` ended up with incorrect IR and a compiler crash because it couldn't select an instruction for it.
| * [GlobalISel] Fix a check that aligned tail call is lowered (#82016)Evgenii Kudriashov2024-02-232-1/+25
| | | | | | | | | | | | | | Despite of a valid tail call opportunity, backends still may not generate a tail call or such lowering is not implemented yet. Check that lowering has happened instead of its possibility when generating G_ASSERT_ALIGN.
| * Remove duplicated REQUIRES: assertsBenjamin Kramer2024-02-231-1/+0
| |
| * [clang][Interp][NFC] Print global variable initialization stateTimm Bäder2024-02-233-2/+10
| |
| * [mlir][Transforms][NFC] Decouple `ConversionPatternRewriterImpl` from ↵Matthias Springer2024-02-231-23/+21
| | | | | | | | | | | | | | | | `ConversionPatternRewriter` (#82333) `ConversionPatternRewriterImpl` no longer maintains a reference to the respective `ConversionPatternRewriter`. An `MLIRContext` is sufficient. This commit simplifies the internal state of `ConversionPatternRewriterImpl`.
| * [include-cleaner] Use FoundDecl only for using-shadow-decls (#82615)kadir çetinkaya2024-02-232-15/+24
| |