LLVM/project 0447397 — clang/include/clang/CodeGenUtils BackendDiagnosticHandler.h, clang/lib/CodeGen CGDebugInfo.h CGDebugInfo.cpp

[clang] Locate backend diagnostics under -fdebug-prefix-map  (#242548)

Backend diagnostics are mapped back to a clang SourceLocation by
looking up the file name recorded in the debug info. With
-fdebug-prefix-map that name is the remapped path, which usually does
not exist, so the lookup fails and the diagnostic is reported at the
enclosing function instead. If the function lies outside the
"#pragma clang diagnostic ignored" region covering the real location,
the suppression is lost, and a build that passes without the prefix
map fails with -Werror. The notes of -fdiagnostics-show-inlining-chain
have the same problem.

Record which source file each DIFile was created for when CGDebugInfo
creates it, and resolve debug locations through their DIFile instead
of its file name. DiagnosticLocation and DebugInlineInfo now provide
the DIFile for this. Debug info that clang did not generate, e.g. from
LLVM IR input, still falls back to the file name. Files with line
directives are left out, because their debug locations use presumed
lines. Without checksums, distinct files whose remapped names are

    [4 lines not shown]
DeltaFile
+93-0clang/test/Frontend/optimization-remark-debug-prefix-map.c
+37-2clang/lib/CodeGen/CGDebugInfo.cpp
+18-6clang/lib/CodeGenUtils/BackendDiagnosticHandler.cpp
+21-0clang/lib/CodeGen/CGDebugInfo.h
+21-0clang/include/clang/CodeGenUtils/BackendDiagnosticHandler.h
+2-1llvm/lib/IR/DiagnosticInfo.cpp
+192-92 files not shown
+197-98 files

LLVM/project d97cf02 — llvm/lib/Transforms/IPO FunctionSpecialization.cpp, llvm/test/Transforms/FunctionSpecialization recursive-penalty.ll dead-gv-load.ll

[FuncSpec] Refactor Latency/CodeSize threshold checks (#242832)

The current checks against thresholds for Latency and CodeSize savings
currently contain integer division. For functions that are small, the
truncation towards zero can cause us to admit specializations that have
savings that are actually below the threshold due to the loss of
precision in the calculation.

The existing CodeSize check is:
    `CodeSizeSavings < funcspec_min_codesize_savings * FuncSize / 100)`

If the minimum CodeSize savings is set to 20(%), the RHS of this
comparison will truncate to 0 for any FuncSize less than 5, and so even
a CodeSize saving of 0 will be admitted.

If the minimum CodeSize savings is set to 20(%) and the FuncSize is 8,
the threshold should be 1.6 CodeSize units saved; however the division
will truncate to 1 and so admit a CodeSize saving of below this expected
value.

    [5 lines not shown]
DeltaFile
+390-0llvm/test/Transforms/FunctionSpecialization/small-function-thresholds.ll
+5-3llvm/lib/Transforms/IPO/FunctionSpecialization.cpp
+4-1llvm/test/Transforms/FunctionSpecialization/dead-gv-load.ll
+2-0llvm/test/Transforms/FunctionSpecialization/recursive-penalty.ll
+401-44 files

LLVM/project c82ec31 — llvm/test/Transforms/LoopVectorize tail-folding-constant-trip-counts.ll, llvm/test/Transforms/LoopVectorize/X86/CostModel early-exit-costs.ll

[LV] Add tests for early-exit ExtractLane cost. tail-folded live-out (NFC) (#243618)
DeltaFile
+74-0llvm/test/Transforms/LoopVectorize/X86/CostModel/early-exit-costs.ll
+46-0llvm/test/Transforms/LoopVectorize/tail-folding-constant-trip-counts.ll
+120-02 files

LLVM/project 4f7c9f3 — llvm/include/llvm/Analysis MetadataUtils.h

comment update
DeltaFile
+4-2llvm/include/llvm/Analysis/MetadataUtils.h
+4-21 files

LLVM/project 884307b — offload/test lit.cfg

[Offload] Make lit aware of AMDGPU plugin-level option (#243610)

The lit tester runs in a sanitized environment. That means that if one
wants to run the full lit test suite under a specific env var setting,
the test lit driver needs to be aware of the option.

For single test-level setting, this can be done through the RUN lines as
before.
DeltaFile
+4-0offload/test/lit.cfg
+4-01 files

LLVM/project ffa8850 — llvm/lib/Analysis MetadataUtils.cpp

get erid of general vp
DeltaFile
+1-11llvm/lib/Analysis/MetadataUtils.cpp
+1-111 files

LLVM/project cb35c48 — llvm/lib/CodeGen AtomicExpandPass.cpp, llvm/lib/Target/X86 X86ISelLowering.h X86ISelLowering.cpp

Reapply "X86: Use the DataLayout size in the atomic expansion hooks (#243118)" (#243611)

This reverts commit 970a9c95cf21e946f2de12d7e781e17d2d7b0f5b.

The original version removed the MemType local from
shouldExpandAtomicRMWInIR, which conflicted with the vector atomicrmw
expansion added in #230788. Use the DataLayout size in the vector case
too.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+116-8llvm/test/CodeGen/X86/atomic-load-store.ll
+76-2llvm/test/Transforms/AtomicExpand/X86/expand-atomic-non-integer.ll
+18-21llvm/lib/Target/X86/X86ISelLowering.cpp
+2-2llvm/lib/CodeGen/AtomicExpandPass.cpp
+1-1llvm/lib/Target/X86/X86ISelLowering.h
+213-345 files

LLVM/project fa8eb42 — llvm/lib/Support KnownFPClass.cpp, llvm/test/Transforms/Attributor nofpclass-bitcast-int-to-fp-x87.ll

[KnownFPClass] Be conservative with x87 non-canonical NaN for KnownFPClass::bitcast (#242483)

Currently, APFloat's classification of non-canonical NaN may be
inconsistent with real x87 FPU behavior. To be conservative, we will
only rule out qNaN/sNaN for x87 canonical NaN. Non-canonical NaN will be
treated as `fcNan`, and will not be refined to `fcQNan` or `fcSNan` for
`KnownFPClass::bitcast`.

`x86_fp80` is not as commonly used, so it is better to make a
conservative fix instead of having a silent miscompilation.

In response to
https://github.com/llvm/llvm-project/pull/224072#issuecomment-6723974270
DeltaFile
+22-22llvm/test/Transforms/Attributor/nofpclass-bitcast-int-to-fp-x87.ll
+20-17llvm/unittests/Support/KnownFPClassTest.cpp
+15-7llvm/lib/Support/KnownFPClass.cpp
+57-463 files

LLVM/project 9dcb095 — llvm/include/llvm/Analysis MetadataUtils.h, llvm/lib/Analysis MetadataUtils.cpp

require fixed length mem intrinsics
DeltaFile
+12-16llvm/lib/Analysis/MetadataUtils.cpp
+11-12llvm/include/llvm/Analysis/MetadataUtils.h
+0-12llvm/unittests/Analysis/MetadataUtilsTest.cpp
+23-403 files

LLVM/project 20fb6a7 — libcxx/include/__pstl/backends/statpart for_each.h basis.h, libcxx/test/benchmarks/algorithms/nonmodifying pstl.for_each.bench.cpp

[libc++][pstl] Allow parallel std::for_each to work with forward iterators (#241872)

This PR expands the `statpart`'s partitioning code to support forward
iterators and removes some of the unused functionality (prefix/suffix
trimming).
For now, only one public algorithm will be allowed to use them:
`std::for_each`.
Partitioning a `[begin, end)` range of non-random-access iterators
requires serially walking the range twice.
In cases where the applied function is computationally cheap, these
passes can dwarf any potential gains from applying the function in
parallel. It's up to the client code to decide whether running in
parallel is worth it.
DeltaFile
+60-31libcxx/include/__pstl/backends/statpart/basis.h
+8-65libcxx/test/libcxx/algorithms/pstl.statpart.partition.pass.cpp
+20-10libcxx/test/benchmarks/algorithms/nonmodifying/pstl.for_each.bench.cpp
+1-2libcxx/include/__pstl/backends/statpart/for_each.h
+89-1084 files

LLVM/project 90b68bd — lldb/test/API/commands/frame/var Makefile TestFrameVar.py, lldb/test/API/commands/register/aarch64_sve_registers/rw_access_dynamic_resize Makefile TestSVEThreadedDynamic.py

[lldb][test] Don't let the build dictionary clobber the Makefile's CF… (#243273)

…LAGS_EXTRAS

Variables in a test's build dictionary are passed to make on the command
line, which overrides any assignment to the same variable in the test's
Makefile. Several tests passed CFLAGS_EXTRAS this way while their
Makefile also sets CFLAGS_EXTRAS, so the Makefile's flags were silently
dropped.

This patch removes this footgun by using two different variable names
and explicitly combining them in the Makefile.

Assisted-by: Claude
DeltaFile
+3-3lldb/test/API/commands/frame/var/TestFrameVar.py
+1-3lldb/test/API/lang/cpp/unique-types3/TestUniqueTypes3.py
+2-2lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
+2-2lldb/test/API/commands/register/aarch64_sve_registers/rw_access_dynamic_resize/TestSVEThreadedDynamic.py
+1-1lldb/test/API/commands/register/aarch64_sve_registers/rw_access_dynamic_resize/Makefile
+1-1lldb/test/API/commands/frame/var/Makefile
+10-129 files not shown
+19-2115 files

LLVM/project d5599e3 — lldb/include/lldb/Target LanguageRuntime.h, lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime AppleObjCRuntimeV2.cpp

[lldb] Let language runtimes resolve objects of other languages (#243221)

Currently AppleObjCRuntimeV2::GetPreferredLanguageRuntime() only prefers
the runtime of the language that implements an Objective-C object's
class. A language runtime that presents Objective-C objects in its own
terms when its own language uses them, such as Swift for Objective-C
objects in Swift frames, has no way to resolve their dynamic types.

This patch fixes this by adding
LanguageRuntime::IsPreferredLanguageRuntimeFor(), which
GetPreferredLanguageRuntime() asks before it falls back to the runtime
of the implementing language.

Assisted-by: Claude
DeltaFile
+8-0lldb/include/lldb/Target/LanguageRuntime.h
+5-0lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
+13-02 files

LLVM/project 5053ad3 — llvm/test/tools/llvm-profgen/X86 cs-preinline-icp.test, llvm/test/tools/llvm-profgen/X86/Inputs cs-preinline-icp-map-head.prof cs-preinline-icp.prof

[llvm-profgen] Respect the sample loader's indirect-call promotion limits

The CS pre-inliner can plan to inline a target that the sample loader
will not promote. Keep rejected contexts in the callee's base profile
instead of spending the caller's inline budget on them.

Read the loader's hotness, initial exemption, and maximum-promotion
options. Account for call-target counts being replaced by nested head
estimates as targets are accepted. Leave the compiler thresholds intact.

Apply the gate only to sites with an indirect-call pseudo probe. Collect
that evidence during the existing decoder pass, including functions and
inlinees skipped by the sample GUID filter. Add a decoder callback test
and profile tests for the promotion limits and call-probe checks.

This follows the compiler-side recovery change, which also handles hot
contexts already nested in existing generated profiles.

Assisted-by: GPT-6 Astra
DeltaFile
+137-2llvm/tools/llvm-profgen/CSPreInliner.cpp
+100-0llvm/test/tools/llvm-profgen/X86/cs-preinline-icp.test
+53-0llvm/test/tools/llvm-profgen/X86/Inputs/cs-preinline-icp-probe-type.prof
+48-0llvm/test/tools/llvm-profgen/X86/Inputs/cs-preinline-icp-map-head.prof
+48-0llvm/test/tools/llvm-profgen/X86/Inputs/cs-preinline-icp.prof
+33-0llvm/unittests/MC/MCPseudoProbeTest.cpp
+419-27 files not shown
+500-1113 files

LLVM/project b279c86 — llvm/lib/Transforms/IPO SampleProfile.cpp, llvm/test/Transforms/SampleProfile icp-rejected-context-merge.ll

[SampleProfile] Recover hot contexts rejected by indirect-call promotion

An indirect target can have an inline context in the profile but fail the
sample loader's relative-hotness check. Its samples then stay under the
caller instead of reaching the out-of-line function.

Keep hot rejected contexts for the existing merge path. Allow multiple
targets at one indirect call, and resolve each target by its profile name
when the call has no direct callee. Leave cold targets alone and avoid
merging a recursive context into its owner. Promotion thresholds are
unchanged.

The regression test checks two hot rejected targets, a cold target, and
two calls sharing one probe location on AArch64 and X86.

Assisted-by: GPT-6 Astra
DeltaFile
+85-0llvm/test/Transforms/SampleProfile/icp-rejected-context-merge.ll
+26-11llvm/lib/Transforms/IPO/SampleProfile.cpp
+31-0llvm/test/Transforms/SampleProfile/Inputs/icp-rejected-context-merge.prof
+142-113 files

LLVM/project 0f2888a — clang/include/clang/AST OpenMPClause.h, clang/lib/CodeGen CGOpenMPRuntime.cpp CGStmtOpenMP.cpp

[Clang][OpenMP] Add the OpenMP 6.0 memscope clause

This patch adds support for the 'memscope' clause from OpenMP 6.0 on
the 'flush' and 'atomic' directives. The clause selects the threads a
flush or atomic synchronizes with: those on the device (the default),
those in the contention group, or those on all devices.  On 'flush',
a list may be specified alongside a memscope, but not together with a
memory-order clause (OpenMP 6.0, "17.8.6 flush Construct").

For the host, the scope is passed to the __kmpc_flush_explicit libomp
entry point as a __MEMORY_SCOPE_* value.  For a GPU, the scope maps to a
target-specific syncscope for the fence.

Assisted-By: Claude
DeltaFile
+101-0clang/test/OpenMP/flush_memscope_codegen.cpp
+58-31clang/lib/CodeGen/CGStmtOpenMP.cpp
+82-0clang/include/clang/AST/OpenMPClause.h
+25-22clang/lib/CodeGen/CGOpenMPRuntime.cpp
+44-0clang/test/OpenMP/memscope_ast_print.cpp
+31-0llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
+341-5320 files not shown
+515-6926 files

LLVM/project 4dd44c5 — clang/lib/AST OpenMPLockSequence.cpp, clang/lib/Sema SemaOpenMP.cpp

[Clang][OpenMP] Serialize lockstep warp lanes across omp_set_lock regions

Where the threads of a wavefront/warp run in lockstep (as for many typical
GPUs), multiple lanes reaching an omp_set_lock call may deadlock (or trap,
on AMDGPU) if they contend for a lock.  This is actually permitted by
the spec (OpenMP 6.0, 1.2 Execution Model: "A program that relies on
concurrent execution of such diverging code paths for the purposes of
synchronization may deadlock.").

However, in some common cases we can do better.  This patch allows
set/unset pairs to work as long as their lock expressions are the
same, they are in the same compound statement, and no intervening code
has control-flow that enters or leaves the sequence or various other
constructs.  I.e.:

  omp_set_lock(L); ... omp_unset_lock(L);

is emitted through the lane serialization that OpenMPIRBuilder provides
for critical regions, so that each lane takes and releases the lock

    [13 lines not shown]
DeltaFile
+337-0clang/test/OpenMP/amdgcn_lock_lane_serialization.c
+233-0clang/test/OpenMP/target_lock_lane_warning.cpp
+177-0clang/lib/AST/OpenMPLockSequence.cpp
+165-0clang/lib/Sema/SemaOpenMP.cpp
+158-0clang/test/OpenMP/amdgcn_lock_lane_serialization.cpp
+115-0offload/test/offloading/target_lock_lanes.c
+1,185-012 files not shown
+1,384-318 files

LLVM/project 80e0bc9 — clang/docs ReleaseNotes.md, offload/test/api omp_lock_wave_contention.c omp_lock.c

[OpenMP][AMDGPU] Implement the device lock routines

This patch adds implementations of omp_init_lock, omp_set_lock,
omp_unset_lock and omp_destroy_lock for AMDGPU.

A spin lock has a problem on targets that group execution threads into
wavefronts or warps: the lanes of a wavefront share one instruction
stream.  When several active lanes spin for the same lock, the one that
takes it is predicated off until all the others have left the loop, so
it never reaches the omp_unset_lock that would let those others proceed.
OpenMP 6.0 permits this (threads in one progress unit that synchronize
while divergent may deadlock), but a hung kernel is hard to diagnose, so
omp_set_lock checks whether another active lane of its wavefront wants
the same lock, says so, and traps.  The check cannot see lanes of one
wavefront that reach omp_set_lock for the same lock on divergent paths,
one after the other; those still hang.

The message goes to stderr through the GPU libc when it is available,
by way of a new ompx::reportError: this allows errors to be emitted more

    [5 lines not shown]
DeltaFile
+69-0offload/test/api/omp_lock.c
+35-6openmp/device/src/Synchronization.cpp
+40-0offload/test/api/omp_lock_wave_contention.c
+18-0openmp/device/src/LibC.cpp
+7-0clang/docs/ReleaseNotes.md
+4-0openmp/device/include/LibC.h
+173-61 files not shown
+173-97 files

LLVM/project 4c91e45 — offload/test/api omp_test_lock.c, openmp/device/src Synchronization.cpp

[OpenMP] Make device omp_test_lock try to set the lock

This patch fixes the semantics of omp_test_lock for NVPTX and SPIR-V, and
uses the same implementation for AMDGPU too.  The function is intended
to take the lock without blocking, and return whether it succeeded,
whereas the previous implementations just tested whether the lock was
already taken or not.

Other AMDGPU lock routines are added by subsequent patches, so the
newly-added test is XFAILed for that target until those land.

Assisted-By: Claude
DeltaFile
+62-0offload/test/api/omp_test_lock.c
+7-8openmp/device/src/Synchronization.cpp
+69-82 files

LLVM/project b907855 — clang/lib/CodeGen CGOpenMPRuntimeGPU.cpp, clang/test/OpenMP nvptx_parallel_codegen.cpp

[OpenMP] Move critical region serialization to OpenMPIRBuilder

At present, in Clang only, OpenMP critical regions are handled for GPU
targets by executing each lane of a wavefront in sequence.  This patch
moves the handling to OpenMPIRBuilder so that it works for Flang also,
via OpenMPIRBuilder::createCritical (fixing a Flang bug in the process).
The loop now iterates over active lanes rather than all threads in
the team.

A helper function, createLaneSerializedRegion, is introduced that is
reused by subsequent patches in this stack.

This transformation is important for GPUs which execute threads in a
group (warp or wavefront) in lockstep: an explicit mutex deadlocks in
this situation when two threads try to claim the mutex at the same time.
This patch also introduces a property in the per-target OpenMP grid
values, named omp::GV::GV_Lockstep_Lanes.  Code generation can then
query this to generate different code, such as this critical region
transformation.  For now, this is set for all GPU targets: this can be

    [5 lines not shown]
DeltaFile
+60-56clang/test/OpenMP/nvptx_parallel_codegen.cpp
+29-63clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp
+88-0llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+70-0llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
+46-0mlir/test/Target/LLVMIR/openmp-critical-gpu.mlir
+33-0llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
+326-1197 files not shown
+419-12613 files

LLVM/project 6ab4c20 — llvm/lib/Target/AArch64 AArch64TargetTransformInfo.cpp

apply review
DeltaFile
+4-1llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+4-11 files

LLVM/project 4f4f7a1 — llvm/test/CodeGen/AMDGPU combine-carry-into-uadde-usube.ll, llvm/test/CodeGen/ARM/GlobalISel arm-legalize-fp.mir

Merge remote-tracking branch 'origin/main' into users/mrsidims/aarch64-narrow-two-source-shuffle-cost
DeltaFile
+1,210-19,870utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+5,483-1,952llvm/test/CodeGen/ARM/GlobalISel/arm-legalize-fp.mir
+6,864-0utils/bazel/llvm-project-overlay/libc/src/__support/math/BUILD.bazel
+2,239-2,237llvm/test/tools/llvm-mca/AArch64/Cortex/A53-neon-instructions.s
+4,205-24llvm/test/CodeGen/AMDGPU/combine-carry-into-uadde-usube.ll
+3,686-0utils/bazel/llvm-project-overlay/libc/src/math/BUILD.bazel
+23,687-24,08311,211 files not shown
+418,541-206,36011,217 files

LLVM/project a6cd549 — clang/lib/CIR/CodeGen CMakeLists.txt CIRGenBuiltin.cpp, clang/test/CIR/CodeGenBuiltins/SPIRV builtin-spirv-ids-and-ranges.cpp

[CIR][SPIR-V] Emit SPIR-V work-item builtins (#242069)

Add support for emitting SPIR-V work-item builtins in CIRGen.
DeltaFile
+126-0clang/test/CIR/CodeGenBuiltins/SPIRV/builtin-spirv-ids-and-ranges.cpp
+75-0clang/lib/CIR/CodeGen/CIRGenBuiltinSPIRV.cpp
+3-1clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp
+4-0clang/lib/CIR/CodeGen/CIRGenFunction.h
+1-0clang/lib/CIR/CodeGen/CMakeLists.txt
+209-15 files

LLVM/project 1035e21 — clang/include/clang/DependencyScanning DependencyScanningService.h InProcessModuleCache.h, clang/lib/DependencyScanning InProcessModuleCache.cpp

[clang][deps] Flush the in-process module cache on a background thread (#242385)

The in-process module cache keeps every PCM built during the lifetime of
the
dependency scanning service in memory, and flushes them to disk at the
end.
Long-running builds that scan many variants of modules (e.g. with
different
search paths or macro definitions) accumulate tens of gigabytes worth of
scanning PCMs this way. Moreover, the final flush is single-threaded and
happens after all scanning work is done.

This PR makes the service start a background thread that flushes each
PCM to
disk as soon as it's written, and then replaces its in-memory buffer
with the
memory-mapped file. Readers of the in-memory buffer keep it alive on
their own
(shared ownership), and importers of the freshly built PCM never wait

    [73 lines not shown]
DeltaFile
+92-21clang/lib/DependencyScanning/InProcessModuleCache.cpp
+73-0clang/unittests/DependencyScanning/InProcessModuleCacheTest.cpp
+50-0clang/test/ClangScanDeps/module-cache-flush-in-background.c
+38-2clang/include/clang/DependencyScanning/InProcessModuleCache.h
+9-4clang/include/clang/DependencyScanning/DependencyScanningService.h
+2-1clang/test/ClangScanDeps/logging-simple.c
+264-282 files not shown
+267-308 files

LLVM/project a588408 — clang/lib/CIR/CodeGen CIRGenCall.cpp, clang/lib/CIR/Dialect/Transforms/TargetLowering CIRABIRewriteContext.cpp

[CIR] Freeze maybe_undef call arguments (#234124)
DeltaFile
+154-0clang/test/CIR/Transforms/abi-lowering/maybe-undef-freeze.cir
+146-0clang/test/CIR/CodeGen/attr-maybeundef.cpp
+38-2clang/lib/CIR/Dialect/Transforms/TargetLowering/CIRABIRewriteContext.cpp
+2-23clang/lib/CodeGen/CGCall.cpp
+21-0clang/lib/CodeGenUtils/CallUtils.cpp
+5-0clang/lib/CIR/CodeGen/CIRGenCall.cpp
+366-251 files not shown
+369-257 files

LLVM/project 4d27b01 — llvm/include/llvm/Support KnownFPClass.h, llvm/lib/Analysis ValueTracking.cpp

[KnownFPClass] Bail out for x86_fp80 and ppc_fp128 for KnownFPClass::canonicalize (#243313)

`KnownFPClass::canonicalize` now bails for non-ieee types like
`x86_fp80` and `ppc_fp128`, resolving the `FIXME` for
`KnownFPClass::canonicalize`.

Follow-up to https://github.com/llvm/llvm-project/pull/237096
DeltaFile
+12-9llvm/lib/Support/KnownFPClass.cpp
+5-5llvm/lib/Analysis/ValueTracking.cpp
+4-4llvm/test/Transforms/Attributor/nofpclass-canonicalize.ll
+3-2llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+2-2llvm/lib/CodeGen/GlobalISel/GISelValueTracking.cpp
+1-0llvm/include/llvm/Support/KnownFPClass.h
+27-226 files

LLVM/project a92e888 — llvm/include/llvm/Bitstream BitstreamReader.h, llvm/lib/Bitstream/Reader BitstreamReader.cpp

Bitstream: Read fields with unaligned word loads

Instead of buffering a word in CurWord and refilling it when a field
crosses a word boundary, track only the current bit number and read
each field from a word loaded at its first byte. Fall back to reading
a byte at a time near the end of the stream.

Parsing CTMark bitcode with opt -passes=verify executes 0.14-0.43%
fewer instructions. On kimwitu++ k.bc and sqlite3, cycles drop 2.3%
and 2.4%, and branch misses drop 12% and 10%.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+49-84llvm/include/llvm/Bitstream/BitstreamReader.h
+15-23llvm/lib/Bitstream/Reader/BitstreamReader.cpp
+64-1072 files

LLVM/project 90e0874 — llvm/lib/Transforms/Instrumentation InstrumentationOptions.td PGOInstrumentation.cpp, llvm/test/CodeGen/AArch64 machine-outliner-pgo.ll

[PGO] Mark unprofiled functions cold by default in IRPGO

Unlike SamplePGO, IR instrumentation inserts counters into every
instrumentable function, so a function missing from the profile was
generally never executed. Today PGOInstrumentationUse leaves its entry
count unset, which causes newly-added or signature-changed cold
functions to compile at -O2 instead of cold.

This change marks unprofiled instrumentable functions as cold
(entry_count = 0 and Attribute::Cold) by default on non-empty profiles,
skipping functions excluded from instrumentation (such as noprofile or
skipprofile), functions with Attribute::Hot, and functions that already
have an entry count.
DeltaFile
+34-2llvm/test/Transforms/PGOProfile/diag_no_funcprofdata.ll
+13-4llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
+14-1llvm/test/Transforms/PGOProfile/diag_no_funcprofdata_cs.ll
+3-1llvm/test/CodeGen/AArch64/machine-outliner-pgo.ll
+2-0llvm/lib/Transforms/Instrumentation/InstrumentationOptions.td
+66-85 files

LLVM/project c9ffb30 — llvm/include/llvm/ProfileData InstrProfReader.h, llvm/lib/ProfileData InstrProfReader.cpp

[PGO] Mark zero-count hash-mismatched functions cold

When a function has a PGO hash mismatch, PGOInstrumentationUse currently
skips it and leaves its entry count unset, even when all of its recorded
profile counters are zero. Because downstream passes treat an unset entry
count as normal -O2 code rather than cold, small edits to cold functions
can cause unexpected inlining and code-size growth.

This change adds a MismatchedAllZeros flag to
IndexedInstrProfReader::getInstrProfRecord (ignoring PseudoHot/PseudoWarm
records) and sets entry_count = 0 and Attribute::Cold for zero-count
hash mismatches, while preserving hash-mismatch metadata and explicit
hot attributes.
DeltaFile
+35-13llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
+45-0llvm/unittests/ProfileData/InstrProfTest.cpp
+33-3llvm/test/Transforms/PGOProfile/hash_mismatch_metadata.ll
+17-0llvm/test/Transforms/PGOProfile/Inputs/hash_mismatch_metadata.proftext
+13-3llvm/lib/ProfileData/InstrProfReader.cpp
+7-4llvm/include/llvm/ProfileData/InstrProfReader.h
+150-231 files not shown
+152-237 files

LLVM/project 2517f56 — llvm/include/llvm/IR RuntimeLibcalls.td, llvm/test/CodeGen/X86 fp80-math-no-libcall-error.ll fp128-libcalls-longdouble.ll

RuntimeLibcalls: Allow fp128 sincosl on x86_64-linux-android (#242486)

On x86_64-linux-android, long double is fp128 rather than x87 fp80 as
on GNU targets, so sincosl provides SINCOS_F128 rather than SINCOS_F80.
Remove the x86 LibraryExclusion and x87-only guard for sincosl to fix
`error: no libcall available for fsincos`.

Link:
https://android.googlesource.com/platform/bionic/+/refs/heads/main/libm/upstream-freebsd/lib/msun/src/s_sincosl.c#47
Assisted-by: Gemini
DeltaFile
+22-0llvm/test/CodeGen/X86/fp128-libcalls-longdouble.ll
+1-6llvm/include/llvm/IR/RuntimeLibcalls.td
+7-0llvm/test/CodeGen/X86/fp80-math-no-libcall-error.ll
+30-63 files

LLVM/project 078483f — flang/lib/Optimizer/OpenACC/Support FIROpenACCUtils.cpp, flang/test/Transforms/OpenACC acc-implicit-data-common-block.fir

[flang][openacc] Look through converts when detecting common block storage uses (#243580)

A common block is not implicitly mapped as a whole when it is used in a
compute region only as the `storage` operand of the `fir.declare` of its
members. That check only matched a bare `fir.address_of` of the global.

Look through `fir.convert` before matching `fir.address_of`.
DeltaFile
+36-0flang/test/Transforms/OpenACC/acc-implicit-data-common-block.fir
+4-1flang/lib/Optimizer/OpenACC/Support/FIROpenACCUtils.cpp
+40-12 files