[AMDGPU] Add async and tensor waits to `isWaitcnt` (#230663)
`S_WAIT_ASYNCCNT` and `S_WAIT_TENSORCNT` were missing, so passes treated
them as ordinary instructions. `S_SET_VGPR_MSB` was not coissued past
them, and `SIPreEmitPeephole` could drop the execz skip around them.
[llvm-readobj][ELF] Print Names for call graph relocations
In a relocatable object file, an entry identified by a relocation had no
Names. Compute the address that the relocation resolves to with
RelocationResolver, look up the functions at that address in the section
of the relocation's symbol, and print them as Names before the
Relocation object.
As with Names for an Address, the names follow --demangle. Nothing is
printed for an undefined symbol, or when no function is at the address.
A relocation type that RelocationResolver doesn't support, or a symbol
whose section can't be found, gets a warning.
Assisted-by: Gemini
[llvm-readobj][ELF] Fall back to Address when no single relocation applies
In a relocatable object file, --call-graph-info identifies a function by
the relocation that applies to its address field. If a field had no
relocation, nothing in the output identified the function. If the
relocation section had an invalid sh_link, the dump stopped. If a field
had more than one relocation, the first one was used silently.
In all of these cases, print the value stored in the field as Address,
as for linked files. Warn once if a call graph section has no relocation
section, and warn about each field with no relocation or more than one.
If the relocations can't be read, only that is reported.
Assisted-by: Gemini
[llvm-readobj][ELF] Print a Relocation object instead of Name in --call-graph-info
In a relocatable file, the address fields of a call graph section hold
placeholders, and the relocation that applies to each field identifies
the function. Name showed only the relocation's symbol name, made up
from the section name for an unnamed section symbol, and dropped the
addend. So entries that refer to a function through a section symbol
couldn't be told apart.
Print a Relocation object instead, with the symbol index, the symbol
name exactly as recorded in st_name, and the addend if it is non-zero.
With --demangle, the demangled symbol name is printed as DemangledName.
If the symbol can't be read, the existing warning is reported and only
the symbol index is printed.
Assisted-by: Gemini
[llvm-readobj][ELF] Print implicit addends of call graph relocations
A SHT_REL relocation, or a SHT_CREL relocation without explicit addends,
keeps its addend in the field that it applies to. Print the
sign-extended field value as the Addend of such a relocation instead of
dropping it. The ARM test now uses SHT_REL and covers the same cases as
the SHT_RELA tests: named symbols, a negative addend, and a section
symbol with an addend.
Assisted-by: Gemini
[llvm-readobj][NFC] Match call graph relocations to address fields in one pass
Read the relocations for a call graph section once, sort them by offset,
and attach each one to the address field it applies to while walking the
fields in order. Each field now stores the existing `Relocation<ELFT>`,
so the printing code no longer searches the relocation list for every
field. The call graph structs become templates so that they can hold it.
Assisted-by: Gemini
[llvm-readobj][ELF] Print call graph callees in section order
Keep both the offset and the value of each address field in the call
graph section, and let the printing code pick the one it needs. Later
patches use the offset to look up relocations.
Callees were stored in a SmallSet, which sorts its elements once it
holds more than four, so the output order depended on the number of
callees. They are now kept in section order, and repeated addresses in
linked files are skipped when printing.
Assisted-by: Gemini
[llvm-readobj][ELF] Don't clear bit 0 of call graph field offsets on ARM
In a relocatable object file, --call-graph-info finds the relocation for
an address field by the field's offset. On ARM, the Thumb bit was
cleared from that offset as if it were an address, so a field at an odd
offset, such as a direct callee, was reported as having no relocation.
Only clear the Thumb bit from addresses.
Assisted-by: Gemini
[llvm-readobj][ELF] Drop redundant counts from --call-graph-info output
NumDirectCallees and NumIndirectTargetTypeIDs only repeat the lengths of
the DirectCallees and IndirectTypeIDs lists that follow them.
Assisted-by: Gemini
RegisterPressure: Detect dead physreg defs from LiveIntervals (#225079)
This reverts the remainder of #222627, which was partially reverted by
on dead flags. This is a prerequisite to deleting LiveVariables.
When constructing the PressureDiff for an instruction during scheduling
DAG construction, dead defs were only recognized from the dead flag on
the operand. This implicitly relied on preprocessing done by LiveVariables
to fixup inconsistent dead flags with overlapping registers in other
operands. Dead flags have no verifier-enforced rules and are thus unreliable.
Before LiveVariables, consider this example:
dead $eax = MOV32r0 implicit-def dead $eflags, implicit-def $rax
; $rax is never used
$rax is never used, but only the $eax def is dead-flagged and the overlapping
implicit-def $rax is not. The shared $eax register units are covered by the
non-dead $rax def and so are counted as live defs. That shared unit is then
[25 lines not shown]
[xegpu][transform] Add support for general offset caculation in `xegpu.insert_prefetch` (#230660)
Current approach fails to insert prefetches when load's offset is some
general expression (like `%iv + 16).
This PR generalizes the offset calculation for prefetch insertion. It
looks at all load's offset and compute a backward slice of all offsets.
Backward slice is essentially duplicated in each prefetch with
appropriate value replacements for loop induction variable.
Assisted by: Codex
mail/nmh-devel: Update for real
I had cut and pasted the git hash from my copy of the savannah repo
instead of my github copy. Long story short, I should have been paying
more attention.
Thanks to "Herbert J. Skuhra" <herbert at gojira.at> for pointing this out
and providing a patch.
Fixes: b2eb4db3310a
Pointy hat to: cy
[SLP]Fix crash for or reduction of shl/lshr mix
Do not combine alt-shuffle nodes, only uniform shl lanes can be
modeled as a bitcast.
Fixes #230444
Reviewers:
Pull Request: https://github.com/llvm/llvm-project/pull/230674
[SPIRV] Infer external pointer parameter types from mangled names (#230342)
Pointer parameters of external declarations can fall back to i8 because
there is no body for pointee type inference.
Recover scalar and vector pointees from unambiguous mangled signatures
and use them consistently for function types
and calls.
Preserve explicit pointee attributes and existing builtin handling. Keep
the byte-pointer fallback for unsupported types, vector ranks, and
signatures whose parameters cannot be safely matched to LLVM arguments.
[RISCV] Use ComplexPattern for matching addi+brind. (#229594)
This only requires 1 isel pattern per BRIND type and we're able
to capture the add vs ptradd difference between SelectionDAG and
GISel in the C++ code.
Assisted-by: Claude
[Clang] [NFC] Add `APValue::visit()` (#230243)
This patch adds a helper function to `APValue` that walks the value
recursively and visits all nested values. This functionality is
currently used by `LinkageComputer::getLVForValue()` and it looks like I
will be needing it for a patch soon.
Assisted-by: Codex
[Offload][omp] Get Plugin active count and Device UID through liboffload (#230109)
Reimplement PluginManager::getNumActivePlugins and Device getDeviceUid
through liboffload.
Assisted by Claude.
[SLP]Drop nneg when MinBW changes the cast operand type
MinBW may narrow the operand of a vectorized cast, so the nneg flag
propagated from the original scalar cast no longer holds for the new
operand type.
Fixes #230443
Reviewers:
Pull Request: https://github.com/llvm/llvm-project/pull/230671
Allow quota to be changed even when over quota
ZFS allows datasets to use slightly more space than their quota,
typically one write operation totaling less than 1MB. Once in this state
of using more space than the quota, subsequent writes will fail with
ENOSPC. The quota can also be changed to more than the space used (with
`zfs set quota=...`). The quota can not be tightened (decreased) such
that the dataset is in an over-quota state, which is a design decision
dating back to before version 1.
The problem is that when in the state of using more space than the
quota, the quota can not be set to its current value, or relaxed
(increased) to a value that is less than the space used. Since these
operations don't make anything worse in terms of being over-quota, they
should be allowed. This enables `zfs set quota=` to be idempotent.
Original-patch-by: Matthew Ahrens <matt at mahrens.org>
External-issue: https://www.illumos.org/issues/18300
External-issue: https://www.illumos.org/issues/18332
[6 lines not shown]
[Offload][Omp] Ensure errors are consumed when debug is off (#230668)
When debug is off (either not enabled at compile or runtime) the code
consuming the Error (e.g., toString) is not executed and the program can
potentially abort with an unconsumed error (reported by @ro-i).
Claude scanned for ocurrences of this pattern and only the messages
introduced by #226450 seem to be affected.
Note that messages using `REPORT()` unlike `ODBG` are safe.