Revert "[IRBuilder] Handle byte types in CreateBitPreservingCastChain (#209557)"
This reverts commit 65e2a60f238e1792487a94232f6dfe2e63c4ea9f.
Byte <-> pointer bitcasts are valid IR and preserve provenance, which the
inttoptr/ptrtoint round trip drops. The MachineVerifier failure it worked
around is fixed in the IRTranslator by the previous commit.
[RISCV][P-Ext] Add builtins and IR intrinsics for packed shifts. (#225968)
The packed shift instructions use 5-bit shift amounts regardless of
element width. The C intrinsic should match this which means we can't
use C shift operators to implement them.
Rename RISCVISD::PSHL to RISCVISD::PSLL.
[test][ssaf][AIX] Fix sed -i portability for AIX (#226293)
AIX's sed does not support the `-i` flag, causing the tests added in
https://github.com/llvm/llvm-project/pull/216183 to fail on AIX. This
patch updates the tests to use a POSIX-compliant redirect instead.
NAS-144052 / 26.0.0 / Only use `create_task` from main loop (by themylogin) (#19867)
`loop.create_task` is not thread-safe
Original PR: https://github.com/truenas/middleware/pull/19865
Co-authored-by: themylogin <themylogin at gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply at anthropic.com>
[clang][test] Fix lifetimes of HS/PP options (#225885)
PR #133467 changed how lifetimes work for `PreprocessorOptions`. In
LexerTest.cpp, the lifetimes were set up incorrectly, leading to
potential use-after-free crashes. This PR fixes that by expanding the
lifetime of both `PreprocessorOptions` and `HeaderSearchOptions`.
virtual_oss(8): Fix cuse.ko check
There is no need at all to load the cuse module to just access the tool help.
kldload always checks for permissions first returning -EPERM if the user can't
load modules and -EEXIST if the user can, but the module is already loaded.
Approved by: christos@
Differential Revision: https://reviews.freebsd.org/D59844
MFC after: 2 weeks
[clang][WeAssembly] Do not override thread model when building without atomics (#225981)
This change does 2 things. The first is to revert #223917, setting the
Triple's
default thread model back to posix. The second is to stop overriding it
when
atomics are not enabled.
This means that compiles with no thread- or atomics-related flags will
get the default posix thread model, independently of whether they get
_REENTRANT defined or the atomics feature is enabled. Practically this
means that the thread model will always be posix unless explicitly
overridden at the driver command line.
The leftover setting of Opts.POSIXThreads became a no-op when used
with the clang driver because the logic would only activate when
-pthread
was not already used (since the driver has separate logic linking
several
[8 lines not shown]
[mlir-c] Add mlirDialectMaterializeConstant (#206553)
Exposes `Dialect::materializeConstant` through the MLIR C API, letting
callers ask a dialect to build a constant operation for a given
attribute and type.
Assisted by: Claude
Revert "[IRBuilder] Handle byte types in CreateBitPreservingCastChain (#209557)"
This reverts commit 65e2a60f238e1792487a94232f6dfe2e63c4ea9f.
Byte <-> pointer bitcasts are valid IR and preserve provenance, which the
inttoptr/ptrtoint round trip drops. The MachineVerifier failure it worked
around is fixed in the IRTranslator by the previous commit.
[GlobalISel] Translate byte-vector <-> pointer bitcasts through integers
The IRTranslator only lowered scalar byte <-> pointer bitcasts to
G_INTTOPTR/G_PTRTOINT. Vector forms such as `bitcast <2 x b32> to ptr`
were lowered to G_BITCAST, which cannot convert between pointers and
other types and fails the MachineVerifier.
Translate any byte (vector) <-> pointer (vector) bitcast through an
integer with the pointer's shape, inserting a G_BITCAST when the byte
side has a different shape.
[IR] Implementation and lowering of `bitinsert` and `bitextract` (#200605)
This PR introduces `bitinsert` and `bitextract` instructions for LLVM
IR. These allow bit manipulation for byte types. Both were lowered to
GlobalIsel and SDag.
Tests were added for AArch64, AMDGPU, ARM, PowerPC, RISCV, x86 and LLVM
IR.
The LangRef was updated to document the new instructions.
The lowering of `bitextract` and `bitinsert` instructions are
implemented using integer operations.
In order to obtain the results for `bitextract`, a shift right
instruction with a specific offset is used (that can be a variable or an
immediate).
Relative to floating-point, in `bitinsert`, we reinterpret the bits of
the floating-point value as if it is an integer.
[4 lines not shown]
NOTES: Multiple schedulers can be compiled in at once
Mention that ULE is the default scheduler when multiple ones are
compiled in and how the tunable 'kern.sched.name' can be used to select
another one.
While here, regroup SCHED_ULE and SCHED_4BSD, as they control if the
respective scheduler instances are compiled in, putting SCHED_STATS
aside.
Reviewed by: mchoo
Fixes: 75a66a92c92f ("- Add an option to compile in SCHED_STATS. ...")
Fixes: 1322760fd127 ("sys: enable both SCHED_ULE and SCHED_4BSD for some configs")
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D60014
[lldb-dap] Always return the up-to-date thread if possible. (#226140)
Only send the initial thread list if the process is not stopped and only
the first time.
Remove the workaround in tests. This should not affect tests since we
mostly get the `threadId` from a stopped event.