LLVM/project de7a520clang/test/CodeGen/LoongArch/lasx builtin-alias.c builtin.c, lldb/source/Utility RISCV_DWARF_Registers.h

Merge branch 'users/rnk/llvm-md-1a' into users/rnk/llvm-md-1b

# Conflicts:
#       llvm/docs/GettingInvolved.md
#       llvm/docs/ProgrammersManual.md
#       llvm/docs/index.md
DeltaFile
+3,563-3,543llvm/test/CodeGen/AMDGPU/memintrinsic-unroll.ll
+6,598-111llvm/test/CodeGen/X86/clmul-vector.ll
+2,749-2,749clang/test/CodeGen/LoongArch/lasx/builtin-alias.c
+2,745-2,745clang/test/CodeGen/LoongArch/lasx/builtin.c
+3,092-2,392llvm/test/CodeGen/AMDGPU/GlobalISel/frem.ll
+4,489-13lldb/source/Utility/RISCV_DWARF_Registers.h
+23,236-11,5532,403 files not shown
+137,246-79,0572,409 files

LLVM/project b9a0094clang/test/CodeGen/LoongArch/lasx builtin-alias.c builtin.c, lldb/source/Utility RISCV_DWARF_Registers.h

Merge branch 'main' into users/rnk/llvm-md-1a
DeltaFile
+3,563-3,543llvm/test/CodeGen/AMDGPU/memintrinsic-unroll.ll
+6,598-111llvm/test/CodeGen/X86/clmul-vector.ll
+2,749-2,749clang/test/CodeGen/LoongArch/lasx/builtin-alias.c
+2,745-2,745clang/test/CodeGen/LoongArch/lasx/builtin.c
+3,092-2,392llvm/test/CodeGen/AMDGPU/GlobalISel/frem.ll
+4,489-13lldb/source/Utility/RISCV_DWARF_Registers.h
+23,236-11,5532,403 files not shown
+137,247-79,0572,409 files

LLVM/project cab8d8cllvm/docs Coroutines.md CommandLine.md

[docs] Migrate 20 LLVM docs to markdown (#201465)

An LLM assisted in the rewrite. I didn't use pandoc or any other tools,
and I think there are fewer artifacts. I validated these docs by opening
all 20 HTML files in my browser.

Files:
- DebuggingLLVM.md
- FAQ.md
- CompilerWriterInfo.md
- GettingStartedVS.md
- NewPassManager.md
- MemorySSA.md
- LoopTerminology.md
- Lexicon.md
- MIRLangRef.md
- CoverageMappingFormat.md
- InstrProfileFormat.md
- BitCodeFormat.md

    [9 lines not shown]
DeltaFile
+1,025-1,160llvm/docs/Coroutines.md
+890-932llvm/docs/CommandLine.md
+505-585llvm/docs/BitCodeFormat.md
+440-520llvm/docs/MIRLangRef.md
+452-489llvm/docs/Extensions.md
+422-452llvm/docs/LibFuzzer.md
+3,734-4,13814 files not shown
+6,467-7,16120 files

LLVM/project 638f3aellvm/docs Coroutines.md Coroutines.rst

[docs] Rename 20 key LLVM docs to Markdown (#201464)

This may break the docs build temporarily, but there will be a follow-up
PR that fixes it immediately after. The rename is being committed first
to aid review and source code archaelogy.

Tracking issue: #201242
DeltaFile
+2,304-0llvm/docs/Coroutines.md
+0-2,304llvm/docs/Coroutines.rst
+0-1,753llvm/docs/CommandLine.rst
+1,753-0llvm/docs/CommandLine.md
+1,362-0llvm/docs/BitCodeFormat.md
+0-1,362llvm/docs/BitCodeFormat.rst
+5,419-5,41951 files not shown
+15,568-15,56857 files

LLVM/project ba7b74fllvm/lib/Target/X86/GISel X86LegalizerInfo.cpp, llvm/test/CodeGen/X86/GlobalISel legalize-undef-vec-scaling.mir

[X86][GlobalISel] Adding missing Query to G_BUILD_VECTOR legalization (#199435)

Once G_BUILD_VECTOR was fixed, legalize-undef-vec-scaling.mir falled
into endless legalization loop as incoming MIR doesn't match correct
lowering of the type.
DeltaFile
+20-27llvm/test/CodeGen/X86/GlobalISel/legalize-undef-vec-scaling.mir
+2-1llvm/lib/Target/X86/GISel/X86LegalizerInfo.cpp
+22-282 files

LLVM/project 46bc562clang/test/CodeGen/LoongArch/lasx builtin-alias.c builtin.c, lldb/source/Plugins/Process/Utility lldb-riscv-register-enums.h RegisterInfos_riscv32.h

Merge branch 'users/rnk/llvm-md-2a' into users/rnk/llvm-md-2b
DeltaFile
+3,563-3,543llvm/test/CodeGen/AMDGPU/memintrinsic-unroll.ll
+2,749-2,749clang/test/CodeGen/LoongArch/lasx/builtin-alias.c
+2,745-2,745clang/test/CodeGen/LoongArch/lasx/builtin.c
+4,489-13lldb/source/Utility/RISCV_DWARF_Registers.h
+4,473-0lldb/source/Plugins/Process/Utility/lldb-riscv-register-enums.h
+4,253-32lldb/source/Plugins/Process/Utility/RegisterInfos_riscv32.h
+22,272-9,0821,474 files not shown
+77,494-39,5321,480 files

LLVM/project fe560c5clang/test/CodeGen/LoongArch/lasx builtin-alias.c builtin.c, lldb/source/Plugins/Process/Utility lldb-riscv-register-enums.h RegisterInfos_riscv32.h

Merge branch 'main' into users/rnk/llvm-md-2a
DeltaFile
+3,563-3,543llvm/test/CodeGen/AMDGPU/memintrinsic-unroll.ll
+2,749-2,749clang/test/CodeGen/LoongArch/lasx/builtin-alias.c
+2,745-2,745clang/test/CodeGen/LoongArch/lasx/builtin.c
+4,489-13lldb/source/Utility/RISCV_DWARF_Registers.h
+4,473-0lldb/source/Plugins/Process/Utility/lldb-riscv-register-enums.h
+4,253-32lldb/source/Plugins/Process/Utility/RegisterInfos_riscv32.h
+22,272-9,0821,474 files not shown
+77,494-39,5321,480 files

LLVM/project 34555beclang/lib/ScalableStaticAnalysisFramework/Analyses SSAFAnalysesCommon.h, clang/lib/ScalableStaticAnalysisFramework/Analyses/PointerFlow PointerFlowExtractor.cpp

[SSAF][Extractor] Make hard errors in Extractors quiet

Hard errors were used in extractors during development to quickly
identify unsupported language constructs. This commit converts them to
DEBUG_WITH_TYPE so that these errors are silenced in release builds.

rdar://178747892
DeltaFile
+31-0clang/unittests/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowTest.cpp
+25-0clang/unittests/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage/UnsafeBufferUsageTest.cpp
+10-11clang/lib/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage/UnsafeBufferUsageExtractor.cpp
+10-9clang/lib/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowExtractor.cpp
+9-0clang/lib/ScalableStaticAnalysisFramework/Analyses/SSAFAnalysesCommon.h
+85-205 files

LLVM/project 4f73c81clang/include/clang/Basic FileManager.h, clang/include/clang/Lex HeaderSearch.h

[clang][lex] Store `HeaderFileInfo` in a `MapVector` (#201936)

This is a re-commit of PR #200968 (f357a47) that was reverted by PR
#201702 (adaa9e0). One call-site of
`HeaderSearch::forEachExistingLocalFileInfo()` in `ASTWriter` relies on
stable order, which the `DenseMap` didn't provide. This PR switches to
`MapVector`, which has the same performance characteristics as the
original solution at the cost of a theoretical memory usage increase.

Original PR description:

Calling `FileManager::GetUniqueIDMapping()` during modular builds gets
very expensive if the `FileManager` has seen lots of files. This
function is used in two places in the `ASTWriter` to look up
`HeaderFileInfo` in `HeaderSearch`.

This PR changes the storage of `HeaderFileInfo` from
`FileEntry::getUID()`-indexed `std::vector<T>` to
`llvm::DenseMap<FileEntryRef, T>`, improving scanning performance by
~2.5%.
DeltaFile
+37-60clang/lib/Serialization/ASTWriter.cpp
+11-22clang/lib/Lex/HeaderSearch.cpp
+0-18clang/lib/Basic/FileManager.cpp
+17-0llvm/include/llvm/ADT/MapVector.h
+7-8clang/include/clang/Lex/HeaderSearch.h
+0-5clang/include/clang/Basic/FileManager.h
+72-1136 files

LLVM/project 80ad296llvm/lib/IR Verifier.cpp, llvm/lib/Transforms/Utils InlineFunction.cpp

Reland "Remove the optional bitcast between a musttail call and its ret" (#201280) (#201642)

This relands #201280, which was reverted in #201479 because it broke the
sanitizer buildbot

The revert was caused by a heap-use-after-free in
`BitcodeReader::materialize`

Fix: The CallBase branch could have erased I before we read it in the
new conditional
DeltaFile
+9-34llvm/lib/IR/Verifier.cpp
+32-0llvm/test/Bitcode/musttail-bitcast-upgrade.ll
+0-24llvm/test/Transforms/CallSiteSplitting/musttail.ll
+2-21llvm/lib/Transforms/Utils/InlineFunction.cpp
+0-19llvm/test/Transforms/SafeStack/X86/musttail.ll
+0-14llvm/test/Instrumentation/AddressSanitizer/musttail.ll
+43-1125 files not shown
+55-13411 files

LLVM/project 4183355flang/lib/Lower/OpenMP Utils.cpp ClauseProcessor.cpp, flang/lib/Optimizer/OpenMP MapInfoFinalization.cpp

[Flang][OpenMP] Support iterator modifiers in map and motion clauses

Support iterated array elements and array sections in map and motion clauses for
target data, target enter data, target exit data, and target update constructs.

Preserve mapper resolution for iterated entries, including explicit mappers,
user-defined default mappers, declare mapper entries, and implicit default
mappers.

This PR stacked on top of #197047 and #197752.

This patch is part of the feature work for #188061.

Assisted with copilot.
DeltaFile
+507-0flang/test/Lower/OpenMP/motion-iterator.f90
+183-0flang/lib/Lower/OpenMP/Utils.cpp
+96-12flang/lib/Lower/OpenMP/ClauseProcessor.cpp
+25-0flang/test/Lower/OpenMP/declare-mapper-iterator.f90
+15-0flang/lib/Optimizer/OpenMP/MapInfoFinalization.cpp
+12-0flang/lib/Lower/OpenMP/Utils.h
+838-123 files not shown
+838-399 files

LLVM/project e9a4dd0compiler-rt/test/fuzzer OutOfProcessFuzzTarget.cpp

[compiler-rt] Add stdlib include to OutOfProcessFuzzTarget.cpp (#201944)

Fixes test after libc++ PR #195509 which drops transitive includes.
DeltaFile
+1-0compiler-rt/test/fuzzer/OutOfProcessFuzzTarget.cpp
+1-01 files

LLVM/project 3b89e77compiler-rt/lib/sanitizer_common/symbolizer sanitizer_wrappers.cpp

[compiler-rt] [sanitizers] Add includes for symbolizer (#201929)

After ce5b2e876494cb95f02d9f915081e2b8781e74d1 this stopped building.
DeltaFile
+2-0compiler-rt/lib/sanitizer_common/symbolizer/sanitizer_wrappers.cpp
+2-01 files

LLVM/project 0bb7ad1clang/include/clang/ScalableStaticAnalysisFramework/Core/Model EntityLinkage.h, clang/lib/ScalableStaticAnalysisFramework/Core/TUSummary TUSummaryExtractor.cpp

[SSAF] Let function parameters inherit linkage from their parent functions

SSAF treats parameters as entities and may not always associate them
back to their parent functions. Therefore, it needs to identify
parameters of functions with external linkage across different
TUs. Treating them as having no linkage (as in C++) causes the same
parameter in different TUs to be assigned different EntityIDs. As a
result, the behavior of the parameter across multiple TUs cannot be
correlated.

rdar://178844032
DeltaFile
+63-0clang/test/Analysis/Scalable/PointerFlow/external-inline-function-in-multi-tu.test
+42-0clang/unittests/ScalableStaticAnalysisFramework/TUSummaryBuilderTest.cpp
+18-0clang/lib/ScalableStaticAnalysisFramework/Core/TUSummary/TUSummaryExtractor.cpp
+4-2clang/include/clang/ScalableStaticAnalysisFramework/Core/Model/EntityLinkage.h
+127-24 files

LLVM/project de59f9ellvm/include/llvm/BinaryFormat DXContainer.h, llvm/include/llvm/ObjectYAML DXContainerYAML.h

[DirectX][ObjectYAML] Add SRCI part support (#199446)

Add support for DXContainer SRCI in the ObjectYAML pipeline so it can be
represented in structured YAML and round-tripped through
yaml2obj/obj2yaml.

SRCI is emitted into shader PDB files. It stores shader source code that
is displayed in PIX, and shader compilation flags.
DeltaFile
+324-4llvm/lib/Object/DXContainer.cpp
+243-0llvm/lib/MC/DXContainerInfo.cpp
+213-0llvm/unittests/Object/DXContainerTest.cpp
+185-0llvm/include/llvm/BinaryFormat/DXContainer.h
+179-0llvm/lib/ObjectYAML/DXContainerYAML.cpp
+151-0llvm/include/llvm/ObjectYAML/DXContainerYAML.h
+1,295-414 files not shown
+2,627-520 files

LLVM/project 3590131mlir/include/mlir/Dialect/SPIRV/IR SPIRVCLOps.td, mlir/test/Dialect/SPIRV/IR ocl-ops.mlir

[mlir][SPIR-V] Add OpenCL cbrt op (#201914)
DeltaFile
+21-0mlir/include/mlir/Dialect/SPIRV/IR/SPIRVCLOps.td
+16-0mlir/test/Dialect/SPIRV/IR/ocl-ops.mlir
+2-0mlir/test/Target/SPIRV/ocl-ops.mlir
+39-03 files

LLVM/project afa1a62flang/lib/Lower/OpenMP Utils.cpp ClauseProcessor.cpp

[flang][OpenMP][NFC] Share declare mapper helpers for iterator modifier lowering

Move mapper lookup and implicit default mapper creation into reusable
OpenMP lowering helpers so regular map lowering and iterator-generated
map entries can use the same resolution path.

This prepares Flang iterator modifier lowering for map and motion clauses
without changing the generated IR for existing non-iterator maps.
DeltaFile
+153-0flang/lib/Lower/OpenMP/Utils.cpp
+6-142flang/lib/Lower/OpenMP/ClauseProcessor.cpp
+7-0flang/lib/Lower/OpenMP/Utils.h
+166-1423 files

LLVM/project 2c3b350flang/lib/Lower/OpenMP Utils.h

Add doxygen documentation to resolveMapperId
DeltaFile
+18-0flang/lib/Lower/OpenMP/Utils.h
+18-01 files

LLVM/project d2dc471llvm/lib/Target/AMDGPU AMDGPUBarrierLatency.cpp, llvm/test/CodeGen/AMDGPU ldsdmacnt_sched.mir

[AMDGPU] Do not always add latency between LDSDMA -> S_WAIT_LDSDMA

Change-Id: Ibeee5f7bfdeab730ebbc5a1724b716ca2ce0d335
DeltaFile
+351-0llvm/test/CodeGen/AMDGPU/ldsdmacnt_sched.mir
+74-0llvm/lib/Target/AMDGPU/AMDGPUBarrierLatency.cpp
+425-02 files

LLVM/project 276cc2fllvm/lib/Target/DirectX/DXILWriter DXILBitcodeWriter.cpp, llvm/lib/Target/DirectX/DirectXIRPasses DXILDebugInfo.cpp

[DirectX] Rewrite DIGlobalVariableExpression to DXDIGlobalVariable (#199791)

DIGlobalVariable used to have an `expr` operand. Starting from
bceaaa964360 `expr` is now an operand of DIGlobalVariableExpression,
which references both the variable and the expression.

Before:
    !0 = !DIGlobalVariable(expr: !1)
    !1 = !DIExpression(DW_OP_plus, 4)

Now:
    !2 = !DIGlobalVariableExpression(var: !3, expr: !4)
!3 = distinct !DIGlobalVariable(name: "a", scope: null, isLocal: false,
isDefinition: true, type: !6)
    !4 = !DIExpression(DW_OP_plus, 4)

DXIL does not support DIGlobalVariableExpression, so we have to fold
`expr` back to DIGlobalVariable.


    [2 lines not shown]
DeltaFile
+39-0llvm/test/CodeGen/DirectX/DebugInfo/di-globalvariable.ll
+36-0llvm/test/tools/dxil-dis/di-globalvariable.ll
+17-0llvm/lib/Target/DirectX/DirectXIRPasses/DXILDebugInfo.cpp
+1-1llvm/lib/Target/DirectX/DXILWriter/DXILBitcodeWriter.cpp
+93-14 files

LLVM/project 3e0046ccompiler-rt/lib/sanitizer_common/symbolizer sanitizer_wrappers.cpp

fix

Created using spr 1.3.7
DeltaFile
+1-0compiler-rt/lib/sanitizer_common/symbolizer/sanitizer_wrappers.cpp
+1-01 files

LLVM/project c3e9d05lld/MachO LTO.cpp, lld/test/MachO icf-safe-thunks.ll

[lld-macho][LTO] Emit `__llvm_addrsig` for `--icf=safe_thunks` (#188486)

LTO was emitting `__llvm_addrsig` metadata when `--icf=safe` was
specified, but not for `--icf=safe_thunks`. After the recent PR
https://github.com/llvm/llvm-project/pull/188400 that makes safe ICF
conservative without `__llvm_addrsig` (marking all symbols as
address-significant when the section is absent), this omission caused
safe_thunks to silently degrade for all LTO-compiled objects: every
symbol became `keepUnique`, preventing body folding entirely.

Fix this by also enabling `EmitAddrsig` when `icfLevel` is
`safe_thunks`. This allows the LTO backend to emit precise
address-significance metadata, so that only truly address-significant
functions get thunk treatment while non-address-significant identical
functions can still be body-folded.

Add a regression test that verifies LTO + `--icf=safe_thunks` correctly
body-folds non-address-significant identical functions, which would fail
without this fix due to missing addrsig metadata.
DeltaFile
+59-0lld/test/MachO/icf-safe-thunks.ll
+2-1lld/MachO/LTO.cpp
+61-12 files

LLVM/project 75db4ceclang/test/CodeGenCUDA increment-index-for-thunks.cu, clang/test/CodeGenCXX ptrauth-global-constant-initializers.cpp microsoft-abi-vtables-return-thunks.cpp

Restore unnamed_addr on vtables in -fno-rtti builds (#201846)

This is a follow-up to #200108 which dropped unnamed_addr from vtables
since it can break dynamic_cast under some circumstances. However, that
caused significant binary size regressions due to preventing ICF of
vtables.

This patch restores unnamed_addr on vtables in -fno-rtti builds, since
those do not support dynamic_cast, recovering the binary size savings at
least for those using that configuration.
DeltaFile
+10-10clang/test/CodeGenCXX/ptrauth-global-constant-initializers.cpp
+8-8clang/test/CodeGenCXX/microsoft-abi-vtables-return-thunks.cpp
+8-8clang/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance.cpp
+6-6clang/test/CodeGenCXX/dllimport.cpp
+6-6clang/test/CodeGenCUDA/increment-index-for-thunks.cu
+5-5clang/test/CodeGenCXX/microsoft-abi-vtables-single-inheritance.cpp
+43-4312 files not shown
+77-6518 files

LLVM/project 350a72bflang/lib/Semantics resolve-names.cpp, flang/test/Semantics/OpenMP declare-target-symbols.f90 declare-target08.f90

[flang][OpenMP] Implicit declarations of procedures in DECLARE_TARGET

This replaces commit 8f5df8891840b, since it was rejecting the following
case:
```
  function baz(a)
    !$omp declare target to(baz)
    real, intent(in) :: a
    baz = a
  end

  program main
    real :: a
    !$omp declare target(baz)
    integer, save :: baz        ! error: 'baz' is already declared
  end
```
Instead of flagging an error, the 'baz' in the directive should be
resolved to the explicitly declared variable.

    [24 lines not shown]
DeltaFile
+103-87flang/lib/Semantics/resolve-names.cpp
+35-0flang/test/Semantics/OpenMP/declare-target-symbols.f90
+4-4flang/test/Semantics/OpenMP/declare-target08.f90
+142-913 files

LLVM/project 0dcca55mlir/lib/Dialect/SPIRV/IR SPIRVDialect.cpp, mlir/test/Dialect/SPIRV/IR types.mlir

[mlir][SPIR-V] Validate float types in parseAndVerifyType (#201910)
DeltaFile
+16-0mlir/test/Dialect/SPIRV/IR/types.mlir
+6-1mlir/lib/Dialect/SPIRV/IR/SPIRVDialect.cpp
+22-12 files

LLVM/project 6ffd9f8mlir/include/mlir/Dialect/SPIRV/IR SPIRVCLOps.td, mlir/test/Dialect/SPIRV/IR ocl-ops.mlir

[mlir][SPIR-V] Add OpenCL erfc op (#201906)
DeltaFile
+23-0mlir/include/mlir/Dialect/SPIRV/IR/SPIRVCLOps.td
+16-0mlir/test/Dialect/SPIRV/IR/ocl-ops.mlir
+2-0mlir/test/Target/SPIRV/ocl-ops.mlir
+41-03 files

LLVM/project 1227b19llvm/lib/CodeGen/SelectionDAG SelectionDAG.cpp

[SelectionDAG] Fix -Wunused-variable (#201932)

NumDstElts is only used in assertions so mark it [[maybe_unused]] to
prevent any issues with non-asserts builds and -Wunused-variable.
DeltaFile
+1-1llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+1-11 files

LLVM/project 07852a5llvm/lib/TargetParser RISCVISAInfo.cpp, llvm/unittests/TargetParser RISCVISAInfoTest.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.8-beta.1
DeltaFile
+188-12llvm/unittests/TargetParser/RISCVISAInfoTest.cpp
+64-18llvm/lib/TargetParser/RISCVISAInfo.cpp
+252-302 files

LLVM/project ca81b02compiler-rt/lib/sanitizer_common/symbolizer sanitizer_wrappers.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+1-0compiler-rt/lib/sanitizer_common/symbolizer/sanitizer_wrappers.cpp
+1-01 files

LLVM/project fa9e7b7llvm/lib/Target/AMDGPU SIOptimizeExecMasking.cpp, llvm/test/CodeGen/AMDGPU debug-independence-exec-masking.mir

AMDGPU: fix assert when calling LiveRegUnits::stepBackward (#201887)

`stepBackward` assert added in
https://github.com/llvm/llvm-project/pull/193104.
Found while building `aqlprofile` as part of TheRock.
DeltaFile
+27-0llvm/test/CodeGen/AMDGPU/debug-independence-exec-masking.mir
+2-1llvm/lib/Target/AMDGPU/SIOptimizeExecMasking.cpp
+29-12 files