[LoongArch] Use vector extend for sitofp/uitofp (#202496)
Called sign/zero extend first in `performS[U]INT_TO_FPCombine` before
doing vector sitofp/uitofp, which avoid inefficient scalarization.
[LoongArch] Legalize LASX truncate with XVPICKEV instruction (#202485)
Add LASX truncate patterns for wide truncates (e.g. `v8i64 trunc to
v8i8`) with `XVPICKEV` instructions.
To merge two registers into one, return concat_vectors as is while its
two operations are `ISD::TRUNCATE`, also dealing with illegal results in
`ReplaceNodeResults`.
[mlir-c] Add ConversionTarget dynamic legality C API
Add mlirConversionTargetAddDynamicallyLegalOp,
mlirConversionTargetAddDynamicallyLegalDialect,
mlirConversionTargetMarkOpRecursivelyLegal, and
mlirConversionTargetMarkUnknownOpDynamicallyLegal to enable
per-instance legality callbacks from C.
[mlir-c] Add DominanceInfo and PostDominanceInfo C API bindings
Expose DominanceInfo and PostDominanceInfo through the MLIR C API with
operation/block/value dominance queries, nearest common dominator,
reachability, and invalidation.
[mlir-c] Add DominanceInfo and PostDominanceInfo C API bindings
Expose DominanceInfo and PostDominanceInfo through the MLIR C API with
operation/block/value dominance queries, nearest common dominator,
reachability, and invalidation.
[AArch64][llvm] Implement HINT instructions as aliases (NFCI)
Implement some `HINT`-space encodings as aliases of `HINT`
instead of dedicated instructions. Re-implement these isns:
* bti
* psb
* stshh
* stcph
* shuh
* tsb
Parse aliases explicitly in `AArch64AsmParser::parseHintAlias()` as they
have custom operands. Remove the (now unused) `PSB`, `BTI`, `CMH`, `PHint`
and `TSB` tablegen defs, operand classes, parser hooks and printer helpers.
Also, tighten the BTI check in the parser. The old bitmask matched non-BTI
`HINT` immediates such as `shuh/stcph`; use an exact BTI HINT encoding
check instead (`isHintSpaceBTI()`)
[9 lines not shown]
[clangd] Remove unused onlyValue<bool> overload (NFC) (#206312)
BundledEntry has three `std::string` members and no bool member, so the
bool overload of onlyValue can never be instantiated. It has been dead
since it was added and trips -Wunused-template.
NFC. Part of #202945.
[AArch64][llvm] Implement HINT instructions as aliases (NFCI)
Implement some `HINT`-space encodings as aliases of `HINT`
instead of dedicated instructions. Re-implement these isns:
* bti
* psb
* stshh
* stcph
* shuh
* tsb
Parse aliases explicitly in `AArch64AsmParser::parseHintAlias()` as they
have custom operands. Remove the (now unused) `PSB`, `BTI`, `CMH`, `PHint`
and `TSB` tablegen defs, operand classes, parser hooks and printer helpers.
Also, tighten the BTI check in the parser. The old bitmask matched non-BTI
`HINT` immediates such as `shuh/stcph`; use an exact BTI HINT encoding
check instead (`isHintSpaceBTI()`)
[9 lines not shown]
[mlir-c] Add DominanceInfo and PostDominanceInfo C API bindings
Expose DominanceInfo and PostDominanceInfo through the MLIR C API with
operation/block/value dominance queries, nearest common dominator,
reachability, and invalidation.
[clang] Fix assertion failures involving code completion with delayed default arguments and exception specifications (#203794)
Fixes #200879.
This patch fixes crashes when code completion is invoked immediately
after the declaration of a top-level class containing methods with
default arguments or exception specifications.
Default-argument case: https://godbolt.org/z/4G9nTfnGd
Exception-specification case: https://godbolt.org/z/8frEv8von
When code completion is triggered right after the class body, the
lookahead token is `tok::code_completion` when late parsing begins. The
token is saved to the cached token stream and `ConsumeAnyToken()` is
called to consume it, but `ConsumeAnyToken()` defaults to rejecting
completion tokens, which cuts off parsing. In the default-arguments path
(as reported in #200879), the assertion `Tok.is(tok::equal) && "Default
argument not starting with '='"` is triggered because `cutOffParsing()`
sets the current token to `eof`.
[2 lines not shown]
games/dethrace: New port: Reverse engineering the 1997 game "Carmageddon"
Dethrace is an attempt to learn how the 1997 driving/mayhem game Carmageddon
works behind the scenes and rebuild it to run natively on modern systems.
WWW: https://github.com/dethrace-labs/dethrace
[M68k][MC] Generate some encoding tests for MOVE (#194269)
# Problem statement
Instruction encoding needs to be solid, as it's one of the foundations
that a target backend is built upon.
It's error-prone work, and tedious to write tests for.
Test coverage for M68k instruction encoding isn't exhaustive, and we've
had bugs in the past where instructions have not been encoded correctly.
# Proposed solution
Using the documentation at https://m680x0.github.io/doc/official-docs it
should be possible to write some scripts to generate encoding tests for
all the instructions.
# Description of this PR
[24 lines not shown]
[analyzer] Implement UseAfterLifetimeEnd checker (#205521)
Implemented the UseAfterLifetimEnd checker which is responsible for detecting lifetime safety violations involving the [[clang::lifetimebound]] annotation. This checker can catch violations in annotated code such as dangling pointer/reference bound to local variables that go out of scope. This checker is one of the reporting checkers that depend on the LifetimeModeling checker #205951. To detect dangling sources the checker queries the state at function exit points through the checkEndFunction callback. This checker does not handle lifetime issues where the code is unannotated.
Detailed work history of this checker can be found here: #200145
Co-authored-by: Balázs Benics <benicsbalazs at gmail.com>
locale: make install Unicode 17.0.0/CLDR 48.2
Data changes:
48.1:
- Update RSD (Serbian Dinar) to use 2-digits for non-cash and 0-digits
for cash.
- Fix issue with tippi and bindi in Punjabi exemplars.
- Fix parsing issue in numeric date+time patterns for zh_Hant and yue.
- Fix issues with hour cycle display names for several languages.
https://cldr.unicode.org/downloads/cldr-48#481-changes
48.2:
- Group separator for number formatting was updated to ' in fr-CH
consistent with other Swiss locales.
- Some fixes to date formats including: Hv available formats were
updated to match behavior in CLDR 47 due to web compatibility issues
related to current JS capabilities.
[9 lines not shown]
locale: Update Unicode to CLDR 48.2
Notable changes:
- Group separator for number formatting was updated to ' in fr-CH
consistent with other Swiss locales.
- Some fixes to date formats including: Hv available formats were
updated to match behavior in CLDR 47 due to web compatibility issues
related to current JS capabilities.
- Emoji annotations fixes including collisions between emoji short
names.
- Updated AM/PM for ko & ps to be consistent with how the wide forms are
localized.
Reviewed by: bapt
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D57626
locale: Do not strip the suffix from CLDRVERSION
The upstream CLDR directory structure requires the full version string.
Remove the ':R' modifier to fix the fetch paths.
Previously this worked because major releases were published in a
directory without the ".0" suffix, while the filenames included it.
Starting with CLDR 47, the upstream layout changed to use the full
version string exclusively, causing the fetch URLs to break for point
releases.
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D57625
[clang][Driver] Include stdc-predef.h by default on musl
Match GCC behavior for musl-based Linux targets by implicitly passing
`-include stdc-predef.h` for non-freestanding compilations.
Unlike glibc, musl does not arrange for this header to be included through
its normal system headers. As a result, Clang may miss predefined C macros
provided by musl's stdc-predef.h unless users include it manually, while the
same code works with GCC.
Add Driver tests covering musl, non-musl, freestanding, preprocessed input,
missing-header diagnostics, and actual macro visibility.
This patch is based on: https://reviews.llvm.org/D137043 and
slightly tweaks it, as the code has drifted since 2023 when
that was authored.
Co-authored-by: Tao Liang <Origami404 at foxmail.com>
Co-authored-by: YingChi Long <me at inclyc.cn>