[MC] Hash section names once in recordELFMergeableSectionInfo. NFC (#245122)
Key both ELFSeenGenericMergeableSections and ELFEntrySizeMap by
CachedHashStringRef so that hash lookups don't need to recompute the
section name hash. ELFSeenGenericmergeableSections contains most
sections and the long C++ mangled names are expensive.
[orc-rt] Add DlfcnLoaderAdapter. (#245120)
DlfcnLoaderAdapter simplifies exposing an ORC runtime loader through the
dlfcn.h APIs. Subclasses implement dlopen, dlclose, dlsym, and dladdr in
terms of their underlying loader, reporting failures with Error and
Expected as usual in the ORC runtime. The adapter takes care of
translating those results into dlfcn.h's error-reporting scheme: each
failure returns the operation's POSIX failure value, and its message is
made available to the calling thread through dlerror. Failures are also
logged, under a new LoaderAPIs logging category.
JIT'd code reaches an adapter through C entry points
(orc_rt_DlfcnLoaderAdapter_*) and an instance symbol,
orc_rt_DlfcnLoaderAdapter_Instance, which the adapter adds to a symbol
table supplied by its creator. The creator publishes that table to the
session once the whole loader system has been constructed.
Supporting changes:
- orc-rt-c/bedrock/sys/posix/dlfcn-types.h provides orc_rt_Dl_info and
[6 lines not shown]
Utils: Preserve function analyses in CanonicalizeAliases and NameAnonGlobals (#244987)
These passes only change aliases and the names of globals, so they do
not need to invalidate any function analyses.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
GlobalSplit: Preserve CFG analyses (#244959)
GlobalSplit only changes global variables, so it does not need to
invalidate every function analysis.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[MC] Allow relocation section to share name with a label (#245121)
We currently reject the new case in reloc-same-name-section.s as
"invalid symbol redefinition" while GAS allows it. Allow it by creating
a MCSectionELF directly with a null `Begin` symbol.
Revert "[SPIR-V] Default to NewPM" (#245119)
Reverts llvm/llvm-project#239489
Breaks https://lab.llvm.org/buildbot/#/builders/225/builds/26922. Looks
like a latent machine code verification bug where the legacy pipeline
wasn't running the machine verifier.
build.sh: retry the Pi device-tree downloads
Run 45103400295's Server rpi5 image failed because
raw.githubusercontent.com answered one of the eight BCM2712 device-tree
downloads (bcm2712d0-rpi-5-b.dtb) with "Service Unavailable"; build.sh
made a single attempt per file, so one transient error failed the job.
The Desktop rpi5 job fetched the same files a minute earlier without
trouble.
Add fetch_retry: up to five tries with a growing wait (5, 10, 15, 20 s),
writing OUT.part and renaming it only on success so a failed try never
leaves a half-written file that a later build would treat as cached. Use
it for the device trees; the existing check that each file starts with
the flattened-device-tree magic stays.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
[X86] Skip finishLayout without MCBoundaryAlignFragment. NFC (#245114)
-x86-pad-for-branch-align defaults to true, so `finishLayout` walks
every text section even when branch alignment is disabled. Skip
it in the majority of cases when AllowAutoPadding is false.
Also add a test for -x86-pad-for-branch-align=0, which was uncovered.
[orc-rt] Add quote() to StringExtras.h. (#245112)
quote() wraps a string so that StringOutputStream prints it in double
quotes, escaping any embedded quotes and backslashes as std::quoted
does. A null const char * prints as NULL, so that nullable C strings
(e.g. arguments in diagnostics) can be printed without a separate null
check.
[SPIR-V] Use float LLTs to type FP vregs after legalization (#243866)
Read the SPIR-V type of float vregs from their LLT instead of guessing
it from their uses
[Clang] Fix qualifiers of ext vector components accessed via `->` (#244980)
For `p->x` where `p` points to an `ext_vector_type` vector, Sema takes
the qualifiers from the type of `p`, which is the pointer itself,
instead of the vector it points to. As a result, `p->x = 1` is accepted
even if `p` points to a `const` vector, while `(*p).x = 1` is rejected.
An address space on the vector is lost in the same way.
This PR takes the qualifiers from the vector for both `.` and `->`. A
swizzle that repeats a component, e.g. `v.xx`, is a computed value, so
it doesn't get any qualifiers.
This PR was assisted by AI but I reviewed all the changes.
[NFC][SanitizerCoverage] Reuse RuntimeCalls storage across functions (#244787)
Avoid swapping RuntimeCalls into a local SmallVector in
addFuncletBundles(), which frees its heap buffer after every function
with more than 16 callbacks even on non-scoped-EH targets. Clear
RuntimeCalls on scope exit instead to preserve allocated capacity across
functions.
Follow-up to #226762.
Assisted-by: Gemini
[NFC][SanitizerCoverage] Check FuncletPadInst for funclet bundles (#244788)
Check isa<FuncletPadInst>(Pad) instead of Pad->isEHPad() when attaching
funclet operand bundles. The IR verifier only accepts CatchPadInst or
CleanupPadInst operands for "funclet" bundles, whereas isEHPad() also
matches LandingPadInst and CatchSwitchInst.
Follow-up to #226762.
Assisted-by: Gemini
filesystems/R-cran-watcher: Add new port
watcher watches files, or directories recursively, for changes in the
background from R. It is a binding to the libfswatch library, which
uses kqueue on FreeBSD, and can log change events or pass the changed
paths to an R function through the 'later' package.
WWW: https://watcher.r-lib.org
imx7d: fix remaining clock table errors
The i2c1-4 root gates used bit 0, which is inside POST_PODF, instead
of bit 28, so enabling an I2C clock halved it.
usdhc2_pre_div and usdhc3_pre_div had the USDHC1_ROOT_PRE_DIV id.
pll_enet_250m_clk was defined twice.
Mk/bsd.sites.mk: Update MASTER_SITE_GNUPG
Try the main site first as all of the mirrors seem to be alive, but
months behind. Iterating through many laggy mirrors is quite annoying
and not great for automated tools like portscout.
MFH: 2026Q4
(cherry picked from commit c511150b1fdcddd4b5df6b1df83be10d2566dbbc)
Mk/bsd.sites.mk: Update MASTER_SITE_GNUPG
Try the main site first as all of the mirrors seem to be alive, but
months behind. Iterating through many laggy mirrors is quite annoying
and not great for automated tools like portscout.
MFH: 2026Q4
[ThinLTO] Preserve non-prevailing ifunc resolver definitions (#242990)
Currently, when multiple modules provide `weak_odr` definitions of the
same ifunc resolver (which is a common scenario in multi-versioning,
frontend will generate a resolver definition for all modules that use
versioning func), the ThinLink phase will resolve one as prevailing and
demotes the non-prevailing copy to `available_externally`. But this
violates the strict LLVM IR constraint that an ifunc must be bound to a
resolver defined in the same non-prevailing module, and will lead to an
`IFunc resolver must be a definition` verifier error.
The issue can be easily reproduced with the following minimal example:
```c++
// main.cpp
__attribute__((target("default"))) int select_impl();
__attribute__((target("avx2"))) int select_impl();
int main() { return select_impl(); }
// a.cpp
[12 lines not shown]
imx6ccm: wait for busy on dividers with a busy bit too
Wait for the busy bit after setting the rate of a busy divider, as
was already done for busy muxes.
Add a timeout of about 10ms to the busy wait and return ETIMEDOUT.
Tested on QEMU sabrelite.