[Passes] Port -print-pipeline-passes to PassesOptions (#230220)
-print-pipeline-passes takes an optional value (=text or =tree). Add
FlagOrEnumField, an EnumField whose bare option assigns a given
enumerator and never consumes the next argument, as cl::ValueOptional
does. BoolField and OptionalBoolField use the same BareValue.
clang, flang, LTO, llc, and opt read the format through
PassBuilder::getPrintPipelinePasses() instead of the exported cl::opt.
Aided by Opus 5.5
pcib: Only apply ARI translation to a bridge's own secondary bus
ARI changes RID interpretation only for the device on a downstream
port's secondary bus. pcib_xlate_ari() applied that translation to
every config access through an ARI-enabled bridge, including cycles
forwarded to a subordinate bus.
A non-zero slot on a subordinate bus then panics an INVARIANTS kernel
and is misrouted otherwise. Translate only when the access targets
this bridge's secondary bus.
Reviewed by: kib, jhb
Fixes: 55d3ea1731d1 ("Add support for PCIe ARI")
Sponsored by: AMD
Differential Revision: https://reviews.freebsd.org/D60033
(cherry picked from commit 10409ee40baf593b810cd0140f3c2f0d737c1a65)
ktls CBC decrypt: Avoid creating zero length iovec entries
If an mbuf's length in the chain for an encrypted TLS record exactly
matches the remaining length of header bytes to skip, skip the mbuf
entirely rather than adding a zero-length iovec entry.
Sponsored by: Chelsio Communications
(cherry picked from commit 1756d1cab3ce28085eec94a45c557e1af265ccd0)
route/fib_algo: Respect immediate_sync in fd_ref_nhop
Now fd_ref_nhop() returns zero for cross family routes,
Do not schedule nhop references and try to rebuild it immediately
for connected and static routes.
PR: 298733
Fixes: 633438224304 ("route/fib_algo: Fix nexthop index ...")
(cherry picked from commit 3d030136ad1906e6d463673a8d2ef313eb054fb3)
[AMDGPU] Insert MFMA anti-hints in GCNPreRAOptimizations (#218075)
This PR adds rule-based anti-hints in the GCNPreRAOptimizations phase so
that
the register allocator prefers registers that avoid hazard nops.
Instructions
are classified into different classes and hazard windows are computed
from the
waitstate info. The rules are built to describe the hazardous situations
and
their hazard windows. Added an AntiHintEngine that uses these rules to
insert
anti-hint relations between vregs, which the register allocator later
uses to
prefer allocations that avoid the corresponding hazardous physical
registers.
## Stack
PR **4/4**. Depends on #218074. Next #226397
route/fib_algo: Fix FIB_ALGO without ROUTE_MPATH option
The ROUTE_MPATH compile option has been removed from CURRENT
branch. Therefore, use the ROUTE_MPATH macro for nhgrp headers.
PR: 299210
Fixes: 891bda143f6b ("route/fib_algo: Fix nexthop index ...")
Differential Revision: https://reviews.freebsd.org/D59552
(cherry picked from commit 63343822430453f4add20bcbfa134c99132361df)
SYSCTL(9): Retire SYSCTL_NODE_CHILDREN()
It does not provide value over the pre-existing SYSCTL_STATIC_CHILDREN()
macro, which is widely used in the tree, whereas SYSCTL_NODE_CHILDREN()
is not.
Reviewed by: markj
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D60009
(cherry picked from commit 4672ad1f16092c146261b4de485ec5eb5e8d127b)
Reject AFFINITY strides and nested vector subscripts
OpenMP allows a stride expression in an array section only where a clause
explicitly permits one, and AFFINITY does not. Semantics accepted positive
strides and lowering only reported a non-fatal error, so compilation
succeeded or crashed on the bounds. Report a stride in the last part
reference of an AFFINITY locator as a semantic error, including an explicit
unit stride. DEPEND and REDUCTION fall under the same rule but currently
accept strides; tightening them is left to a separate change.
The vector-subscript TODO for AFFINITY only checked the last part
reference, so a(v)%field(1) reached an assertion. Check every part
reference instead.
[cmake] Limit `/Zc:dllexportInlines-` flag to C/C++ (#227791)
This adjusts the way the `/Zc:dllexportInlines-` flag is passed so it
only takes effect for C and C++ targets built with clang-cl. These
changes are needed to prevent downstream consumers like Swift from
breaking due to being passed the flag.
The effort to build LLVM as a dylib is tracked in #109483.
[clangd] Clear LLVM_LINK_COMPONENTS for test plugin modules (#230359)
clang-tools-extra/clangd/CMakeLists.txt sets directory-scoped
LLVM_LINK_COMPONENTS (including Support), which is inherited by
clang-tools-extra/clangd/test/plugins/CMakeLists.txt.
When building ClangdFeatureModuleExample and
ClangdStandaloneTweakExample (added in #226995), llvm_add_library
statically links libLLVMSupport.a into the plugin shared libraries
unless LLVM_LINK_COMPONENTS is cleared before creating the targets.
Loading these plugins into clangd then triggers an ASan ODR violation on
llvm::vfs::FileSystem::ID because both clangd and the plugin module
contain their own copy of VirtualFileSystem.cpp.o.
Clear LLVM_LINK_COMPONENTS before calling llvm_add_library so the
plugins resolve LLVM symbols from the clangd executable at load time,
and remove the dead post-target LLVM_LINK_COMPONENTS block.
Fixing https://lab.llvm.org/buildbot/#/builders/52/builds/20707
Assisted-by: Gemini
[SLP][modularisation][NFC] Move getReductionInstr/getAggregateSize to SLPReductionUtils
Move the BoUpSLP-independent helpers getReductionInstr and getAggregateSize
out of SLPVectorizer.cpp into the self-contained
SLPVectorizer/SLPReductionUtils.{h,cpp} module.
Part of the SLPVectorizer.cpp modularization effort:
https://discourse.llvm.org/t/modularizing-slpvectorizer-cpp/90922
[SLP][modularisation][NFC] Move isFirstInsertElement/getDebugLocFromPHI to SLPUtils
Move the BoUpSLP-independent helpers isFirstInsertElement and
getDebugLocFromPHI out of SLPVectorizer.cpp into the self-contained
SLPVectorizer/SLPUtils.{h,cpp} module.
Part of the SLPVectorizer.cpp modularization effort:
https://discourse.llvm.org/t/modularizing-slpvectorizer-cpp/90922
[SLP][modularisation][NFC] Move loop trip-count helpers to SLPUtils
Move the BoUpSLP-independent helpers findInnermostNonInvariantLoop and
getLoopTripCount out of SLPVectorizer.cpp into the self-contained
SLPVectorizer/SLPUtils.{h,cpp} module. getLoopTripCount reads the file-local
LoopAwareTripCount cl::opt, which stays static in SLPVectorizer.cpp and is
passed to the moved helper as an explicit parameter. NFC.
Part of the SLPVectorizer.cpp modularization effort:
https://discourse.llvm.org/t/modularizing-slpvectorizer-cpp/90922
[AMDGPU] Promote wmma_f32_16x16x128_f8f6f4 to scaled version on gfx1250-strict (#230253)
Added scale factor is 0 which does not change the result. "0" is a
special value that maps to the exponent "1.0" when passed as a constant.