LLVM/project 0177533llvm/lib/Target/RISCV RISCVInstrInfo.td

[RISCV] Remove isAsmParserOnly from LongBccPseudo and LongBcciPseudo.  NFC (#194949)

These instructions are created by assembler relaxation. They aren't
"parsed.". isAsmParserOnly suppresses the disassembler for these, but
that was already suppressed by isPseudo and isCodeGenOnly.
DeltaFile
+0-2llvm/lib/Target/RISCV/RISCVInstrInfo.td
+0-21 files

LLVM/project cf3a327llvm/docs LangRef.rst, llvm/include/llvm/IR FixedMetadataKinds.def

IR: Introduce !elf_section_properties for setting section properties.

This new metadata type may be used to set sh_type and sh_entsize on a
global's section. The intent is that it will be used to mark up
CFI jump table sections.

Reviewers: fmayer, MaskRay, nikic, efriedma-quic

Reviewed By: fmayer

Pull Request: https://github.com/llvm/llvm-project/pull/149260
DeltaFile
+39-23llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+25-0llvm/test/CodeGen/X86/elf-section-properties.ll
+19-0llvm/docs/LangRef.rst
+17-0llvm/lib/IR/Verifier.cpp
+12-0llvm/test/Verifier/elf-section-properties.ll
+1-0llvm/include/llvm/IR/FixedMetadataKinds.def
+113-236 files

LLVM/project 8ba1986llvm/utils/gn/secondary/llvm/lib/DWP BUILD.gn

[gn build] Port caa18a808aa0



Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/194976
DeltaFile
+1-0llvm/utils/gn/secondary/llvm/lib/DWP/BUILD.gn
+1-01 files

LLVM/project 5606613llvm/utils/gn/secondary/libcxx/include BUILD.gn

[gn build] Port 7226f424bfe9



Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/194975
DeltaFile
+3-0llvm/utils/gn/secondary/libcxx/include/BUILD.gn
+3-01 files

LLVM/project 49d1797lld/MachO ConcatOutputSection.h ConcatOutputSection.cpp

Add helper function
DeltaFile
+29-21lld/MachO/ConcatOutputSection.h
+24-17lld/MachO/ConcatOutputSection.cpp
+53-382 files

LLVM/project b5ff452clang/docs ReleaseNotes.rst, clang/lib/CodeGen CGBuiltin.cpp

[Clang] Reject __annotation on unsupported targets (#193731)

__annotation emits llvm.codeview.annotation intrinsics, which are only
consumed by CodeViewDebug
on Windows and UEFI targets. On other targets the intrinsic is silently
dropped, and codegen
hits an assertion due to wchar_t being 4 bytes (UTF-32) instead of the
expected 2 bytes
(UTF-16).

Fixes #184318
DeltaFile
+12-7clang/test/Sema/ms-annotation.c
+9-4clang/lib/CodeGen/CGBuiltin.cpp
+8-1clang/lib/Sema/SemaChecking.cpp
+2-0clang/docs/ReleaseNotes.rst
+1-0clang/test/CodeGen/ms-annotation.c
+32-125 files

LLVM/project 2296100lldb/tools/yaml2macho-core yaml2macho.cpp

[lldb][windows] fix yaml2macho not loading file (#194909)
DeltaFile
+1-1lldb/tools/yaml2macho-core/yaml2macho.cpp
+1-11 files

LLVM/project bb82a7allvm/include/llvm/ProfileData InstrProf.h, llvm/lib/Transforms/Instrumentation MemProfInstrumentation.cpp

[MemProf] Skip GV `__prof*` during instrumentation (#193354)

The existing filter in `isInterestingMemoryAccess` skips globals named
`__llvm*`, but PGO counter globals are named `__profc_*` (and related
`__profd_*`, `__profvp_*`, etc.), so they bypass the name check, e.g.:


https://github.com/llvm/llvm-project/blob/b48d8a54e29f5f33ef52a4759414126904f01611/llvm/include/llvm/ProfileData/InstrProf.h#L128-L138

The section-based check above catches direct accesses where
`stripInBoundsOffsets` resolves to the GlobalVariable, but fails for
bias-based counter addressing `(inttoptr(add(ptrtoint(__profc_),
bias)))` which the strip cannot see through.

This causes MemProf to instrument PGO counter updates, inflating MGO
binary access profiles proportionally to __llvm_prf_cnts section size.
Filtering `__prof` prefixed globals closes this gap.

RFC: we have confirmed `__prof*` are dead weight, whether we should

    [4 lines not shown]
DeltaFile
+3-0llvm/include/llvm/ProfileData/InstrProf.h
+2-1llvm/lib/Transforms/Instrumentation/MemProfInstrumentation.cpp
+5-12 files

LLVM/project 88cb362lld/MachO ConcatOutputSection.cpp Driver.cpp

resolve some comments
DeltaFile
+9-10lld/MachO/ConcatOutputSection.cpp
+2-0lld/MachO/Driver.cpp
+11-102 files

LLVM/project 113479dclang/lib/CIR/Dialect/Transforms FlattenCFG.cpp, clang/test/CIR/Transforms ternary.cir

[CIR] FlattenCFG: accept cir.trap as a ternary region terminator (#194497)

The CIRTernaryOpFlattening pattern only accepted cir.yield and
cir.unreachable as the terminator of a ternary region. Any other
terminator caused a verifier error ("unexpected terminator in ternary
false region") and aborted the backend with "IR failed to verify after
pattern application".

Real-world C++ code that uses the libc++ assertion macros hits this
path: _LIBCPP_ASSERT_NON_NULL expands to `cond ? (void)0 :
__builtin_trap()`, which lowers to a `cir.ternary` whose false region
ends in `cir.trap`. This is structurally identical to the
`cir.unreachable` case (both are non-returning Terminators), so the
flattening pattern just needs to leave the trap in place rather than
trying to rewrite it into a branch to the continue block.

Concretely this is blocking ~1,510 libc++ tests (~17% of the suite) that
all failed with the same diagnostic at construct_at.h, sample.h, and
pop_heap.h.

    [2 lines not shown]
DeltaFile
+53-35clang/lib/CIR/Dialect/Transforms/FlattenCFG.cpp
+70-0clang/test/CIR/Transforms/ternary.cir
+123-352 files

LLVM/project 0054218lld/MachO ConcatOutputSection.cpp ConcatOutputSection.h, lld/test/MachO arm64-thunks.s

Merge branch 'lld-macho-thunk-logs' into lld-macho-no-slop
DeltaFile
+145-122lld/MachO/ConcatOutputSection.cpp
+21-3lld/test/MachO/arm64-thunks.s
+20-2lld/MachO/ConcatOutputSection.h
+0-1lld/MachO/InputSection.h
+186-1284 files

LLVM/project 289b604libc/docs/dev undefined_behavior.rst, libc/src/__support/threads thread.h

[libc][thread] detect self-join and mutual-join deadlock (#194891)

Fix #194034.

Detect the deadlock cases of mutual thread joining.

Required by
`libcxx/test/std/thread/thread.jthread/join.deadlock.pass.cpp`


Assisted-by: Codex with gpt-5.5 high fast
DeltaFile
+83-6libc/test/integration/src/pthread/pthread_join_test.cpp
+22-0libc/src/__support/threads/linux/thread.cpp
+19-0libc/docs/dev/undefined_behavior.rst
+2-1libc/src/__support/threads/thread.h
+3-0libc/test/integration/src/pthread/CMakeLists.txt
+1-0libc/src/__support/threads/linux/CMakeLists.txt
+130-76 files

LLVM/project 8f45c1eutils/bazel/llvm-project-overlay/llvm BUILD.bazel

[Bazel] Fixes caa18a8 (#194967)

This fixes caa18a808aa0cc473a686fde72dfa12b4585eadd.

Co-authored-by: Google Bazel Bot <google-bazel-bot at google.com>
DeltaFile
+3-0utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
+3-01 files

LLVM/project 965146dllvm/lib/DWARFLinker/Classic DWARFLinkerDeclContext.cpp, llvm/test/tools/dsymutil/X86 odr-simple-template-names.test odr-simple-template-names-mixed.test

[dsymutil] Fix ODR type uniquing for -gsimple-template-names (#194501)

With -gsimple-template-names (now the default on macOS with deployment
target >= 26), template types like vector<int> and vector<float> both
get DW_AT_name("vector") in DWARF, with template parameters encoded only
as DW_TAG_template_type_parameter children.

Previously, dsymutil used only DW_AT_name for ODR type uniquing, causing
different template specializations to collide. This PR fixes that by
reconstructing template parameter information from child DIEs when the
type name does not already contain template parameters.

The reconstructed name is used only for uniquing and not emitted into
the output DWARF. The parallel DWARF linker already handled this
correctly via SyntheticTypeNameBuilder.

rdar://175115639
DeltaFile
+369-0llvm/test/tools/dsymutil/X86/odr-simple-template-names.test
+348-0llvm/test/tools/dsymutil/X86/odr-simple-template-names-mixed.test
+28-3llvm/lib/DWARFLinker/Classic/DWARFLinkerDeclContext.cpp
+745-33 files

LLVM/project caa18a8llvm/include/llvm/DWP DWP.h DWPStringPool.h, llvm/lib/DWP DWP.cpp ELFWriter.cpp

[llvm-dwp] Replace MCStreamer with direct ELF writer for zero-copy output (#192112)

Replace the MCStreamer-based output pipeline with a lightweight direct
ELF writer (DWPWriter). Section data is stored as zero-copy StringRef
chunks pointing to the mmap'd input files, and written as a minimal
ELF64 relocatable object directly to disk.

## Rationale
The MCStreamer pipeline copies all section data into 16KB MCDataFragment
blocks, accumulates them in memory, then writes everything out during
MCAssembler::Finish(). This can be cause lots of memory pressure and
slow down llvm-dwp.

For instance, on a 3.3GB DWP file, this translates to rougly ~3.3GB of
heap allocation and two full copies of the data.

The new DWPWriter avoids this via:
- emitBytes() stores a StringRef chunk (zero-copy, no allocation)
- emitIntValue() writes to a small per-section buffer (index tables)

    [16 lines not shown]
DeltaFile
+343-111llvm/lib/DWP/DWP.cpp
+119-35llvm/include/llvm/DWP/DWP.h
+7-91llvm/tools/llvm-dwp/llvm-dwp.cpp
+63-0llvm/lib/DWP/ELFWriter.cpp
+10-31llvm/include/llvm/DWP/DWPStringPool.h
+37-0llvm/include/llvm/DWP/ELFWriter.h
+579-2683 files not shown
+581-2749 files

LLVM/project a9cef14clang-tools-extra/clang-tidy/bugprone MoveForwardingReferenceCheck.cpp, clang-tools-extra/docs ReleaseNotes.rst

[clang-tidy] Fix some false positive in bugprone-move-forwarding-reference (#191435)

In the following case:

template <typename T, typename U>
void shocase(U&& SomeU) {
  [SomeU] () { T SomeT(std::move(SomeU)); };
}

We use to flag the move as a forward, while the lambda captures SomeU by
copy, which makes the move valid.
DeltaFile
+17-7clang-tools-extra/clang-tidy/bugprone/MoveForwardingReferenceCheck.cpp
+22-0clang-tools-extra/test/clang-tidy/checkers/bugprone/move-forwarding-reference.cpp
+4-0clang-tools-extra/docs/ReleaseNotes.rst
+43-73 files

LLVM/project a26d9c6llvm/docs LangRef.rst

[LangRef] asm clobber constrains: '~memory' allows reads and synchronization (#150191)

I was not sure what the best way is for talking about "synchronization effects".
DeltaFile
+7-4llvm/docs/LangRef.rst
+7-41 files

LLVM/project 9f72098llvm/lib/Transforms/Vectorize VPlanVerifier.cpp

[VPlan] Include wide IVs with NUW as monotonic in verifier. (#194959)

This fixes a verifier failure after
https://github.com/llvm/llvm-project/pull/194267 due to a wide IV 
used in header mask compare being narrowed during later 
optimizations.

This is in line how we treat other recipes, like adds, in the verifier
check.

Should fix https://lab.llvm.org/buildbot/#/builders/187/builds/19595.
DeltaFile
+1-1llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp
+1-11 files

LLVM/project 865fd2aflang/lib/Semantics check-omp-loop.cpp openmp-utils.cpp, flang/test/Parser/OpenMP linear-clause.f90

[flang][OpenMP] Check conflicts between predetermined/explicit DSA

Improve checks for loop iteration variables with predetermined DSA
appearing in DSA clauses. Show both the location of the variable
in the offending clause, and in the loop.

Make the checks a bit more accurate as well: only allow LINEAR clause
on SIMD construct with a single affected loop.
DeltaFile
+80-22flang/lib/Semantics/check-omp-loop.cpp
+27-0llvm/include/llvm/Frontend/OpenMP/OMP.h
+11-14flang/test/Parser/OpenMP/linear-clause.f90
+14-6flang/lib/Semantics/openmp-utils.cpp
+0-15flang/lib/Semantics/check-omp-structure.cpp
+7-7flang/test/Semantics/OpenMP/do04.f90
+139-647 files not shown
+151-8513 files

LLVM/project d32a1c9flang/lib/Semantics resolve-directives.cpp

[flang][OpenMP] Simplify unpacking directive arguments, NFC (#194952)

Use GetArgumentObject in a few places instead of doing the unpacking by
hand.
DeltaFile
+11-17flang/lib/Semantics/resolve-directives.cpp
+11-171 files

LLVM/project b46edf7llvm/include/llvm/CodeGen LiveInterval.h, llvm/test/CodeGen/X86 coalescer-empty-interval-overlaps.mir

[RegisterCoalescer] Fix LiveRange::overlaps assert on empty interval (#194771)

Make the empty-range check in LiveRange::overlaps() symmetric by also
checking this->empty(), not just other.empty(). This prevents an
assertion failure in overlapsFrom() when applyTerminalRule encounters a
virtual register with no definition and thus an empty live interval.
DeltaFile
+44-0llvm/test/CodeGen/X86/coalescer-empty-interval-overlaps.mir
+1-1llvm/include/llvm/CodeGen/LiveInterval.h
+45-12 files

LLVM/project 2787fb1clang/include/clang/Basic Module.h, clang/lib/Basic Module.cpp

[clang][modules] Always keep submodule index up-to-date (#194039)

This partially reverts #113391, always keeping the submodule index
up-to-date. This is important for a follow-up PR that will make
deserialization of submodules lazier. Without this change, updating the
index would deserialize submodules too eagerly. The original PR only
showed 0.5% improvement in scan times, while the upcoming PR promises an
order of magnitude larger improvement.
DeltaFile
+1-4clang/lib/Basic/Module.cpp
+2-1clang/include/clang/Basic/Module.h
+3-52 files

LLVM/project 1b60e78clang/include/clang/Basic Module.h, clang/lib/Basic Module.cpp

[clang][modules] Make `ExportDecl` a `std::pair` (#194036)

This PR replaces `llvm::PointerIntPair` with `std::pair` for module
exports. This is NFC that enables a future PR to use a different
(larger) type to represent module references.
DeltaFile
+5-5clang/lib/Basic/Module.cpp
+2-2clang/lib/Serialization/ASTReader.cpp
+2-2clang/lib/Serialization/ASTWriter.cpp
+1-1clang/include/clang/Basic/Module.h
+1-1clang/lib/CodeGen/CGDeclCXX.cpp
+1-1clang/lib/Frontend/FrontendActions.cpp
+12-121 files not shown
+13-137 files

LLVM/project 76ba2e7clang/lib/Basic Module.cpp, clang/lib/CodeGen CodeGenModule.cpp

[clang] NFC: Replace `auto` with `Module *` (#194032)

This PR updates some uses of `auto` to `Module *`. This is NFC for now,
but will be important in a follow-up to trigger a conversion operator.
DeltaFile
+5-9clang/lib/Basic/Module.cpp
+6-6clang/lib/Serialization/ASTWriter.cpp
+2-2clang/lib/Frontend/FrontendActions.cpp
+1-1clang/lib/Frontend/FrontendAction.cpp
+1-1clang/lib/CodeGen/CodeGenModule.cpp
+1-1clang/lib/Frontend/CompilerInstance.cpp
+16-202 files not shown
+18-228 files

LLVM/project bf2b1efclang/include/clang/DependencyScanning ModuleDepCollector.h DependencyScanningService.h, clang/lib/DependencyScanning ModuleDepCollector.cpp

[clang][deps] Use `ModuleFile` instead of `Module` (#194028)

This switches the dependency scanner from handling `Module` objects to
dealing with `serialization::ModuleFile`. Module file already contains
(almost) all of the information the scanner needs, and has the advantage
of not forcing deserialization of `Module` objects from PCM files, which
will become important in a later PR.

This alone improves clean scans by 1.8% and incremental scans by 2.6%.
This effect is likely caused by removing iteration over many `Module`
objects, removing deduplication via associative containers deduplication
of work, and sorting `Module` objects by name to ensure deterministic
order.
DeltaFile
+55-128clang/lib/DependencyScanning/ModuleDepCollector.cpp
+13-34clang/include/clang/DependencyScanning/ModuleDepCollector.h
+2-0clang/include/clang/DependencyScanning/DependencyScanningService.h
+1-0clang/tools/clang-scan-deps/ClangScanDeps.cpp
+71-1624 files

LLVM/project 79ccd85flang/lib/Semantics resolve-directives.cpp

[flang][OpenMP] Simplify unpacking directive arguments, NFC

Use GetArgumentObject in a few places instead of doing the unpacking
by hand.
DeltaFile
+11-17flang/lib/Semantics/resolve-directives.cpp
+11-171 files

LLVM/project 6567b81clang/lib/ScalableStaticAnalysisFramework/Analyses/PointerFlow PointerFlowExtractor.cpp

Update clang/lib/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowExtractor.cpp

Co-authored-by: Jan Korous <jkorous at apple.com>
DeltaFile
+1-1clang/lib/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowExtractor.cpp
+1-11 files

LLVM/project 950f465clang/lib/ScalableStaticAnalysisFramework/Analyses/PointerFlow PointerFlowExtractor.cpp

Update clang/lib/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowExtractor.cpp

Co-authored-by: Jan Korous <jkorous at apple.com>
DeltaFile
+1-1clang/lib/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowExtractor.cpp
+1-11 files

LLVM/project 015e6caclang/include/clang/CIR/Dialect/IR CIROps.td, clang/lib/CIR/CodeGen CIRGenItaniumCXXABI.cpp CIRGenException.cpp

[CIR] Make BeginCatchOp target-independent (#190612)

Change the design of BeginCatchOp to be target-independent and handle
the target-specific lowering in the EHLowering pass
DeltaFile
+306-53clang/test/CIR/CodeGen/try-catch.cpp
+0-239clang/lib/CIR/CodeGen/CIRGenItaniumCXXABI.cpp
+114-11clang/lib/CIR/CodeGen/CIRGenException.cpp
+94-3clang/lib/CIR/Dialect/Transforms/EHABILowering.cpp
+53-0clang/include/clang/CIR/Dialect/IR/CIROps.td
+4-10clang/test/CIR/CodeGen/try-catch-all-with-cleanup.cpp
+571-3162 files not shown
+573-3208 files

LLVM/project 8454fb4.github/workflows release-asset-audit.yml

workflows/release-asset-audit: Use a GitHub app token (#194085)

This removes one user of the ISSUE_SUBSCRIBER_TOKEN secret, which we
want to eventually remove since secrets are more difficult to maintain.
This also allows use to scope the token with less permissions since it
isn't shared with other workflows.
DeltaFile
+9-1.github/workflows/release-asset-audit.yml
+9-11 files