[DirectX] Implement lowering of Sample and SampleLevel (#201477)
Fixes https://github.com/llvm/llvm-project/issues/192547 and
https://github.com/llvm/llvm-project/issues/192550
The Sample and SampleLevel implementations are combined in this single
PR because the code is extremely similar and the changes are small
thanks to the refactoring of prior implementations of sample lowerings.
Assisted-by: Claude Opus 4.6
[flang] Enumeration Type: (PR 1/5) Foundation types + Parser (#192651)
This PR creates the concept of an ENUMERATION TYPE from the Fortran 2023
Standard. It is implemented as a special case of a Derived Type
internally to the compiler. It adds the parse/unparse support. The
compiler will be able to recognize the syntax of an ENUMERATION TYPE and
report to users that the feature is not yet implemented.
It is the 1st of 5 stacked PRs.
AI Usage Disclosure: AI tools (Claude Opus 4.6) were used to assist with
implementation of this feature and test code generation. I have
reviewed, modified, and tested all AI-generated code.
---------
Co-authored-by: Kevin Wyatt <kwyatt at hpe.com>
[StringMap] Invalidate iterators on mutation (#202237)
Tighten StringMap's iterator contract so that, like DenseMap (#199369),
mutating the map invalidates iterators obtained before the call.
StringMap
now derives from DebugEpochBase and its iterators from HandleBase, and
insert/erase/clear/swap bump the epoch, so a
stale-iterator-after-mutation
bug (e.g. erase- or insert-while-iterating) fails under
LLVM_ENABLE_ABI_BREAKING_CHECKS.
In release builds DebugEpochBase/HandleBase are empty, so iterator size
and
codegen are unchanged.
Aided by Claude Opus 4.8
Mark STANDBY ALUA ready on middlewared restart when state intact
iscsi.alua.standby_alua_ready gates the LUN-replace fast path in
become_active. It is set at the end of the standby_after_start job
and reset on every middlewared start, so if middlewared is restarted
on the STANDBY node while iscsitarget is still running with ALUA
fully configured, the next failover unnecessarily falls back to the
iscsitarget-restart path.
Add standby_recheck_ready, which (on middlewared restart, gated on
system.ready) verifies the steady-state invariants directly from
SCST sysfs on both nodes.
imgact_elf: handle unaligned phdrs
Althought non-compliant, there are binaries which have the phdrs placed
unaligned in the image. Since we have the code to allocate memory for
off-page phdrs, the same code path can be used to handle unaligned
phdrs.
Relax the requirement for both the activated image and interpreter.
PR: 295629
Reviewed by: emaste, markj, olce
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D57498
LowerTypeTests: Mark CFI jump table sections as eligible for relaxation.
Use !elf_section_properties metadata to set the type and entry size to
the correct values, and set the preferred alignment to the entry size
to enable last jump table entry placement.
Reviewers: vitalybuka, MaskRay
Reviewed By: vitalybuka, MaskRay
Pull Request: https://github.com/llvm/llvm-project/pull/149261
Reapply "[IR] Reject unhandled assume bundles and seperate them from normal attributes" (#202336) (#202355)
The crash is fixed by checking for equality of value and assumption
instead of asserting it.
Original message:
This patch introduces the concepts of bundle attributes and updates
the code base to use them in most places where assume bundles are
handled.
The notable exception is the knowledge retention API, since it tries to
be generic for attributes. However, the `--assume-preserve-all` flag is
removed, since all attributes not listed in the bundle attributes are
rejected by the verifier now. This shouldn't be a huge problem, since
any
attributes not listed there were completely unused. New functions with
the
naming scheme `getAssume<AttrName>Info` are also added for attributes
which
are used without having to enable experimental features.
This reverts commit d11a71905634e8fee7f4ab9c489317cccc23e0ad.
ELF: CFI jump table relaxation.
Indirection via the jump table increases the icache and TLB miss rate
associated with indirect calls, and according to internal benchmarking
was identified as one of the main runtime costs of CFI, contributing
around 30% of the total overhead. #145579 addressed the problem for
direct calls to jump table entries, but the indirect call overhead is
still present. This patch implements jump table relaxation, which is a
technique for opportunistically reducing the indirect call overhead.
The basic idea is to eliminate the indirection by moving function
bodies into the jump table wherever possible. This is possible in two
circumstances:
- When the body size is at most the size of a jump table entry.
- When the function is the last function in the jump table.
In both cases, we may move the function body into the jump table by
splitting the jump table in two, with enough space in the middle for the
[17 lines not shown]
[C23] Fix failing assertion on structural equivalence checks (#201650)
This assertion was added in 6a22580305d779e2d712900d49578de9a5cb14e8 as
a sanity check and it turns out that the assertion was false in two
different ways.
1) An enumeration might not have an underlying type in our AST; this
happens for a forward declared enumeration without a fixed underlying
type.
2) When comparing the members, we could compare a member of enumeration
type with a member of a non-integral type like a union or structure.
We now account for both cases.
Fixes #190227
[Dexter] Add support for aggregate expects in the debugger
Allows aggregate expects to be written in Dexter scripts, in the form:
!value expect:
member1: 0
member2:
submember1: 1
submember2: 2
This uses the "variables" feature provided in the DAP interface to
recursively fetch sub-variables from each evaluated variable, and modifies
the DebuggerExpectMatch class to also be recursive, containing submatches
for each expected aggregate member value.
Some key concepts that are affected by this are the "match_result", which
has changed from a bool to a 3-way result ("FALSE", "TRUE", "PARTIAL"),
where "PARTIAL" means that at least one submatch was TRUE and at least one
was FALSE. We also add a `match_distance`, which is used as a measure of
[3 lines not shown]
[OpenACC] Add an attribute to record number of loops collapsed. (#201969)
Attach an attribute indicating the number of collapsed loops if
`convertACCLoopToSCFFor` collapses the loops.
Assisted by Claude Code.
loader.efi: Fix when staging moves late
Prior to this commit, we'd compute the page tables and have the last
entries point to the staging area. We'd then add some more metadata to
the image and boot. This assumed the staging area didn't need to move
for this last bit of data.
However, if we go over the staging limit, when we copyin new data, we
grow the staging area, usually be moving it to a lower address. This
overage usually happens when we're loading modules and so things work
out nicely. Sometimes we're close to the limit, and we need to do this
growing inside bi_load, after we've computed the page table, making the
page table wrong, and the code we jump to random rather than the btext
routine we normally start at.
To fix this, move computation of the table (but not its allocation) to
after bi_load, but before we call the trampoline.
This problem was most observed when loading microcode for many peole,
[19 lines not shown]