ARM TableGen Update (#208380)
- This PR replaces existing ARM builtin functions with TableGen.
- The `.td` file returns identical header names & type signatures as the
`.def` generated headers and types
- The change has been tested via the following:
- `check-clang-tablegen`
- `check-clang-sema`
- `check-clang-codegen-arm`
- `check-clang-codegen`
- `clang-check`
- `check-clang`
- None of the above returned errors or warnings
- The translation is mostly done via a translation script written in
Python
- [Link to translation
script](https://github.com/patricklapgar/python_scripts/blob/main/llvm/clang/arm_tablegen_mig.py)
- [Link to translation script test
suite](https://github.com/patricklapgar/python_scripts/blob/main/llvm/clang/test_arm_tablegen_mig.py)
- Disclaimer: Both the translation script and its test suite were made
w/ assistance from AI (IBM Bob)
linuxkpi: add WLAN_EID_HT_OPERATION to ieee80211_eid
It matches our IEEE80211_ELEMID_HTINFO, that is already in use.
Found with: clang -Werror=assign-enum
[lldb] Let callers of GetSharedModule skip symbol locating (NFC) (#214829)
GetSharedModule falls back on the symbol locator plugins when the spec
does not already name a binary it can open, and it does so while holding
the global module list lock. Locating a binary or symbol file can
potentially be quite slow, so we should have the option to opt out of
that, for example, if we already did the search upfront.
[RISCV][NewPM] Add NewPM Codegen Pipeline Skeleton (#213129)
This follows what has been done for other targets. Follow-up commits
will port each pass and add them to this pipeline.
Assisted-by: AI
Improve imsg code, switch to imsgbuf_get and use more imsg_get_data
Switch the IMSG_HOST_DNS call to use imsg_add_strbuf and imsg_get_strbuf.
Also use NI_MAXHOST for the name length.
Also rework IMSG_PW_ENTRY and IMSG_GRP_ENTRY to use imsg_get_len()
and imsg_get_data() to fetch the record. Ensure that the data length
is large enough but not too large to fit into &ir.
ok jmatthew@
[mlir][affine] Add optional alignment attribute to affine load/store ops (#214532)
Give `affine.load`, `affine.store`, `affine.vector_load` and
`affine.vector_store` the same optional `alignment` attribute that
`memref.load`/`memref.store` and `vector.load`/`vector.store` already
carry, via the same `AlignmentAttrOpInterface` and `IntValidAlignment`
constraint, and keep it standing where those ops are rebuilt:
- `--lower-affine` forwards the alignment onto the `memref`/`vector`
access it creates (previously it was dropped, since the lowering
rebuilds the access without carrying attributes over).
- The map-composition canonicalizer (`SimplifyAffineOp`) carries the
alignment over when it rebuilds an access with a composed map.
**Motivation.** Without a way to state alignment on the affine ops, a
frontend that raises an under-aligned llvm access through affine and
back must either give up on raising it, or watch the alignment silently
upgrade to the element type's ABI alignment on the way back down. That
upgrade is a miscompile: clang emits `load i128, align 8` for a 16-byte
[19 lines not shown]
java-netty: Stop tracking vulnerabilities
It is getting more and more time consuming and it seems that this
package was not updated since it was packaged and so probably not worth
to continue keep track of all the CVEs since then.
clang: Emit "long-double-type" module flag generically (#210819)
Move emission of the "long-double-type" module flag out of PowerPC
and into generic code, so it describes the long double format for all
targets.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
CodeQL: Flag implicit compare-then-assign in branch conditions
Implicit compare-then-assign in branch conditions is buggy since
developers often mean assign-then-compare, but sometimes actually mean
compare-then-assign. GCC's -Wparentheses was originally meant to catch
assignment in place of comparison, requiring an extra set of parentheses
to turn this off. This had the happy coincidence of making developers
explicit about assign-then-compare vs compare-then-assign.
An outer level of extra parentheses will inhibit -Wparentheses warnings.
This often results in assign-then-compare being made explicit, but
instead of turning `if (x = foo() < 0)` into `if ((x = foo()) < 0)`, a
developer might write `if ((x = foo() < 0))`, which turns off the
warning, without fixing the problem. This happened in openzfs/zfs#18874.
There are other potential variations, such as `if ((x = (foo()) < 0))`,
which also suppresses GCC's warning, but fails to actually do anything
since the intended explicit parentheses to specify compare-then-assign
are around the right operand of the boolean operator, rather than around
the boolean operator, yet we have the additional parentheses needed to
[43 lines not shown]
Disable tail mem libcalls in swifterror functions (#214590)
Tail calls in functions with a swifterror parameter aren't supported yet
and there's a guard against this but the same guard is missing in the
memcpy/memmove/memset libcall paths, which caused a miscompile/crash.
Apply this guard in those places.
https://github.com/swiftlang/swift/issues/90477
rdar://181625760
[LifetimeSafety] Fix crash on explicit object member functions (#212154)
`-Wlifetime-safety` crashes on a call to an explicit object member
function whose object parameter is an rvalue reference, when the call
passes at least one further argument:
```c++
struct Foo {
template <typename T>
int get(this Foo &&self, T) { return self.field; }
int field;
};
void call() { Foo().get(0); }
```
`handleMovedArgsInCall` pairs `Args[I]` with `getParamDecl(I - 1)`,
assuming the object argument has no corresponding `ParmVarDecl`. An
explicit object parameter is a `ParmVarDecl`, so the offset misaligned
[11 lines not shown]
[Docs] Fix a DIExpression fragment example (#214839)
Use DW_OP_LLVM_fragment for the source-variable fragment example. The
previous DW_OP_bit_piece form is not valid in LLVM DIExpression metadata
- the other code was changed a bit ago, this is just some documentation
that didn't catch up.
[clang] Compute value dependence for references to structured bindings (#212368)
In some cases, a reference to a structured binding is value-dependent. I
think this has been possible since they were originally defined in
C++17. C++26 makes it easier to trigger issues, though.
CWG 2984 proposes a resolution to this issue, but the proposed
resolution makes a bunch of cases value-dependent where it isn't really
necessary. A comment in the code describes my alternative.
Fixes #211930
libelf/testsuite: Initialize structs prior to taking their addresses.
The functions being tested currently fail (as expected) without
accessing these structs. This changelist however improves the
robustness of these tests if this implementation behavior were
to change in the future.
[clang][OpenMP] Split OMPOrderedDirective into two classes
Now that OMPD_ordered has been replaced with two variants, split
the OMPOrderedDirective class into two classes, one for each
variant.