[ADT] Allow member pointers in map_range and map_to_vector (#181154)
This is for when all we need is to access a field or call a getter: no
need to write a lambda just to extract these.
Assisted-by: claude
[Docs] Improve Target TableGen Docs (#178518)
This change adds documentation for some of the advanced parts of the
TableGen Selection structures:
- The `set`, `node` and `srcvalue` special DAG nodes
- The `SDNodeXForm` C++ snippet.
- The `PatFrags` predicate C++ snippet, and documentation for how the
`OperandTransform` item works in a little more detail.
- The `ImmLeaf` predicate code.
This also adds documentation for the many C++ callbacks for Targets
associated with Decoding, Encoding, Parsing and Printing Operands and
Instructions, including Predicates.
Co-authored-by: Craig Topper <craig.topper at sifive.com>
[libcxx] Use a table for the offsets in __next_prime (#180651)
This reduces the size of __next_prime on armv8m baremetal from 1.4KB to
about 276B. Ideally there would be something that rolls up the if chain
into a single loop but there doesn't seem to be anything that does that
in llvm. Conversely, we should expect an unroller to be able to unroll
this loop in something like a -O3 build, but we unfortunately don't see
that either. I suspect perf might not be as much of a concern here since
this function is already called in a slow path when rehashing might be
done.
---------
Co-authored-by: Nikolas Klauser <nikolasklauser at berlin.de>
[SPIRV] Rounding Mode decorations in OpenCL builtins only make sense with Float types
The backend was adding fp-rounding mode flags to
`uchar convert_uchar_rte(uint)`. These builtins are equivalent to
`uchar convert_uchar(uint)` which simply truncates its input, since
there is no floating-point value involved.
Related to https://github.com/llvm/llvm-project/issues/180936
[flang] Implement C_F_STRPOINTER (Fortran 2023) (#176973)
Implement C_F_STRPOINTER to associate a Fortran character pointer with a
C string.
This intrinsic has two forms:
C_F_STRPOINTER(CSTRARRAY, FSTRPTR [,NCHARS]): Associates FSTRPTR with a
C string array
C_F_STRPOINTER(CSTRPTR, FSTRPTR, NCHARS): Associates FSTRPTR with a
C_PTR pointing to a character string
Implementation includes semantic validation, FIR lowering, and
associated tests.
F2023 Standard: 18.2.3.5
AI Usage Disclosure: AI tools (Claude Sonnet 4.5) were used to assist
with implementation of this feature and test code generation. I have
reviewed, modified, and tested all AI-generated code.
[lldb] Limit formatter-section extractor range (#140139)
The formatter extraction would look at too much data for one type -
possibly reading data outside the section.
This PR limits the size of the `DataExtractor` to the one specified in
the record size before - previously, the whole section was looked at.
Similarly, `ForEachFormatterInModule` skipped zero-bytes but didn't stop
when reaching the end of the extractor.
I added a test for both cases.