LLVM/project ae76985llvm/docs/_static custom.css

[Docs] don't stylize syntax errors in code blocks (#212698)

When a code block in the documentation contains (almost) pseudocode, the
Pygments parser flags errors and renders them with red-bordered boxes.
This is unnecessarily ugly. We can see examples of this in the LangRef
with LLVM code blocks.

Instead set the style to just render them as plain text. This is still
recognizable as incorrect syntax, but does not distract the reader from
the actual example.

Assisted-by: Claude Opus 4.8
DeltaFile
+8-0llvm/docs/_static/custom.css
+8-01 files

LLVM/project f123a17libc/src/__support/math CMakeLists.txt ceilf128.h

test
DeltaFile
+10-1libc/src/__support/math/ceilf128.h
+1-0libc/src/__support/math/CMakeLists.txt
+11-12 files

LLVM/project 84a0c00llvm/lib/Transforms/Scalar GVN.cpp, llvm/test/Transforms/GVN load-of-pointer-select-available.ll

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+44-0llvm/test/Transforms/GVN/load-of-pointer-select-available.ll
+9-2llvm/lib/Transforms/Scalar/GVN.cpp
+53-22 files

LLVM/project 22898d9llvm/lib/Target/AMDGPU SIInstrInfo.cpp VOP3PInstructions.td, llvm/lib/Target/AMDGPU/Utils AMDGPUBaseInfo.cpp

[AMDGPU] Duplicate packed fp32 instructions

These have different semantics on gfx9 and gfx12 with respect to
scalar operands.
DeltaFile
+24-10llvm/lib/Target/AMDGPU/SIInstructions.td
+15-8llvm/lib/Target/AMDGPU/VOP3PInstructions.td
+9-9llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
+6-6llvm/test/CodeGen/AMDGPU/bug-pk-f32-imm-fold.mir
+5-5llvm/test/CodeGen/AMDGPU/coexec-sched-effective-stall.mir
+4-4llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+63-424 files not shown
+70-4610 files

LLVM/project 705d0ecllvm/include/llvm/MC MCGOFFStreamer.h, llvm/lib/MC MCGOFFStreamer.cpp

[SystemZ][z/OS] Implement emitCommonSymbol in MCGOFFStreamer (#210179)

Common globals were not emitted in GOFF object files due to a missing
emitCommonSymbol implementation. This adds the implementation to emit
the required SD/ED/PR ESD records in the GOFF object file.
DeltaFile
+29-0llvm/lib/MC/MCGOFFStreamer.cpp
+28-0llvm/test/CodeGen/SystemZ/zos-common-global.ll
+1-1llvm/include/llvm/MC/MCGOFFStreamer.h
+58-13 files

LLVM/project 6554a97clang/test/Driver aarch64-ptrauth.c

[PAC][clang][test] Fix incorrect usage of `-NOT` suffix for FileCheck (#212445)

Previously, `-NOT` checks were not doing what was intended: checking
that given strings are not present within the same line where other
patterns are confirmed present by other checks. `-NOT` semantics is
checking pattern absense in between other checks, not total absense.

This patch makes use of `--implicit-check-not` instead for this purpose.
DeltaFile
+15-14clang/test/Driver/aarch64-ptrauth.c
+15-141 files

LLVM/project 86fb40dllvm/include/llvm/ProfileData SampleProfReader.h, llvm/lib/Transforms/IPO SampleProfileMatcher.cpp SampleProfile.cpp

[ProfileData] Implement contains in SampleProfileNameTable (NFC) (#211995)

This patch implements contains(StringRef) and contains(uint64_t) in
SampleProfileNameTable and SampleProfileReader to serve symbol
membership queries directly from the reader -- "is this symbol in the
name table?".

Without this patch, users of the sample profile reader, namely
SampleProfileLoader::doInitialization and SampleProfileNameSet, each
construct their own StringSet<> containing all name table entries.
That is, we end up with two instances of StringSet<> with identical
contents.  Since these instances hold their own copies of symbol
strings on the heap, both the constructor and destructor take up a
large portion of compilation time.

This patch teaches SampleProfileReader::contains to directly serve
symbol membership queries.

- For EytzingerSampleProfileNameTable, contains performs binary search

    [11 lines not shown]
DeltaFile
+65-18llvm/include/llvm/ProfileData/SampleProfReader.h
+5-25llvm/lib/Transforms/IPO/SampleProfile.cpp
+11-0llvm/unittests/ProfileData/SampleProfTest.cpp
+1-2llvm/lib/Transforms/IPO/SampleProfileMatcher.cpp
+82-454 files

LLVM/project fee444ellvm/include/llvm/IR RuntimeLibcalls.td, llvm/lib/CodeGen/SelectionDAG TargetLowering.cpp

RuntimeLibcalls: Add generic FCMP3_F* three-way compare for single-symbol ABIs

MSP430's __mspabi_cmpd/__mspabi_cmpf are one three-way compare symbol serving
every predicate, previously modeled as six suffixed impls each. Replace them
with a single generic operator FCMP3_*, and give softenSetCCOperands a 3rd
lowering option. After the boolean O*_F* and the per-predicate FCMP3_<pred>_F*
helpers, use the generic FCMP3_F* helper tested with the predicate's condition
code.

Also opt __nedf2 out of the MSP430 default set: it was the only libgcc F64
compare not already opted out, so it would otherwise provide FCMP3_UNE_F64 and
win over __mspabi_cmpd for not-equal.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+45-40llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+11-26llvm/include/llvm/IR/RuntimeLibcalls.td
+56-662 files

LLVM/project d77892cllvm/include/llvm/IR RuntimeLibcalls.td, llvm/lib/CodeGen TargetLoweringBase.cpp

RuntimeLibcalls: Split soft-float three-way compares into distinct libcall kinds

Soft-float compares come in two flavors. ARM AEABI (__aeabi_dcmpeq) and VFP
(__eqdf2vfp) return a simple 0/1 boolean and use the existing O*_F* / UO_F*
libcalls. The libgcc/compiler-rt helpers (__eqdf2, __ltdf2, ...) return a
three-way -1/0/1, which the legalizer needs to insert the appropriate compare
against.

The three-way helpers previously masqueraded as O*_F* implementations, with the
condition code recovered from a hardcoded switch. Model them instead as distinct
operations. The legalizer then reasons about how to make use of the call result
based on which flavor of operation is available, rather than special casing what
the specific implementation is.

This leaves the mspabi cases for a later cleanup, because it's 3-way usage is
slightly different from the ARM case.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+74-54llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+68-56llvm/include/llvm/IR/RuntimeLibcalls.td
+52-28llvm/lib/Target/ARM/ARMLegalizerInfo.cpp
+0-69llvm/lib/CodeGen/TargetLoweringBase.cpp
+18-0llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp
+8-6llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
+220-2131 files not shown
+220-2187 files

LLVM/project 834d585llvm/test/tools/llubi ptrtoint_cast.ll, llvm/tools/llubi/lib Interpreter.cpp Context.cpp

[llubi] Fix ptrtoint's return type (#212839)

Closes https://github.com/llvm/llvm-project/issues/212788.
DeltaFile
+24-0llvm/test/tools/llubi/ptrtoint_cast.ll
+3-3llvm/tools/llubi/lib/Context.cpp
+3-2llvm/tools/llubi/lib/Interpreter.cpp
+30-53 files

LLVM/project 9064e23.github CODEOWNERS

Add some bazel libc review coverage (#209789)

This should improve timezone coverage for keeping the bazel build
working due to libc breakages, e.g. #209433 broke things and the bazel
fixer bot sent out #209689. But since it wasn't landed until just
recently, manual fixes were needed for other changes like #209449. This
wouldn't be as bad if the bazel fixer bot could handle layered
breakages.
DeltaFile
+1-0.github/CODEOWNERS
+1-01 files

LLVM/project 5912665llvm/include/llvm/TargetParser AMDGPUTargetParser.h, llvm/lib/TargetParser AMDGPUTargetParser.cpp Triple.cpp

AMDGPU: TableGen the subarch triple name table

Co-authored-by: Claude (Claude-Opus-4.8)
DeltaFile
+87-20llvm/utils/TableGen/Basic/AMDGPUTargetDefEmitter.cpp
+2-45llvm/lib/TargetParser/Triple.cpp
+23-0llvm/lib/TargetParser/AMDGPUTargetParser.cpp
+17-0llvm/test/TableGen/AMDGPUTargetDefErrors.td
+4-0llvm/include/llvm/TargetParser/AMDGPUTargetParser.h
+133-655 files

LLVM/project b534350llvm/include/llvm/TargetParser AMDGPUTargetParser.h, llvm/lib/TargetParser AMDGPUTargetParser.cpp

AMDGPU: Eliminate old macro driven processor name parsing

Previously the generated inc file had a series of macros for use
with StringSwitch; now just directly scan the generated name table.

Co-authored-by: Claude (Claude-Opus-4.8)
DeltaFile
+162-114llvm/utils/TableGen/Basic/AMDGPUTargetDefEmitter.cpp
+72-43llvm/lib/TargetParser/AMDGPUTargetParser.cpp
+2-2llvm/include/llvm/TargetParser/AMDGPUTargetParser.h
+236-1593 files

LLVM/project 389bcb2llvm/utils/TableGen/Basic AMDGPUTargetDefEmitter.cpp

order
DeltaFile
+32-19llvm/utils/TableGen/Basic/AMDGPUTargetDefEmitter.cpp
+32-191 files

LLVM/project 6fe7eballvm/lib/TargetParser AMDGPUTargetParser.cpp

no auto
DeltaFile
+4-4llvm/lib/TargetParser/AMDGPUTargetParser.cpp
+4-41 files

LLVM/project ab50e66llvm/lib/TargetParser AMDGPUTargetParser.cpp, llvm/utils/TableGen/Basic AMDGPUTargetDefEmitter.cpp

AMDGPU: TableGen the subarch to processor name mapping table

Replace the hand-written AMDGPUSubArchNames array (SubArch -> canonical GPU
name) with a generated table.

Co-authored-by: Claude (Claude-Opus-4.8)
DeltaFile
+23-43llvm/lib/TargetParser/AMDGPUTargetParser.cpp
+61-5llvm/utils/TableGen/Basic/AMDGPUTargetDefEmitter.cpp
+84-482 files

LLVM/project a6d1164llvm/lib/Target/AMDGPU GCNProcessors.td AMDGPUTargetParser.td, llvm/lib/TargetParser AMDGPUTargetParser.cpp

AMDGPU: TableGen subarch to major subarch table

Replace the hand-written AMDGPUMajorFamilies array with a
generated lookup table. Adds a special case for the major
arches missing a concrete generic target definition (we probably
should just define those to avoid this).

Co-authored-by: Claude (Claude-Opus-4.8)
DeltaFile
+86-20llvm/utils/TableGen/Basic/AMDGPUTargetDefEmitter.cpp
+19-55llvm/lib/TargetParser/AMDGPUTargetParser.cpp
+8-0llvm/lib/Target/AMDGPU/AMDGPUTargetParser.td
+6-0llvm/lib/Target/AMDGPU/GCNProcessors.td
+119-754 files

LLVM/project 14a19dcllvm/lib/TargetParser AMDGPUTargetParser.cpp, llvm/unittests/TargetParser TargetParserTest.cpp

Reject dummy target
DeltaFile
+21-0llvm/unittests/TargetParser/TargetParserTest.cpp
+7-1llvm/lib/TargetParser/AMDGPUTargetParser.cpp
+28-12 files

LLVM/project c3d7a26clang/lib/Basic/Targets AMDGPU.h, clang/test/Driver amdgpu-mcpu.cl

Validate -mcpu generic is rejected
DeltaFile
+14-0clang/test/Misc/target-invalid-cpu-note/amdgcn.c
+7-4clang/lib/Basic/Targets/AMDGPU.h
+10-0llvm/include/llvm/TargetParser/AMDGPUTargetParser.h
+9-0llvm/lib/TargetParser/AMDGPUTargetParser.cpp
+9-0clang/test/Driver/amdgpu-mcpu.cl
+49-45 files

LLVM/project 5c57064bolt/include/bolt/Core DebugData.h, bolt/lib/Core DebugData.cpp DIEBuilder.cpp

[BOLT] Stop materializing .dwo DIE vectors early in the pipeline (#207292)

Summary: preprocessDWODebugInfo() eagerly force-extracted every .dwo
compile unit's DIE tree (getNonSkeletonUnitDIE(false)) very early in
BOLT pipeline, way before DWARFRewriter kicked in. Those vectors then
sit in memory throughout the entire rewrite pipeline, directly
contributing to BOLT's RSS peak. I did a fair amount of digging and
didn't find any reason as to why we need to keep all DIEs of DWO CU
materialized at all, since DWARFRewriter won't even read this vector
(the #197359 concurrency fix did use that, but that is unnecessary). The
problem is that these DIE trees are a massive contribution to RSS when
processing large binaries where we have 10s of K of dwos, storing
complete trees for each processed dwo.

This diff changes the #197359 concurrency fix to not rely on the DIE
sibling/children structure. It parses DWP type units selectively per
compile unit (DIEBuilder::buildDWPTypeUnitsForUnit ->
collectReferencedTypeSignatures) by finding the DW_FORM_ref_sig8
references in a unit's DIEs to decide which type units belong in that

    [24 lines not shown]
DeltaFile
+21-33bolt/lib/Rewrite/DWARFRewriter.cpp
+12-33bolt/lib/Core/BinaryContext.cpp
+10-18bolt/lib/Core/DIEBuilder.cpp
+19-0bolt/lib/Core/DebugData.cpp
+15-0bolt/include/bolt/Core/DebugData.h
+77-845 files

LLVM/project 606bbb1llvm/include/llvm/IR RuntimeLibcalls.td, llvm/lib/Target/Hexagon HexagonSubtarget.h HexagonSubtarget.cpp

Hexagon: Stop excluding some generic compiler-rt functions from libcalls

RuntimeLibcalls should indicate any function that exists and is callable.
Historically the list of library functions was conflated with the library
functions which should be used, so the library definition was complicated
by excluding the overridden cases. My reading of the compiler-rt sources is
that the generically named functions are built alongside the __hexagon
prefixed variants. e.g., __divsi3 and __hexagon_divsi3 both exist.

It will simplify future libcall work the fewer special case target exclusions
there are, so allow the functions to be defined and apply the selection
preference for the __hexagon prefixed versions in LibcallLoweringInfo.

I do question why compiler-rt is built this way; why doesn't the hexagon
just replace the standard entrypoint names with the target implementations?

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+29-0llvm/lib/Target/Hexagon/HexagonSubtarget.cpp
+5-4llvm/include/llvm/IR/RuntimeLibcalls.td
+3-0llvm/lib/Target/Hexagon/HexagonSubtarget.h
+37-43 files

LLVM/project 85d5efallvm/include/llvm/IR RuntimeLibcalls.td, llvm/lib/Target/ARM ARMSubtarget.cpp

ARM: Mark more generic libgcc functions as available

Generic libgcc/compiler-rt functions coexist with aeabi variants
(e.g., __divsi3  and __aeabi_idiv) according to my reading of the
build. At least in compiler-rt, they are aliases (such that I'm not sure
what the point of ever emitting the __aeabi name is).

They were previously removed from the available set on AEABI+AAPCS targets
to force selection of the preferred __aeabi_* variants, back when
only one implementation per libcall could be recorded.

Now that multiple implementations can be available per libcall, stop hiding
the generics and select the __aeabi_* variant explicitly as the preferred
implemntation. This reduces the number of special cases to consider for
future libcalls info improvements.

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+62-0llvm/lib/Target/ARM/ARMSubtarget.cpp
+1-7llvm/include/llvm/IR/RuntimeLibcalls.td
+63-72 files

LLVM/project 45ed54cllvm/test/TableGen RuntimeLibcallEmitter-conflict-warning.td RuntimeLibcallEmitter-multiple-impls.td, llvm/utils/TableGen/Basic RuntimeLibcallsEmitter.cpp

RuntimeLibcalls: Emit all available impls for a libcall, not just one

The intent is RuntimeLibcalls should represent all functions that are
callable from the module, which may have contextually selectable alternatives.
Previously we had this warning since there was no mechanism to select which
one you want, and as a workaround the library call sets avoided adding the
variants which should nto be selected.

Now targets can use initLibcallLoweringInfo, so remove the warning to unblock
more libcall cleanups. Eventually initLibcallLoweringInfo should also be tablegen
driven.

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+104-0llvm/test/TableGen/RuntimeLibcallEmitter-multiple-impls.td
+0-101llvm/test/TableGen/RuntimeLibcallEmitter-conflict-warning.td
+3-25llvm/utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp
+107-1263 files

LLVM/project 15fc39dllvm/include/llvm/IR RuntimeLibcalls.td, llvm/lib/Target/MSP430 MSP430Subtarget.cpp

Revert "MSP430: Mark more generic libgcc functions as available (#210962)"

This reverts commit a7543e65d6b24ff4ea2d8bee1cc676980f4bf76c.
DeltaFile
+0-67llvm/lib/Target/MSP430/MSP430Subtarget.cpp
+11-4llvm/include/llvm/IR/RuntimeLibcalls.td
+11-712 files

LLVM/project 67578f9llvm/include/llvm/IR RuntimeLibcalls.td, llvm/lib/Target/MSP430 MSP430Subtarget.cpp

MSP430: Mark more generic libgcc functions as available (#210962)

The generic soft-float, conversion, comparison and integer helper
routines (__addsf3, __divli's __divsi3, __ashlsi3, ...) exist in the MSP430
libgcc port alongside the preferred __mspabi_* variants. They were previously
removed to force selection of the __mspabi_* names, back when only one
implementation per libcall could be recorded.

Stop hiding them: only __lshrsi3 stays excluded, since the MSP430 libgcc
port provides the 32-bit logical right shift solely under __mspabi_srll and
never defines a generic __lshrsi3.

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+67-0llvm/lib/Target/MSP430/MSP430Subtarget.cpp
+4-11llvm/include/llvm/IR/RuntimeLibcalls.td
+71-112 files

LLVM/project 499db79clang/lib CMakeLists.txt

Revert "[Clang] Don't build static analyzer if disabled" (#212836)

Breaks unusual build configs where clang-tidy static analyzer is enabled
while clang static analyzer is disabled.

Reverts llvm/llvm-project#212024
DeltaFile
+1-3clang/lib/CMakeLists.txt
+1-31 files

LLVM/project a9749e8flang/include/flang/Parser tools.h, flang/include/flang/Semantics expression.h

[flang][semantics] Accept BOZ initializers for C enum values (#211904)

Fortran 2023 7.6.1 errata f23/013 changes R762 so an interoperable
enumerator may be a named-constant initialized by a
boz-literal-constant, and specifies the value as
INT(boz-literal-constant, C_INT).

Handle that named-constant restriction directly in enum resolution while
preserving the usual scalar integer expression checks for non-enumerator
contexts. This mirrors the general named-constant initializer path,
which already converts BOZ values through the declared type before
folding.
DeltaFile
+18-2flang/lib/Semantics/resolve-names.cpp
+8-1flang/test/Semantics/modfile31.f90
+6-0flang/test/Semantics/resolve60.f90
+6-0flang/lib/Parser/tools.cpp
+5-0flang/include/flang/Semantics/expression.h
+4-0flang/include/flang/Parser/tools.h
+47-36 files

LLVM/project 45a81f1clang/lib/Basic/Targets AMDGPU.cpp, llvm/include/llvm/TargetParser AMDGPUTargetParser.h

AMDGPU: Handle more TargetParser queries in tablegen

Previously we had various enum switches. Start generated tables
indexed by enums. Avoid some special cases by defining the dummy
"generic" and "generic-hsa" targets as real processors.

Co-authored-by: Claude (Claude-Opus-4.8)
DeltaFile
+63-82llvm/lib/TargetParser/AMDGPUTargetParser.cpp
+87-30llvm/utils/TableGen/Basic/AMDGPUTargetDefEmitter.cpp
+7-4llvm/lib/Target/AMDGPU/GCNProcessors.td
+2-5clang/lib/Basic/Targets/AMDGPU.cpp
+2-4llvm/include/llvm/TargetParser/AMDGPUTargetParser.h
+4-0llvm/test/TableGen/AMDGPUTargetDefErrors.td
+165-1253 files not shown
+172-1269 files

LLVM/project bacfe29mlir/lib/Dialect/Transform/IR TransformOps.cpp

[MLIR] Fix transform.apply_patterns with apply_cse option (#212818)

This patch fixes a crash in `transform.apply_patterns` when `apply_cse`
is enabled and the target operation does not have the
`IsolatedFromAbove` trait.

For non-`IsolatedFromAbove` targets, `transform.apply_patterns` cannot
apply patterns directly to the target operation. Instead, it collects
the operations within the target into a worklist and passes that
worklist to `applyOpPatternsGreedily`. When `apply_cse` is enabled,
pattern application and CSE are performed repeatedly until a fixpoint is
reached.

Previously, the worklist was collected only once before entering the
fixpoint loop. However, pattern application may erase operations from
the IR, leaving stale pointers in the cached worklist. Reusing this
worklist in subsequent iterations may therefore result in a crash.

This patch rebuilds the worklist at the beginning of each iteration,

    [45 lines not shown]
DeltaFile
+6-5mlir/lib/Dialect/Transform/IR/TransformOps.cpp
+6-51 files

LLVM/project 6713742clang/include/clang/DependencyScanning DependencyScanningWorker.h DependencyScannerImpl.h, clang/lib/DependencyScanning CMakeLists.txt DependencyScanningWorker.cpp

Move implementation details to DependencyScanningWorker.cpp and dissolve DependencyScannerImpl.h/cpp.
DeltaFile
+0-525clang/lib/DependencyScanning/DependencyScannerImpl.cpp
+488-1clang/lib/DependencyScanning/DependencyScanningWorker.cpp
+0-122clang/include/clang/DependencyScanning/DependencyScannerImpl.h
+12-2clang/include/clang/DependencyScanning/DependencyScanningWorker.h
+0-1clang/lib/Tooling/DependencyScanningTool.cpp
+0-1clang/lib/DependencyScanning/CMakeLists.txt
+500-6523 files not shown
+501-6549 files