[SandboxVec][LoadStoreVec] Fix Legality direction initialization (#237278)
Before this patch Legality was getting initialized with BottomUp
direction regardless of whether we were vectorizing stores or loads.
This patch fixes this and sets the direction accordingly.
The reason why we were not getting any issues was that when vectorizing
loads we are not attempting to vectorize stores, but when vectorizing
stores we were also attempting to vectorize loads. So this is
effectively an NFC.
[flang] Use inline temporaries for array-valued array constructor entries (#240342)
Currently code of the form
```fortran
subroutine slow(source, dest)
implicit none
real(8), intent(in) :: source(4)
real(8), intent(out) :: dest(4)
dest = [source(1:4)]
end subroutine
```
lowers to runtime calls for the array constructor.
While
```fortran
subroutine better(source, dest)
implicit none
real(8), intent(in) :: source(4)
real(8), intent(out) :: dest(4)
dest = [source(1), source(2), source(3), source(4)]
[14 lines not shown]
[MLIR-C] Fix LLVM component dependencies (#243084)
Add Core and Support as LLVM component dependencies. This will make sure
that we link libLLVM.so if the dylib is used, instead of doing an
additional static link that results in ODR violations.
I checked that the MLIR C API tests work both with a dylib build and a
shared libs build.
[mlir][tosa] Update operation purity documentation (#239964)
Add a statement REQUIRE is assumed to have no side effects in this
implementation. This is making the choice in following statement from
the specification explicit in this implementation: "Note that whether
REQUIRE has side effects is implementation-defined.".
Sync SMB pools before STCNITH so durable handles survive
On failover, the other controller drops SMB durable handles that have
unflushed writes. Copies in progress then fail (Windows error
0x8007003B).
With SMB stateful failover on, become_passive now does this first:
- Block SMB and VIP traffic both ways.
- Run `zpool sync` on the pools that have SMB shares.
- Run `truenas_smbhad mark-synced` so the other controller keeps the
handles.
Each step has a timeout. If one fails, the rest are skipped and the
handles are dropped as before.
`failover.firewall.drop_all` gets a `replies` option for the first
step. Without it, the rules are as before.
Needs the matching truenas_smbhad and Samba changes.
[X86] LowerShiftByScalarImmediate - always freeze vXi8 value before shifting as bitcast vXi16 value (#243108)
We're either increasing uses or shifting as a vXi16 type which can
potentially propagate poison from one i8 element to the entire i16.
LowerShiftByScalarVariable has a similar weakness, which I'll look at
separately.
Fixes #241273
Revert "CodeGen: Create register unit dead defs in slot order (#242577)" (#243143)
This reverts commit 99b84212ed1c630c615b266badbf69c093e98758.
Mid air collision
system: implemement far gateway for IPv6 #10578
Apparently this works on recent FreeBSD and WG VPN providers
like the coolness of /128 addresses being given out. Fix both
static routes and gateways, but do not add an auto-detect for
IPv6 which isn't needed for this use case and also not otherwise
known to happen out in the wild.
Since the 'missing' gateway error print doesn't bring much to
the table remove it and prevent empty gateway from being used
below which wouldn't work anyway.
Co-authored-by: @cayossarian
[IPO] Declare Attributor and OpenMPOpt command line options in TableGen (#242879)
Port the options of Attributor, AttributorAttributes, OpenMPOpt and
HotColdSplitting.
* Attributor gains an Opts member, which OpenMPOpt reads.
HotColdSplitting takes IPOOptions.
* The exported global MaxInitializationChainLength becomes an Attributor
member. The static PotentialValuesState::MaxPotentialValues becomes a
member, which AAPotentialConstantValues sets from its Attributor and
getBestState(const PotentialValuesState &) copies.
* Rename the -openmp-opt-disable* spellings to positive ones. The old
spellings remain aliases, which reject a value, so tests using
-openmp-opt-disable-x=false switch to the new spelling.
LLM-aided
[SPIRV] Use MachineOperand instead of MCOperand in getInlineSpirvType. (#242863)
MCOperand uses MCRegister, but MCRegister isn't supposed to hold virtual
registers.
Use MachineOperand instead. This class is larger, but the vector is
short lived so this shouldn't matter.
[libc][stdio] Implement getline POSIX function. (#242975)
Partially based on PR #219601, but with many changes to implementation,
and added tests.
This is an implementation of POSIX
[getline](https://pubs.opengroup.org/onlinepubs/9799919799/functions/getline.html)
function. It's mostly a straightforward per-byte reading, but with
manual malloc/free buffer management required for that function. Some
notes:
* implementation is generic to be trivially reusable for `getdelim`
* ad-hoc dynamic buffer management, similar to what we do in other
functions like `scandir` (there's no unified vector, deliberately)
* we carefully implement POSIX spec where even invalid input arguments
to `getline` set the error bit on the input stream.
* unit tests cover various cases (including buffer overflows) by using
fakes and templates to prevent buffers from growing large as they would
in the normal production version.
[3 lines not shown]
[RISCV][GlobalISel] Combine byte-spreading operations to orc.b (#240276)
Recognize byte-spreading shift/subtract patterns in the RISC-V
GlobalISel post-legalizer combiner and fold them to orc.b when
Zbb is enabled.
CodeGen: Simplify def segment extension in shrinkToUses
During extendSegmentsToUses, Segments holds only one def segment per
value, and none extend past their block. Live-in segments are kept
separately in LiveIns. To extend a def to a use, find the last segment
starting before the use, check that it starts in the use's block, and
move its end to the use. This replaces extendInBlock, whose general
search and merging of overlapped segments never applies here.
Also combine the per-block live-out and live-in tables into one struct.
llc instructions:u:
CTMark x86_64: -0.07%
CTMark arm64: -0.10%
AMDGPU sample: -0.27%
Largest AMDGPU improvements:
rocprim warp_sort (gfx1100): -1.89%
rocsolver stedc (gfx942): -1.70%
[5 lines not shown]
CodeGen: Create register unit dead defs in slot order (#242577)
computeRegUnitRange created dead defs in use list order, so each one
was inserted into the middle of the segment vector. To avoid the
quadratic cost, every register unit range was built through a std::set
of segments, costing a heap allocation per segment.
Sort the def slots first and append the dead defs in order instead,
and remove the segment set, since register units were its only user.
This also shrinks LiveRange by a pointer.
llc instructions:u:
CTMark x86_64: -0.42%
CTMark arm64: -0.32%
Largest AMDGPU lit tests, gfx942: -0.24%
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>