[ADT] Reinstate "Refactor Bitset to Be More Constexpr-Usable" (#189497)
Reland of #172062 (a71b1d2), which was reverted in b0234d1.
This patch makes essential Bitset member functions constexpr (`set()`,
`any()`, `none()`, `count()`, `operator==`, `!=`, `<`, `\~`) and adds a
new `all()` method. It also introduces a `maskLastWord()` invariant to
ensure unused high bits in the last word are always zero, which is
required for correctness of `operator~`, `set()`, `all()`, and
comparisons on non-word-aligned sizes (e.g., `Bitset<33>`).
Changes from the original reverted PR:
- Replaced `llvm::any_of` with an inline loop to avoid depending on
constexpr `any_of`/`none_of` from `STLExtras` (#172536), which was also
reverted due to a GCC 15.2.1 bootstrap miscompile.
- The patch is now fully self-contained with no prerequisite changes.
Motivation: This is a prerequisite for making `LaneBitmask` a wrapper
around `Bitset`, enabling scalable lane bitmasks beyond 64 bits
(https://discourse.llvm.org/t/rfc-out-of-lanebitmask-bits-again/88613).
m4: Stop abbreviating builtin names
* Stop abbreviating macro names half-randomly to 8 chars, this is no
longer 1990.
* Likewise for function names (in particular use doindex for a function
that is notably different from the classic index function).
* Rename a few things for more fidelity: eval is the builtin name, not
expr and your maketemp/mkstemp conform to mkstemp semantics for better
security.
* Rewrap a few comments that were ludicrously short.
No functional changes except improved accuracy of some error messages.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D55793
(cherry picked from commit f8f6f1cbd576ab5f15cef178cc05251365652f74)
m4: Stop abbreviating builtin names
* Stop abbreviating macro names half-randomly to 8 chars, this is no
longer 1990.
* Likewise for function names (in particular use doindex for a function
that is notably different from the classic index function).
* Rename a few things for more fidelity: eval is the builtin name, not
expr and your maketemp/mkstemp conform to mkstemp semantics for better
security.
* Rewrap a few comments that were ludicrously short.
No functional changes except improved accuracy of some error messages.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D55793
(cherry picked from commit f8f6f1cbd576ab5f15cef178cc05251365652f74)
m4: Stop abbreviating builtin names
* Stop abbreviating macro names half-randomly to 8 chars, this is no
longer 1990.
* Likewise for function names (in particular use doindex for a function
that is notably different from the classic index function).
* Rename a few things for more fidelity: eval is the builtin name, not
expr and your maketemp/mkstemp conform to mkstemp semantics for better
security.
* Rewrap a few comments that were ludicrously short.
No functional changes except improved accuracy of some error messages.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D55793
(cherry picked from commit f8f6f1cbd576ab5f15cef178cc05251365652f74)
[LLD][ELF] Skip non-inputsections to avoid invalid cast in Arm BE8 handling (#188154)
This patch fixes https://github.com/llvm/llvm-project/issues/187033
In BE8 mode, instruction bytes are reversed for sections containing
code. This logic currently assumes that arm mapping symbols (e.g. $a,
$t, $d) are always associated with InputSections.
However, mapping symbols can also be defined in other section types such
as mergeable sections (SHF_MERGE). These are not represented as
InputSection, and attempting to cast them using
cast_if_present<InputSection> results in an assertion failure.
[BOLT][AArch64] Strip uneeded labels from FEAT_CMPBR tests. (#189931)
Eliminates the temporary labels so that BOLT does not recognize them as
secondary entry points.
py-colored: updated to 2.3.2
2.3.2
Added
Added tests_pytest/ suite with pytest-based tests for foreground, background, styles, exceptions, hex color matching, and convert functionality.
Fixed
Fixed mypy type error in hexadecimal.py: changed color parameter type from str | int to str in Hex.find(), as the method requires string input for len() and indexing operations.
Fixed mypy type errors in attributes.py: added missing return type annotation (-> None) to MetaStyle.__getattr__() and replaced bare dict with dict[str, str] for _STYLES and _COLORS class attributes.
Fixed ValueError in Colored.enabled() when FORCE_COLOR environment variable contains a non-integer value (e.g. FORCE_COLOR=yes): invalid values are now treated as enabled.
Fixed Controls.nav() ignoring column=0 due to falsy check: changed if column: to if column is not None: so cursor position at column 0 (start of line) works correctly.
Fixed ValueError crash in Hex.find() when passing an invalid hex string (e.g. #FF, #AABBCCDD): added format validation that raises InvalidHexColor for strings that are not 4 or 7 characters long starting with #.
Fixed RGB values out of range in Utilities.is_percentage(): values are now clamped to [0, 255] to always produce valid ANSI escape sequences without breaking existing code.
Fixed incorrect return type annotation -> None on __getattr__ in MetaStyle, MetaFore, and MetaBack metaclasses: changed to -> NoReturn since these methods always raise an exception and never return.
Fixed Utilities.set_colorterm() losing the default truecolor value when $COLORTERM is not set in the environment: changed fallback from '' to self.colorterm to preserve the initialized default.
Renamed misleading Hex.cube() method to Hex.square() to correctly reflect its calculation (x*x), which is the intended least squares fit operation.
py-Pillow: updated to 12.2.0
12.2.0
Update 12.2.0 release notes
Add loader plugins: AMOS abk, Atari Degas, 40+ more obscure formats via Netpbm
Update Python versions
Jeffrey A. Clark -> Jeffrey 'Alex' Clark
Add release notes for
Add Amiga Workbench .info loader to 3rd party plugins list
Merge PFM documentation into PPM
Update macOS tested Pillow versions
Fix CVE number
[MLIR][Linalg] Generic to category specialization for unary elementwise ops (#187217)
Handle specialization of `linalg.generic` ops representing a unary
elementwise computation to the `linalg.elementwise` category op. This
implements a previously absent path in the linalg morphism.