[libc++] Fix native wait alignment (#180928)
This PR fixes two issues regarding the alignment of native wait:
- In the internal platform call, the local variable is copied from a
potentially non-aligned buffer
- Under the unstable ABI, the predicate to test eligibility of a type
being able to do native wait is purely on size. We should test also the
alignment of such type is qualified for platform call
---------
Co-authored-by: Louis Dionne <ldionne.2 at gmail.com>
[clang][ssaf] Drop llvm-RTTI support for now (#181198)
We discussed internally, and for now we will focus on an MVP and try to
not complicate APIs unless that is strictly necessary.
[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.
[libc++] Add __strftime__ formatting attribute to locale base API __strftime (#179545)
Tip-of-trunk Clang seems to have started complaining about the missing
attribute.
[libc++] Sort `_LIBCPP_INTRODUCED_IN_LLVM_<X>` usages in reverse chronological order (#176857)
I noticed that the various `_LIBCPP_INTRODUCED_IN_LLVM_<ver>` usages in
`availability.h` were defined a bit all over the place. I think it'd
make the most sense to sort them in reverse chronological order (like
their definitions).
[lldb] Add Get(Non)SyntheticValue formatter bytecodes (#174839)
`GetSyntheticValue` in synthetic providers which need to operate on raw
root values, but will often want to use the synthetic value of children,
or nested children.
[flang] still apply vectorization cost model with IVDEP (#180760)
The current implementation of `!DIR IVDEP` leads flang to bypass LLVM
cost model and always vectorize the loop carrying `!DIR$ IVDEP`.
IVDEP is an extension and its documentation varies, and while it usually
leads to vectorization because it is added on loops where it is usually
profitable, its documentation only tells it is meant to tell the
compiler that there are no loop carried dependencies and that the loop
is safe to vectorize.
In some application, such directive may have been added to help the
compiler proving it is safe to vectorize, but vectorizing is not always
the best choice for all architectures. The cost model should still be
applied. This is at least the case for classic flang.
When users want vectorization to happen, they should use `!DIR$ VECTOR
ALWAYS`.
[5 lines not shown]