tests: Fix build if TIOCSTI is not defined
Some downstream projects (e.g. ElectroBSD) have removed the TIOCSTI
We already have some components (such as mail and tcsh) that build
without TIOCSTI defined. This is (existing portability support in those
projects.
Simplify things for downstreams by extending this approach to this
additional TIOCSTI user.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D50614
(cherry picked from commit 52a2b4bc5da21d7a54cb16b9450196244b59b8c0)
(cherry picked from commit b1bb3aa65cc9d720f54dba009565e0d1d0419323)
[mlir][memref] Fix mem2reg crash on zero-extent alloca (#216851)
`memref` allows a zero extent, but vector types require strictly
positive ones.
Since #211880, `AllocaOp::getPromotableSlots` builds a `VectorType` from
the
memref shape, so `mlir-opt --mem2reg` asserts on
```mlir
func.func @z() { %a = memref.alloca() : memref<0xf32> return }
```
Bail out of whole-buffer promotion when the shape contains a zero
extent. The
scalable path needs `*c > 0` rather than `!= 0`, since
`VectorType::verify`
rejects `<= 0`.
Assisted-by: Claude (Anthropic)
AI-assisted, disclosed per the LLVM AI Tool Use Policy.
[RISCV] Use correct type for (u)int64_t in RVV intrinsics on OpenBSD (#217211)
The intrinsics are documented to use (u)int64_t for 64-bit scalars.
OpenBSD on RV64 uses long long for int64_t while Linux uses long. The
current code finds the first 64 bit type which is long for both OpenBSD
and Linux.
This patch looks up the type that corresponds to (u)int64_t.
Fixes #216531.
Assisted-by: Claude
[mlir][SPIR-V] Fix ArrayType::getSizeInBytes double counting the stride (#203821)
The array stride is the per-element byte distance and already includes
the element size, so adding it to the element size overcounted strided
arrays
[DAGCombiner] Pass const SDLoc &DL to visitADDLikeCommutative. NFC (#217169)
Instead of passing an SDNode* that was only intended for to create an
SDLoc, we can use the SDLoc the caller already created.
[SCEV] Answer range queries for constants directly (NFC) (#217339)
Skip unnecessary getRangeRef calls and return the early for constants
when getting constant min/max values.
Adding entries to the cache for constants is unnecessary and relatively
expensive.
There may be better ways to integrate this, although a few different
attempts did not yield similar compile-time improvements.
Compile-time impact:
* stage1-O3: -0.07%
* stage1-ReleaseThinLTO: -0.06%
* stage1-ReleaseLTO-g: -0.06%
* stage1-aarch64-O3: -0.06
* stage2-O3: -0.07%
[3 lines not shown]
LinuxKPI: 802.11: deal with wdev list, and misc
Fill in more (lvif) wdev details and add it to the list under the wiphy
struct so that iterators at least work and find the (one) device.
This is needed for the upcoming espwl(4) driver.
misc: add WPI-SMS4 to the list of cipher suits (we won't support it but
at least print the name).
MFC after: 3 days
devel/py-banal: Update to 1.1.2
* Switch to the PEP517 build framework.
* Use GitHub for a while because no sdist tarballs are available
at PyPI.
Changelog since 1.0.6:
textproc/py-normality: Update to 3.1.0
* Fold ICU option because its requirement, py-pyicu, is now a mandatory
dependency since the 3.0.0 release.
* Switch to GitHub for a while because no sdist tarballs are available
at PyPI.
Changelog since 2.5.0:
https://github.com/pudo/normality/compare/2.5.0...3.1.0
LinuxKPI: 802.11: add more defines, structures, ...
Add more defines, structures, sort struct field types, add inline
functions (partially implemented) all needed for the upcoming
espwl(4) wireless driver.
MFC after: 3 days
[Clang][Sema] Fix lambda attribute processing order with clang optimize off (#217194)
This PR fixes a regression from #215173 where an `always_inline` lambda
on a `#pragma clang optimize off` will throw a compiler error. For
example,
```
#pragma clang optimize off
// 1. function:
__attribute__((always_inline)) void front_func() {}
// 2. lambda:
auto trailing_lambda = []() __attribute__((always_inline)) { return 42; };
```
causes only an error for the lambda, not function:
```
[16 lines not shown]
Merge tag 'chrome-platform-v7.3' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux
Pull chrome platform updates from Tzung-Bi Shih:
"New:
- Add post_power_on_delay_ms for Hana in of_hw_prober
Improvements:
- Use dumb trackpad prober for Spherion in of_hw_prober
Fixes:
- Check bound of firmware-reported data in cros_ec_sensorhub and
cros_ec_typec
- Fix memory overread in cros_ec_sensorhub
- Fix resource leak in cros_ec_debugfs
- Clamp payload length for LIGHTBAR_CMD_SET_PROGRAM_EX in
cros_ec_lightbar
Cleanups:
- Drop unused platform_device_id driver data
[14 lines not shown]
[X86] Remove write-only variable OffsetOperatorLoc (NFC) (#217231)
This patch removes OffsetOperatorLoc and getOffsetLoc in
IntelExprStateMachine. Nobody calls getOffsetLoc, so
OffsetOperatorLoc is write-only.
OffsetOperatorLoc and getOffsetLoc were introduced on Dec 30, 2019 in
commit 4a7aa252a32a94b1bb61b3dc7f027b4a27ae334f, but getOffsetLoc has
never been called.
Assisted-by: Antigravity
[mlir][IR] Add transient scope support for resettable MLIRContext. (#217320)
We have cases where we have many context being used to compile
independent modules. Creating a context per ends up being rather
expensive and the only reason to not reuse contexts more is bloat over
time. This changes adds a "transient" scope which can be used for such
cases. Initially I had tried a "cheap fork" approach for contexts, this
is complimentary to that (that one allows for independent contexts
cheaply), while this one is less invasive.
Introduce an overlay/layered state architecture in StorageUniquer and
MLIRContext to enable efficient scoping and rollback of transient types,
attributes, affine expressions, and distinct attributes added since
entering a transient scope.
When executing repeated compilation passes or running in long-lived
compiler services (e.g. JITs, servers, REPLs), allocating and destroying
an MLIRContext incurs significant overhead (~3.7 ms per context) to
re-register and load dialects. This change allows freezing an
[4 lines not shown]
ibus: use common Wayland platform detection
Remove the temporary NetBSD native X11 workaround and rely on
PLATFORM_SUPPORTS_WAYLAND.
Native EGL support is now handled by graphics/MesaLib/features.mk, so
the additional libglamoregl.so check is no longer needed. PR pkg/60476
Bump PKGREVISION.
gtk3: remove NetBSD-specific Wayland workaround
MESALIB_SUPPORTS_EGL now handles native EGL support correctly on
NetBSD, so PLATFORM_SUPPORTS_WAYLAND already excludes systems where
the native libepoxy has no EGL support.
Remove the additional libglamoregl.so check added in PR pkg/60295.
The file is part of the xserver set, so checking for it incorrectly
disables Wayland on bulk build hosts where the xserver set is not
installed. PR pkg/60476
Bump PKGREVISION.
graphics/MesaLib: improve native EGL detection on NetBSD
For native X11 on NetBSD, use HAVE_XORG_EGL when it is available
instead of only checking for the EGL header.
On older NetBSD releases without HAVE_XORG_EGL, use HAVE_XORG_GLAMOR
as a fallback, since native libepoxy EGL support was conditional on
GLAMOR there.
This is a proper fix for PR pkg/60295 and makes MESALIB_SUPPORTS_EGL
reflect the actual native EGL support more accurately.
PR pkg/60476