- Jun 14, 2024
-
-
Florian Mayer authored
This reverts commit ea991a11.
-
Adrian Prantl authored
-
Adrian Prantl authored
The default debug info format for newer versions of Darwin is DWARF 5. https://developer.apple.com/documentation/xcode-release-notes/xcode-16-release-notes rdar://110925733 (relanding 8f6acd97 with the bridgeOS platform check removed)
-
Kerry McLaughlin authored
If a function requires any streaming-mode change, the vector granule value must be stored to the stack and unwind info must also describe the save of VG to this location. This patch adds VG to the list of callee-saved registers and increases the callee-saved stack size if the function requires streaming-mode changes. A new type is added to RegPairInfo, which is also used to skip restoring the register used to spill the VG value in the epilogue. See https://github.com/ARM-software/abi-aa/blob/main/aadwarf64/aadwarf64.rst
-
Arthur Eubanks authored
This reverts commit 00798354. Causes crashes, see comments on https://github.com/llvm/llvm-project/pull/92555.
-
Jonas Devlieghere authored
Support case-insensitive regex matches for `SBTarget::FindGlobalFunctions` and `SBTarget::FindGlobalVariables`.
-
Kazu Hirata authored
commonBits has been deprecated since: commit d8229e2f Author: Jay Foad <jay.foad@amd.com> Date: Wed May 10 16:50:33 2023 +0100
-
Stephen Tozer authored
This patch adds a new set of statistics to llvm-dwarfdump that provide additional information about .debug_line regarding the number of bytes covered by the line table (and how many of those are covered by line 0 entries), and the number of entries within the table and how many of those are is_stmt, unique, or unique and non-line-0 (where "uniqueness" is based on file, line, and column only). Collectively these give a little more insight into the state of debug line information, rather than variables (as most of the dwarfdump statistics are currently oriented towards). I've added all of the stats that were useful to some degree, but I think the most generally useful stat is "unique line entries", since it gives the most straightforward indication of regressions, i.e. when the number goes down it means that fewer source lines are reachable in the program.
-
cmtice authored
Create additional helper functions for the ValueObject class, for: - returning the value as an APSInt or APFloat - additional type casting options - additional ways to create ValueObjects from various types of data - dereferencing a ValueObject These helper functions are needed for implementing the Data Inspection Language, described in https://discourse.llvm.org/t/rfc-data-inspection-language/69893
-
Zhaoshi Zheng authored
LLVM's Vector Predication Intrinsics require an explicit vector length parameter: https://llvm.org/docs/LangRef.html#vector-predication-intrinsics. For a scalable vector type, this should be caculated as VectorScaleOp multiplied by base vector length, e.g.: for <[4]xf32> we should return: vscale * 4.
-
- Jun 13, 2024
-
-
Amy Kwan authored
-
David Stuttard authored
-
Renaud Kauffmann authored
Ahead of https://github.com/llvm/llvm-project/pull/94242 and as requested in the technical call, I am adding a couple of tests for pointer components that I would like to make sure are covered.
-
Craig Topper authored
The custom lowering converts to f32, splats as f32, then narrows the vector to bf16. None of that requires Zvfhmin. Add new bf16 test files without Zvfh/Zvfmin in their RUN lines. I will remove the bf16 tests from other files in a follow up patch.
-
Schrodinger ZHU Yifan authored
-
Craig Topper authored
This isn't used by clang and isn't in the rvv-intrinsic-doc. The instruction requires Zvfh. If the F register passed to the instruction isn't nan-boxed correctly, the instruction will generate the wrong nan. So the instruction isn't a generic move FPR16 to vector register instruction.
-
Stephen Tozer authored
MLIR's LLVM dialect does not internally support debug records, only converting to/from debug intrinsics. To smooth the transition from intrinsics to records, there is a step prior to IR->MLIR translation that switches the IR module to intrinsic-form; this patch adds the equivalent conversion to record-form at MLIR->IR translation. This is a partial reapply of https://github.com/llvm/llvm-project/pull/95098 which can be landed once the flang frontend has been updated by https://github.com/llvm/llvm-project/pull/95306. This is the counterpart to the earlier patch https://github.com/llvm/llvm-project/pull/89735 which handled the IR->MLIR conversion.
-
Shengchen Kan authored
This fixes https://github.com/llvm/llvm-project/issues/95412
-
Helena Kotas authored
Fix warning in SPIRVMergeRegionExitTargets.cpp about "non-void function does not return a value in all control paths" by changing assert to llvm_unreachable.
-
Kazu Hirata authored
-
Matt Arsenault authored
We apparently are missing codegen support for atomicrmw fmin/fmax. Also clean up FP atomicrmw tests to be more consistent and comprehensively test the relevant cases
-
alx32 authored
Currently ObjC category merger only supports categories defined in ObjC. But swift supports generating ObjC categories also. This change adds supports for the later categories.
-
Nikita Popov authored
Reapplying without changes. The flang+openmp buildbot failure should be addressed by https://github.com/llvm/llvm-project/pull/94541. ----- This is a followup to https://github.com/llvm/llvm-project/pull/93823 and drops the DataLayout-unaware GEP of GEP fold entirely. All cases are now left to the DataLayout-aware constant folder, which will fold everything to a single i8 GEP. We didn't have any test coverage for this fold in LLVM, but some Clang tests change.
-
-
Jannick Kremer authored
This fixes #95209
-
Schrodinger ZHU Yifan authored
-
Dmitry Chernenkov authored
clang/lib/CodeGen/MCDCState.h:33:11: error: no template named 'SmallVector' in namespace 'llvm' 33 | llvm::SmallVector<std::array<int, 2>> Indices; | ~~~~~~^ -
Balazs Benics authored
This change enables more accurate modeling of the write effects of `fread`. In particular, instead of invalidating the whole buffer, in a best-effort basis, we would try to invalidate the actually accesses elements of the buffer. This preserves the previous value of the buffer of the unaffected slots. As a result, diagnose more uninitialized buffer uses for example. Currently, this refined invalidation only triggers for `fread` if and only if the `count` parameter and the buffer pointer's index component are concrete or perfectly-constrained symbols. Additionally, if the `fread` would read more than 64 elements, the whole buffer is invalidated as before. This is to have safeguards against performance issues. Refer to the comments of the assertions in the following example to see the changes in the diagnostics: ```c++ void demo() { FILE *fp = fopen("/home/test", "rb+"); if (!fp) return; int buffer[10]; // uninitialized int read_items = fread(buffer+1, sizeof(int), 5, fp); if (5 == read_items) { int v1 = buffer[1]; // Unknown value but not garbage. clang_analyzer_isTainted(v1); // expected-warning {{YES}} <-- Would be "NO" without this patch. clang_analyzer_dump(v1); // expected-warning {{conj_}} <-- Not a "derived" symbol, so it's directly invalidated now. int v0 = buffer[0]; // expected-warning {{Assigned value is garbage or undefined}} <-- Had no report here before. (void)(v1 + v0); } else { // If 'fread' had an error. int v0 = buffer[0]; // expected-warning {{Assigned value is garbage or undefined}} <-- Had no report here before. (void)v0; } fclose(fp); } ``` CPP-3247, CPP-3802 Co-authored by Marco Borgeaud (marco-antognini-sonarsource) -
Hans Wennborg authored
It broke tests on Mac, see comment on the PR. > Use more flexable regex ([0-9]+) for frame number checks. Since the > frame numbers might change if some functions are not inlined. > > Similar to > * > https://github.com/llvm/llvm-project/commit/0360f3218a13666123849f6699216bdbebe64833 > * > https://github.com/llvm/llvm-project/commit/404bc5ca2ae5fffa45d5240dcf52b7f134988867 This reverts commit 98174fb6 and the follow-up commit 86d8aec9.
-
Simon Pilgrim authored
The target must be responsible for any expansion that needs to be performed for extended types etc. Fixes #95274
-
ryankima authored
bufferization.clone does not currently support lowering to memref for unranked memrefs. This interferes with bufferizing unranked tensors at boundaries where a clone operation is needed. ``` func.func @foo(%input: memref<*xf32>, %shape: memref<?xindex>) -> memref<*xf32> { %reshape = memref.reshape %input(%shape) : (memref<*xf32>, memref<?xindex>) -> memref<*xf32> %copy = bufferization.clone %reshape : memref<*xf32> to memref<*xf32> return %copy : memref<*xf32> } ``` Patterns such as that are possibly when bufferizing functions with input and output unranked tensors. The clone operation currently fails to legalize during the bufferization-to-memref conversion with unranked memrefs. This change modifies the conversion of bufferization.clone to memref to generate the runtime calculations and allocation to allow for cloning an unranked memref. -
agozillon authored
This PR seeks to expand/replace the Constant -> Instruction conversion that needs to occur inside of the OpenMP Target kernel generation to allow kernel argument replacement of uses within the kernel (cannot replace constant uses within constant expressions with non-constants). It does so by making use of the new-ish utility convertUsersOfConstantsToInstructions which is a much more expansive version of what the smaller "version" of the function I wrote does, effectively expanding uses of the input argument that are constant expressions into instructions so that we can replace with the appropriate kernel argument. Also alters convertUsersOfConstantsToInstructions to optionally restrict the replacement to a function and optionally leave dead constants alone, the latter is necessary when lowering from MLIR as we cannot be sure we can remove the constants at this stage, even if rewritten to instructions the ModuleTranslation may maintain links to the original constants and utilise them in further lowering steps (as when we're lowering the kernel, the module is still in the process of being lowered). This can result in unusual ICEs later. These dead constants can be tidied up later (and appear to be in subsequent lowering from checking with emit-llvm).
-
Timm Bäder authored
The previous commit tried to handle this in a way that's too general. Move the !Initializing case down to the array type.
-
Him188 authored
[AArch64][GISel] Assign G_LOAD defs into FPR if they feed FP instructions indirectly via PHI (#94618) If G_LOAD def is used by a PHI, recursively check if the def of PHI is used by any instruction that only uses FP oprand. If so, assign the def of G_LOAD to FPR. In other words, this change helps RBS to assign G_LOAD defs into FPR if they are later on used in an FP instruction **indirectly via PHI**, to avoid unnecessary copies. Before this patch, we only considered direct usages. It helps to fix GISel regression in TSVC kernel s3110. GISel was 50% slower than SDAG before this change. Now GISel and SDAG have the same runtime.
-
Florian Hahn authored
This adds a new interface to compute the cost of recipes, VPBasicBlocks, VPRegionBlocks and VPlan, initially falling back to the legacy cost model for all recipes. Follow-up patches will gradually migrate recipes to compute their own costs step-by-step. It also adds getBestPlan function to LVP which computes the cost of all VPlans and picks the most profitable one together with the most profitable VF. The VPlan selected by the VPlan cost model is executed and there is an assert to catch cases where the VPlan cost model and the legacy cost model disagree. Even though I checked a number of different build configurations on AArch64 and X86, there may be some differences that have been missed. Additional discussions and context can be found in @arcbbb's https://github.com/llvm/llvm-project/pull/67647 and https://github.com/llvm/llvm-project/pull/67934 which is an earlier version of the current PR. PR: https://github.com/llvm/llvm-project/pull/92555
-
Daniel Bertalan authored
This expands on the fix in 4e572db0. The issue is pretty similar: we might put symbols in the GOT which don't need run-time binding, locally defined personality symbols in this case. We should set their indirect symbol table entries to `INDIRECT_SYMBOL_LOCAL` to help `strip` remove these local names from the symbol table. Checking if the symbol is private-extern doesn't cover all cases; it can also be a non-weak extern function too, for instance; use the `needsBinding()` helper to determine it. This was the case for the personality function in statically linked Rust executables. The extra non-`LOCAL` symbols triggered a bug in Apple's `strip` implementation. As the indirect value for the personality function was not set to the flag, but the symbol didn't require binding, it tried to make the symbol local, overwriting the GOT entry with the function's address in the process. This normally wouldn't be a problem, but if chained fixups are used, the fixup also encodes the offset to the next fixup, and it effectively zeroed this offset out, causing the remaining relocations on the page to not be performed by dyld. This caused the crash in https://issues.chromium.org/issues/325410295 The change in tests is a bit ugly, as a lot of symbol information is now removed by turning more symbols `LOCAL`.
-
Spenser Bauman authored
memref.extract_aligned_pointer_as_index currently does not support unranked inputs. This lack of support interferes with the folding operations in the expand-strided-metadata pass. %r = memref.reinterpret_cast %arg0 to offset: [0], sizes: [], strides: [] : memref<*xf32> to memref<f32> %i = memref.extract_aligned_pointer_as_index %r : memref<f32> -> index Patterns like this occur when bufferizing operations on unranked tensors. This change modifies the extract_aligned_pointer_as_index operation to support unranked inputs with corresponding support in the MemRef->LLVM conversion. Co-authored-by:Spenser Bauman <sabauma@fastmail>
-
LLVM GN Syncbot authored
-
Janek van Oirschot authored
Allows MCExprs as passed values to PALMetadata. Also adds related `DelayedMCExpr` classes which serve as a pseudo-fixup to resolve MCExprs as late as possible (i.e., right before emit through string or blob, where they should be resolvable).
-
Timm Bäder authored
-