[clang][bytecode] Implement support for `Expr::EvaluateWithSubstitution()` (#204781)
This regresses `Sema/enable_if.c`, which now fails when run with the
bytecode interpreter. We also get 14 more diagnostic differences in
`SemaCXX/builtin-object-size-cxx14.cpp`.
Fixes https://github.com/llvm/llvm-project/issues/138473
[mlir][python][NFC] Clean up nanobind compile options (#206559)
Follow-up to #204230.
Refactor nanobind warning suppression flags into `build_nanobind_lib`.
Drop duplicate RTTI and exception flags.
sshd_config(5): Clarify again how to disable password authentication.
Upstream changed their version of this text by adding some quotation
marks but not really making it clearer. We had replaced the comment a
while ago to cross-reference UsePAM but it got lost in the update to
OpenSSH 10.0 last year. Restore the explanation of how to disable
password authentication, and expand on the relevant knobs a little.
PR bin/32313: sshd 'PasswordAuthentication no' silently fails
Revert "[MergeFunctions] Preserve entry counts on folds" (#206640)
Reverts llvm/llvm-project#202218
Causes build failures and needs to be rebased on top of main before
relanding.
[Clang][RISCV] packed reduction sum intrinsics (#206441)
Add the __riscv_predsum/predsumu_* header wrappers over new
__builtin_riscv_* builtins, lowering to the llvm.riscv.predsum/predsumu
intrinsics.
[RISCV][P-ext] Avoid redundant accumulator extend for reduction sum (#206430)
For a reduction sum with an i32 accumulator on RV64, the result is
computed at i64 and truncated, so the accumulator's upper bits are
unused. Any-extend it instead of sign-/zero-extending, dropping a
redundant sext.w/zext.w. Follow-up to #206004.
[FixIrreducible] Handle conditional branch with both successors as header (#206057)
A conditional branch redirecting edges to the cycle header may have both
successors equal to the header (e.g. `br i1 %c, label %h, label %h`),
which the previous `Succ1 = Succ0 ? nullptr : Header` logic mishandled
by dropping the second edge.
Check each successor independently against the header instead.
Fixes https://github.com/llvm/llvm-project/issues/191979.
[MergeFunctions] Preserve entry counts on folds (#202218)
**Summary**
`MergeFunctions` can fold equivalent functions into a single retained
implementation. When that happens, the retained body may be reached by
callers of both original functions, but its `function_entry_count`
metadata previously preserved only one side of the profile data.
For example, folding functions with entry counts `2000` and `1000` could
leave the retained body with only `2000`. This patch updates the
retained implementation after a successful merge, so the entry count
becomes `3000`, using saturating add.
For ODR/double-thunk merges, the private backing body gets the combined
count while the thunks keep their own entry counts. For alias-backed
merges, the backing function carries the combined count.
**AI Assistance Disclosure**
[3 lines not shown]
[RFC][CodeGen] Add generic target feature checks for intrinsics (#201470)
This PR adds target-independent infrastructure for annotating LLVM
intrinsics with required subtarget feature expressions.
It introduces a TargetFeatures string field to intrinsic TableGen
records. TableGen emits an intrinsic-to-feature mapping table.
Both SelectionDAG and GlobalISel now perform this check before lowering
target intrinsics. This allows targets to opt in by annotating intrinsic
definitions directly, rather than adding custom checks during lowering,
legalization, or instruction selection.
This PR uses one AMDGPU intrinsic as an example.
tests/bin/expr - fix the regex & length tests for UTF-8 input
If LC_CTYPE is to be set to a UTF-8 charset, the input must be
valid UTF-8 encoded data, or the results will not be what is expected.
0xFF as input is *not* ever valid in a UTF-8 string. It cannot be
the initial byte of a character (the biggest conceivable value for
that is 0xFC and even that is beyond what current UTF-8 allows, the
actual biggest is 0xF4), and it cannot be a trailing byte, as those
always have 1 0 as the two higest bits (ie: range is 0x80..0xBF)
mbrtowc() fix a stupid typo in the previous version.
No idea how I managed to miss this previously. This update should
make at least some of the ATF tests (and other stuff) which failed
after the previous change start working again.
[Sema][NFC] Extract allocation overload diagnostics (#206219)
This extracts the code that emits diagnostics when no viable function is
found for allocation overload resolution to reduce the diff in #203824.
[clang][ssaf] Add `StaticLibrary` data structure (#205946)
This change introduces the `StaticLibrary` data structure, the SSAF analogue of `ar`, `libtool -static`, or `lib.exe`: a single-architecture bundle of `TUSummary` objects. `StaticLibrary` only stores `TUSummaryEncoding` because it will be used by `clang-ssaf-linker` that does not decode the summary data. We don't plan to create a decoded variant because there will be no consumer. Support for constructing and linking static libraries will be introduced in future PRs.
rdar://180665891