Revert "[SPIRV] Emit intrinsics for globals only in function that references them (#178143 (#179268)
This reverts commit 1daef5927ff0e43b92d615380a8d60f213cc5e52.
From the ASAN buildbot:
```bash
FAIL: LLVM :: CodeGen/SPIRV/extensions/SPV_INTEL_function_pointers/fun-ptr-addrcast.ll (46596 of 94488)
******************** TEST 'LLVM :: CodeGen/SPIRV/extensions/SPV_INTEL_function_pointers/fun-ptr-addrcast.ll' FAILED ********************
Exit Code: 2
Command Output (stdout):
--
# RUN: at line 5
/home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/llc -verify-machineinstrs -O0 -mtriple=spirv32-unknown-unknown /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_function_pointers/fun-ptr-addrcast.ll -o - --spirv-ext=+SPV_INTEL_function_pointers | /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/FileCheck /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_function_pointers/fun-ptr-addrcast.ll
# executed command: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/llc -verify-machineinstrs -O0 -mtriple=spirv32-unknown-unknown /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_function_pointers/fun-ptr-addrcast.ll -o - --spirv-ext=+SPV_INTEL_function_pointers
# note: command had no output on stdout or stderr
# error: command failed with exit status: 1
# executed command: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/FileCheck /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_function_pointers/fun-ptr-addrcast.ll
[9 lines not shown]
NAS-139358 / 26.0.0-BETA.1 / Type-safe update plugin (#18053)
In preparation for the oncoming update system changes, I made the update
plugin type-safe.
[Compiler-rt] Implement AEABI Unaligned Read/Write Helpers in compiler-rt (#167913)
This patch adds implementations for the __aeabi_uread and __aeabi_uwrite
helper functions to compiler-rt.
Without these helpers, LLVM would need to inline byte wise sequences ,
which can increases code size, especially at -Os/-Oz. Using the helper
functions allows to retain correctness while avoiding the code-size
growth.
GCC-based toolchains already provide these AEABI helpers, so supporting
them in compiler-rt ensures parity and avoids accidental dependencies on
libgcc when LLVM begins emitting these calls.
[ARM] Lower unaligned loads/stores to aeabi functions. (#172672)
When targeting architectures that do not support unaligned memory
accesses or when explictly pass -mno-unaligned-access, it requires the
compiler to expand each unaligned load/store into an inline sequences.
For 32-bit operations this typically involves:
1. 4× LDRB (or 2× LDRH),
2. multiple shift/or instructions
These sequences are emitted at every unaligned access site, and
therefore contribute significant code size in workloads that touch
packed or misaligned structures.
When compiling with -Oz and in combination with -mno-unaligned-access,
this patch lowers unaligned 32 bit and 64 bit loads and stores to below
AEABI heper calls:
```
__aeabi_uread4
[21 lines not shown]
Move John Ericson to the inactive maintainers list (#179264)
While reaching out to folks for a maintainers list refresh, John asked
to step down due to other commitments. Thank you for all your help!
[clang][bytecode] Fix crash on __builtin_infer_alloc_token with struct argument (#178936)
## Summary
- Fix crash when passing non primitive types (structs) to
`__builtin_infer_alloc_token`
- The bytecode interpreter's discard loop dereferenced an empty
`OptPrimType` for non primitive arguments
## Test plan
- Added regression test in `clang/test/SemaCXX/alloc-token.cpp`
- Existing tests continue to pass
Fixes #178892
[NFC][LoopUnroll] Add `-unroll-runtime-other-exit-predictable=false` to `unroll-multi-exit-loop-heuristics.ll` (#179198)
Adds `-unroll-runtime-other-exit-predictable=false` option to
`unroll-multi-exit-loop-heuristics.ll` test for stability reasons.
This is a followup to a discussion in #164799 and a similar patch
https://reviews.llvm.org/D98098. Since this option is false by default,
this is an NFC.
NAS-139527 / 25.10.2 / SCST suspend failure on ALUA failover (by bmeagherix) (#18139)
Because of a recent change wrt `recovery_tmo` on the internal HA
targets, inflight IOs thru the STANDBY can interfere with SCST's ability
to be suspended on the STANDBY just as it is being promoted to ACTIVE.
Explicitly logging out these targets will prevent the issue. This is
performed by `dlm.reset_active` to minimize overhead.
Other overhead is also eliminated:
- no longer clear ACTIVE node `cluster_mode`
- decouple ACTIVE reset from `activate_extemts`. (Couple
`standby_after_start` instead.)
Also improve `test__alua_config` to use sync always for the dataset
holding the file underlying a target (and created shortly before a
reboot).
----
[10 lines not shown]
[DAG] Change default expansion of strictfp vector operations
The previous default implementation unrolled strictfp vector operation,
producing its scalar version. This behavior can result in low
performance in some cases. A better behavior is to convert strictfp
nodes into default-mode operations. This method has already been used to
support strictfp nodes on targets with limited support of strictfp
operations.
Many targets already implement lowering of strictfp and default-mode
nodes identically. Small number of deviations from this rule is fixed in
this change. Identical treatment of strictfp and default mode nodes is
natural because both represent the same operation in the resulting code,
the only difference is additional restrictions that compiler should
apply when it handles strictfp nodes.
Unrolling vector operations can also violate user expectations. In
strictfp mode, vector operations cannot be created by auto-vectorization
because of the side effect of constrained functions, so the vector
[3 lines not shown]
[AArch64][llvm] Remove `+xs` gating for `tlbip *nxs` instructions
A recent spec update has removed FEAT_XS gating for `tlbip *nxs`
instructions. It remains gated on FEAT_XS for `tlbi *nxs` instructions.
NAS-139527 / 26.0.0-BETA.1 / SCST suspend failure on ALUA failover (#18123)
Because of a recent change wrt recovery_tmo on the internal HA
targets, inflight IOs thru the STANDBY can interfere with SCST's ability
to be suspended on the STANDBY just as it is being promoted to ACTIVE.
Explicitly logging out these targets will prevent the issue. This is
performed by dlm.reset_active to minimize overhead.
Other overhead is also eliminated:
- no longer clear ACTIVE node cluster_mode
- decouple ACTIVE reset from activate_extents. (Couple
standby_after_start instead.)
Also improve test__alua_config to use sync always for the dataset
holding the file underlying a target (and created shortly before a
reboot).
libc: Improve POSIX conformance of dirfd()
POSIX states that dirfd() should set errno to EINVAL and return -1 if
dirp does not refer to a valid directory stream. Our interpretation is
that this applies if dirp is null or the file descriptor associated
with it is negative.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D55025