- Nov 15, 2022
-
-
OCHyams authored
The Assignment Tracking debug-info feature is outlined in this RFC: https://discourse.llvm.org/t/ rfc-assignment-tracking-a-better-way-of-specifying-variable-locations-in-ir The SLP-Vectorizer can merge a set of scalar stores into a single vectorized store. Merge DIAssignID intrinsics from the scalar stores onto the new vectorized store. Reviewed By: jmorse Differential Revision: https://reviews.llvm.org/D133320
-
Nikita Popov authored
The issue that caused the revert has been fixed in: 44bd8075 ----- This switches Hexagon intrinsics to use the default attributes (nosync, nofree, nocallback and willreturn). Especially willreturn is needed to prevent optimization regressions in the future. The only intrinsics I've excluded here are the load/store locked intrinsics, which presumably aren't nosync. Differential Revision: https://reviews.llvm.org/D137623
-
OCHyams authored
The Assignment Tracking debug-info feature is outlined in this RFC: https://discourse.llvm.org/t/ rfc-assignment-tracking-a-better-way-of-specifying-variable-locations-in-ir This test covers the NFC-for-normal-debug-info change D133303. Reviewed By: jmorse Differential Revision: https://reviews.llvm.org/D133319
-
Chuanqi Xu authored
document
-
Krzysztof Parzyszek authored
Make the stack alignment register (AP) reserved in the given function. This will make it available everywhere in the function, and allow aligned access to vector register spill slots.
-
Louis Dionne authored
We have been transitioning off of that macro since LLVM 15. Differential Revision: https://reviews.llvm.org/D137975
-
Fraser Cormack authored
-
Teresa Johnson authored
Implements the ThinLTO summary support for memprof related metadata. This includes support for the assembly format, and for building the summary from IR during ModuleSummaryAnalysis. To reduce space in both the bitcode format and the in memory index, we do 2 things: 1. We keep a single vector of all uniq stack id hashes, and record the index into this vector in the callsite and allocation memprof summaries. 2. When building the combined index during the LTO link, the callsite and allocation memprof summaries are only kept on the FunctionSummary of the prevailing copy. Differential Revision: https://reviews.llvm.org/D135714
-
Ayke van Laethem authored
This feature was probably missed when adding FamilyAVR6, but should definitely be there. I checked all four devices in the AVR6 family and they all support eijmp/eicall. Found while working on https://reviews.llvm.org/D137572. Differential Revision: https://reviews.llvm.org/D137573
-
Ayke van Laethem authored
This macro is defined in avr-gcc, and is very useful especially in assembly code to check whether particular instructions are supported. It is also the basis for other macros like __AVR_HAVE_ELPM__. Differential Revision: https://reviews.llvm.org/D137521
-
Ayke van Laethem authored
This simplifies the code by avoiding some special cases for family names (as opposed to device names). Differential Revision: https://reviews.llvm.org/D137520
-
Thomas Etter authored
Adds support for options-controlled configuration of the check to ignore results in macros. Differential Revision: https://reviews.llvm.org/D137972
-
Thomas Etter authored
Overrides are constrained by the signature of the overridden method, so a warning on an override is frequently unactionable. Differential Revision: https://reviews.llvm.org/D137968
-
Alexander Timofeev authored
The backward register scavenger has correct register liveness information. PEI should leverage the backward register scavenger. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D137574
-
OCHyams authored
The Assignment Tracking debug-info feature is outlined in this RFC: https://discourse.llvm.org/t/ rfc-assignment-tracking-a-better-way-of-specifying-variable-locations-in-ir DeadStoreElimmination shortens stores that are shadowed by later stores such that the overlapping part of the earlier store is omitted. Insert an unlinked dbg.assign intrinsic with a variable fragment that describes the omitted part to signal that that fragment of the variable has a stale value in memory. Reviewed By: jmorse Differential Revision: https://reviews.llvm.org/D133315
-
Sameer Sahasrabuddhe authored
This restores commit b756096b, which was originally reverted in 00b09a7b. AAPointerInfo now maintains a list of all Access objects that it owns, along with the following maps: - OffsetBins: OffsetAndSize -> { Access } - InstTupleMap: RemoteI x LocalI -> Access A RemoteI is any instruction that accesses memory. RemoteI is different from LocalI if and only if LocalI is a call; then RemoteI is some instruction in the callgraph starting from LocalI. Motivation: When AAPointerInfo recomputes the offset for an instruction, it sets the value to Unknown if the new offset is not the same as the old offset. The instruction must now be moved from its current bin to the bin corresponding to the new offset. This happens for example, when: - A PHINode has operands that result in different offsets. - The same remote inst is reachable from the same local inst via different paths in the callgraph: ``` A (local inst) | B / \ C1 C2 \ / D (remote inst) ``` This fixes a bug where a store is incorrectly eliminated in a lit test. Reviewed By: jdoerfert, ye-luo Differential Revision: https://reviews.llvm.org/D136526
-
OCHyams authored
The Assignment Tracking debug-info feature is outlined in this RFC: https://discourse.llvm.org/t/ rfc-assignment-tracking-a-better-way-of-specifying-variable-locations-in-ir In an attempt to preserve more info, don't delete dbg.assign intrinsics that are considered "out of scope" if they're linked to instructions. Reviewed By: jmorse Differential Revision: https://reviews.llvm.org/D133314
-
Cullen Rhodes authored
AArch64InstrInfo::optimizePTestInstr attempts to remove a PTEST of a predicate generating operation that identically sets flags (implictly). When the mask is an all active of matching element size the PTEST is currently removed. For while instructions this is correct since they perform an implicit PTEST with an all active mask. However, for other instructions such as compares the mask could be different. This patch fixes this bug by only removing the PTEST if the same all active mask is used by the predicating-generating instruction. Reviewed By: bsmith Differential Revision: https://reviews.llvm.org/D137718
-
Alex Richardson authored
I noticed that the values for __{CLANG,GCC}_ATOMIC_POINTER_LOCK_FREE were incorrectly set to 1 instead of two in downstream CHERI targets because pointers are handled specially there. While fixing this downstream, I noticed that the existing code could be refactored to use TargetInfo::hasBuiltinAtomic instead of repeating the almost identical logic. In theory there could be a difference here since hasBuiltinAtomic() also returns true for types less than 1 char in size, but since InitializePredefinedMacros() never passes such a value this change should not introduce any functional changes. Reviewed By: rprichard, efriedma Differential Revision: https://reviews.llvm.org/D135142 -
Sjoerd Meijer authored
-
Kadir Cetinkaya authored
-
OCHyams authored
The Assignment Tracking debug-info feature is outlined in this RFC: https://discourse.llvm.org/t/ rfc-assignment-tracking-a-better-way-of-specifying-variable-locations-in-ir Merge DIAssignID attachments on stores that are merged and sunk out of loops. The store may be sunk into multiple exit blocks, and in this case all the copies of the store get the same DIAssignID. Reviewed By: jmorse Differential Revision: https://reviews.llvm.org/D133313
-
Caroline Concatto authored
This patch adds the name convention for SME instructions. This patch fixes the number of registers for LookUpTable in the AsmParser. The number of registers is not used atm, but it is needed. The switch case in getNumRegsForRegKind needs to have all the RegKind enum.
-
Caroline Concatto authored
Now the names for all ADD, SUB, FADD and FSUB array accumulators instructions are consistent with the developer's page and their operands.
-
Cullen Rhodes authored
AArch64InstrInfo::optimizePTestInstr attempts to remove a PTEST of a predicate generating operation that identically sets flags (implictly). When the mask is the same as the input predicate the PTEST is currently removed. This is incorrect since the mask for the implicit PTEST performed by the flag-setting instruction differs from the mask specified to the explicit PTEST and could set different flags. For example, consider PG=<1, 1, x, x> Z0=<1, 2, x, x> Z1=<2, 1, x, x> X=CMPLE(PG, Z0, Z1) =<0, 1, x, x> NZCV=0xxx PTEST(X, X), NZCV=1xxx where the first active flag (bit 'N' in NZCV) is set by the explicit PTEST, but not by the implicit PTEST as part of the compare. Given the PTEST mask and source are the same however, first is equivalent to any, so the PTEST could be removed if the condition is changed. The same applies to last active. It is safe to remove the PTEST for any active, but this information isn't available in the current optimization. This patch fixes the bad optimization, a later patch will implement the optimization proposed above and fix the any active case. Reviewed By: bsmith Differential Revision: https://reviews.llvm.org/D137717
-
OCHyams authored
The Assignment Tracking debug-info feature is outlined in this RFC: https://discourse.llvm.org/t/ rfc-assignment-tracking-a-better-way-of-specifying-variable-locations-in-ir Maintain and propagate DIAssignID attachments in memcpyopt. Reviewed By: jmorse Differential Revision: https://reviews.llvm.org/D133312
-
OCHyams authored
The Assignment Tracking debug-info feature is outlined in this RFC: https://discourse.llvm.org/t/ rfc-assignment-tracking-a-better-way-of-specifying-variable-locations-in-ir mldst-motion will merge and sink the stores in if-diamond branches into the common successor. Attach a merged DIAssignID to the merged store. Reviewed By: jmorse Differential Revision: https://reviews.llvm.org/D133311
-
OCHyams authored
The Assignment Tracking debug-info feature is outlined in this RFC: https://discourse.llvm.org/t/ rfc-assignment-tracking-a-better-way-of-specifying-variable-locations-in-ir The changes for assignment tracking in mem2reg don't require much of a deviation from existing behaviour. dbg.assign intrinsics linked to an alloca are treated much in the same way as dbg.declare users of an alloca, except that we don't insert dbg.value intrinsics to describe assignments when there is already a dbg.assign intrinsic present, e.g. one linked to a store that is going to be removed. Reviewed By: jmorse Differential Revision: https://reviews.llvm.org/D133295
-
Simon Pilgrim authored
Ensure we're testing the avx512vl gfni instructions and not the avx gfni instructions
-
Jean Perier authored
Lower intrinsic assignment to hlfir.assign, except when the LHS is a whole allocatable (this part will be done later to keep patch simpler). Differential Revision: https://reviews.llvm.org/D138013
-
Jean Perier authored
Add hlfir.assign that represent Fortran assignment. See https://github.com/llvm/llvm-project/blob/main/flang/docs/HighLevelFIR.md. Operation attributes will be added later when they can be used. Differential Revision: https://reviews.llvm.org/D138012
-
Cullen Rhodes authored
AArch64InstrInfo::optimizePTestInstr attempts to remove a PTEST of a predicate generating operation that identically sets flags (implictly). When the PTEST and the predicate-generating operation use the same mask the PTEST is currently removed. This is incorrect since it doesn't consider element size. PTEST operates on 8-bit predicates, but for instructions like compare that also support 16/32/64-bit predicates, the implicit PTEST performed by the instruction will consider fewer lanes for these element sizes and could set different first or last active flags. For example, consider the following instruction sequence ptrue p0.b ; P0=1111-1111-1111-1111 index z0.s, #0, #1 ; Z0=<0,1,2,3> index z1.s, #1, #1 ; Z1=<1,2,3,4> cmphi p1.s, p0/z, z1.s, z0.s ; P1=0001-0001-0001-0001 ; ^ last active ptest p0, p1.b ; P1=0001-0001-0001-0001 ; ^ last active where the compare generates a canonical all active 32-bit predicate (equivalent to 'ptrue p1.s, all'). The implicit PTEST sets the last active flag, whereas the PTEST instruction with the same mask doesn't. This patch restricts the optimization to instructions operating on 8-bit predicates. One caveat is the optimization is safe regardless of element size for any active, this will be addressed in a later patch. Reviewed By: bsmith Differential Revision: https://reviews.llvm.org/D137716
-
Cullen Rhodes authored
Precommit test containing examples where PTEST is incorrectly optimized away. Later patches will fix incorrect optimizations. Reviewed By: bsmith Differential Revision: https://reviews.llvm.org/D137715
-
Martin Storsjö authored
891bb487 made negative exit codes be printed as hex, which makes it easier to recognize e.g. 0xC0000005 instead of -1073741819. However, current Python versions (at least the ones I'm using) seem to end up with positive unsigned return codes, so that again ends up printed as 3221225477. Print any return code over 255 as a hexadecimal number instead. Differential Revision: https://reviews.llvm.org/D137771
-
Kadir Cetinkaya authored
Dotdots were removed only when converting a relative path to absolute one. This patch makes the behaviour consistent for absolute file paths by removing them in that case as well. Also updates the documentation to mention the behaviour. Fixes https://github.com/clangd/clangd/issues/1317 Differential Revision: https://reviews.llvm.org/D137962
-
Qiu Chaofan authored
-
Chuanqi Xu authored
global module fragment [basic.stc.dynamic.general]p2 says: > The library provides default definitions for the global allocation > and deallocation functions. Some global allocation and > deallocation > functions are replaceable ([new.delete]); these are attached to > the global module ([module.unit]). But we didn't take this before and the implicitly generated functions will live in the module purview if we're compiling a module unit. This is bad since the owning module will affect the linkage of the declarations. This patch addresses this. Closes https://github.com/llvm/llvm-project/issues/58560
-
LLVM GN Syncbot authored
-
Petr Hosek authored
LLVM runtimes build already loads the LLVM config and sets all appropriate variables, no need to do it again. Differential Revision: https://reviews.llvm.org/D137870
-