LLVM/project fea69aallvm/include/llvm/ProfileData/Coverage CoverageMapping.h, llvm/lib/ProfileData/Coverage CoverageMapping.cpp

LLVMCoverage: Unify getCoverageForFile and getCoverageForFunction. NFC (#120842)

Since #119952, `getCoverageForFile` and `getCoverageForFunction` have
similar structure each other. Ther merged method `addFunctionRegions`
has two lambda subfunctions.

* `getCoverageForFile`
  - `MainFileID` may be `nullopt`.
- `shouldProcess` picks up relevant records along `FileIDs` that is
scanned based on `MainFileID`. They may have expanded source files.
  - `shouldExpand` takes the presense of `MainFileID` into account.
* `getCoverageForFunction`
  - This assumes the presense of `MainFileID`.
  - `shouldProcess` picks up records that belong only to `MainFileID`.
  - `shouldExpand` assumes the presense of `MainFileID`.

This change introduces a wrapper class `MergeableCoverageData` for
further merging instances. At the moment, this returns `CoverageData`
including `buildSegments()`.

This change itself is NFC.
DeltaFile
+42-38llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
+3-0llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h
+45-382 files

LLVM/project 0727fcbmlir/lib/Bytecode/Reader BytecodeReader.cpp, mlir/test/Bytecode op_with_properties_deeply_nested_attr.mlir

[mlir][Bytecode] Fix infinite loop by tracking type/attribute in deferred worklist (#174874)

The bytecode reader could enter an infinite loop when parsing deeply
nested attributes containing type references. The deferred worklist
stored only indices without distinguishing between attributes and types,
causing type indexes to be misinterpreted as attributes.

This patch changes the deferred worklist to store pairs of (index, kind)
to track whether each deferred entry is a type or attribute. The
worklist processing logic is updated to resolve the correct entry type.
DeltaFile
+47-22mlir/lib/Bytecode/Reader/BytecodeReader.cpp
+10-2mlir/test/Bytecode/op_with_properties_deeply_nested_attr.mlir
+57-242 files

LLVM/project ce2357amlir/include/mlir/Bindings/Python IRCore.h NanobindUtils.h, mlir/lib/Bindings/Python IRCore.cpp IRAffine.cpp

[mlir][Python] downcast ir.Value to BlockArgument or OpResult
DeltaFile
+27-25mlir/lib/Bindings/Python/IRCore.cpp
+8-5mlir/include/mlir/Bindings/Python/IRCore.h
+1-1mlir/lib/Bindings/Python/IRAffine.cpp
+1-1mlir/include/mlir/Bindings/Python/NanobindUtils.h
+1-1mlir/test/python/dialects/python_test.py
+38-335 files

LLVM/project 26fdd8fclang/include/clang/CIR/Dialect/IR CIROps.td, clang/lib/CIR/Dialect/Transforms CXXABILowering.cpp

[CIR] Upstream support for data member comparison (#171897)

This adds support for handling data member pointer comparisons in CIR.
DeltaFile
+69-0clang/test/CIR/CodeGen/pointer-to-data-member-cmp.cpp
+16-1clang/lib/CIR/Dialect/Transforms/CXXABILowering.cpp
+12-0clang/lib/CIR/Dialect/Transforms/TargetLowering/LowerItaniumCXXABI.cpp
+4-0clang/lib/CIR/Dialect/Transforms/TargetLowering/CIRCXXABI.h
+0-3clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+1-0clang/include/clang/CIR/Dialect/IR/CIROps.td
+102-46 files

LLVM/project 8a7d8c1clang/lib/CodeGen CoverageMappingGen.cpp CodeGenPGO.cpp, llvm/lib/ProfileData/Coverage CoverageMapping.cpp

[Coverage] Make additional counters available for BranchRegion. NFC. (#120930)

`getBranchCounterPair()` allocates an additional Counter to SkipPath in
`SingleByteCoverage`.

`IsCounterEqual()` calculates the comparison with rewinding counter
replacements.

`NumRegionCounters` is updated to take additional counters in account.

`incrementProfileCounter()` has a few additiona arguments.

- `UseSkipPath=true`, to specify setting counters for SkipPath. It
assumes `UseSkipPath=false` is used together.

- `UseBoth` may be specified for marking another path. It introduces the
same effect as issueing `markStmtAsUsed(!SkipPath, S)`.

`llvm-cov` discovers counters in `FalseCount` to allocate `MaxCounterID`

    [6 lines not shown]
DeltaFile
+49-6clang/lib/CodeGen/CoverageMappingGen.cpp
+26-4clang/lib/CodeGen/CodeGenPGO.cpp
+23-1clang/lib/CodeGen/CodeGenFunction.h
+3-0llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
+1-0clang/lib/CodeGen/CodeGenPGO.h
+102-115 files

LLVM/project e971c3ellvm/lib/CodeGen CFIInstrInserter.cpp

[CFIInserter] Improve `CSRSavedLocation` struct. (#168869)

(1) Define `CSRSavedLocation::Kind` and use it in the code. This makes
the code more readable and allows to extend it to new kinds. For
example, soon I want to add "scalable offset from a given register"
kind.

(2) Store the contents in a union. This should reduce memory usage.
DeltaFile
+73-20llvm/lib/CodeGen/CFIInstrInserter.cpp
+73-201 files

LLVM/project 597ffbeclang/lib/Basic Targets.cpp, clang/lib/Basic/Targets OSTargets.h

Rename wasm32-wasi to wasm32-wasip1. (#165345)

This adds code to recognize "wasm32-wasip1", "wasm32-wasip2", and
"wasm32-wasip3" as explicit targets, and adds a deprecation warning when
the "wasm32-wasi" target is used, pointing users to the "wasm32-wasip1"
target.

Fixes #165344.

I'm filing this as a draft PR for now, as I've only just now proposed to
make this change in #165344.
DeltaFile
+36-0llvm/unittests/TargetParser/TripleTest.cpp
+33-2clang/lib/Basic/Targets/OSTargets.h
+23-8clang/test/Preprocessor/init.c
+22-8clang/lib/Basic/Targets.cpp
+9-0llvm/lib/TargetParser/Triple.cpp
+6-2llvm/include/llvm/TargetParser/Triple.h
+129-204 files not shown
+146-2010 files

LLVM/project 632a557clang-tools-extra/clang-doc/assets clang-doc-mustache.css navbar-template.mustache, clang-tools-extra/test/clang-doc basic-project.mustache.test

[clang-doc] Move navbar and sidebar into normal document flow (#175110)

The navbar and sidebar caused spacing and alignment issues since they
were fixed elements with defined height/width. It was difficult to have
all elements below them correctly offset the height. This patch changes
them
to sticky elements within the normal document flow that don't define
their
height/width explicitly. This actually lets us use existing HTML/CSS
properties (like the "content" div) more naturally.

This also changes the navbar behavior to not follow while scrolling.
DeltaFile
+26-24clang-tools-extra/clang-doc/assets/clang-doc-mustache.css
+12-12clang-tools-extra/test/clang-doc/basic-project.mustache.test
+7-7clang-tools-extra/clang-doc/assets/navbar-template.mustache
+3-1clang-tools-extra/clang-doc/assets/namespace-template.mustache
+3-1clang-tools-extra/clang-doc/assets/index-template.mustache
+3-1clang-tools-extra/clang-doc/assets/class-template.mustache
+54-466 files

LLVM/project ab5ec54libc/test/src/__support/wctype/conversion/utils enumerate_test.cpp CMakeLists.txt

add tests
DeltaFile
+74-0libc/test/src/__support/wctype/conversion/utils/enumerate_test.cpp
+12-0libc/test/src/__support/wctype/conversion/utils/CMakeLists.txt
+86-02 files

LLVM/project 30a0053libc/src/__support/wctype/conversion/utils enumerate.h CMakeLists.txt

use forward decl
DeltaFile
+6-7libc/src/__support/wctype/conversion/utils/enumerate.h
+1-0libc/src/__support/wctype/conversion/utils/CMakeLists.txt
+7-72 files

LLVM/project f323fd7libc/src/__support/wctype/conversion/utils enumerate.hpp CMakeLists.txt

[libc][wctype] Upstream enumerate header from PtrHash-cc prototype to LLVM libc
DeltaFile
+66-0libc/src/__support/wctype/conversion/utils/enumerate.hpp
+10-0libc/src/__support/wctype/conversion/utils/CMakeLists.txt
+76-02 files

LLVM/project c9d354alibc/src/__support/wctype/conversion/random vec512_storage.cpp imm.h

[libc][wctype] Upstream immintrin storage from PtrHash-cc prototype to LLVM libc
DeltaFile
+342-0libc/src/__support/wctype/conversion/random/vec512_storage.cpp
+268-0libc/src/__support/wctype/conversion/random/imm.h
+82-0libc/src/__support/wctype/conversion/random/vec512_storage.h
+76-0libc/src/__support/wctype/conversion/random/vec128_storage.h
+63-0libc/src/__support/wctype/conversion/random/vec256_storage.h
+60-0libc/src/__support/wctype/conversion/random/vec256_storage.cpp
+891-01 files not shown
+913-07 files

LLVM/project d35d4edlibc/src/__support/wctype/conversion CMakeLists.txt, libc/src/__support/wctype/conversion/random fastrand.h CMakeLists.txt

[libc][wctype] Upstream fastrand from PtrHash-cc prototype to LLVM libc
DeltaFile
+78-0libc/src/__support/wctype/conversion/random/fastrand.h
+7-0libc/src/__support/wctype/conversion/random/CMakeLists.txt
+1-0libc/src/__support/wctype/conversion/CMakeLists.txt
+86-03 files

LLVM/project 7deda18libc/src/__support/wctype/conversion/utils enumerate.h CMakeLists.txt

work around for no cpp::pair
DeltaFile
+5-3libc/src/__support/wctype/conversion/utils/enumerate.h
+1-3libc/src/__support/wctype/conversion/utils/CMakeLists.txt
+6-62 files

LLVM/project d426010libc/src/__support/wctype/conversion/utils enumerate.h enumerate.hpp

fix extension
DeltaFile
+70-0libc/src/__support/wctype/conversion/utils/enumerate.h
+0-70libc/src/__support/wctype/conversion/utils/enumerate.hpp
+70-702 files

LLVM/project dd87ffalibc/src/__support/wctype/conversion/random stdrng.h CMakeLists.txt

[libc][wctype] Upstream StdRng from PtrHash-cc prototype to LLVM libc
DeltaFile
+269-0libc/src/__support/wctype/conversion/random/stdrng.h
+10-0libc/src/__support/wctype/conversion/random/CMakeLists.txt
+279-02 files

LLVM/project 0216430libc/src/__support/wctype/conversion/utils enumerate.hpp

fix nesting
DeltaFile
+6-2libc/src/__support/wctype/conversion/utils/enumerate.hpp
+6-21 files

LLVM/project db8f098libc/src/__support/wctype/conversion/utils utils.h shared_utils.h, libc/test/src/__support/wctype/conversion/utils utils_test.cpp shared_utils_test.cpp

remove used once functions
DeltaFile
+0-377libc/src/__support/wctype/conversion/utils/utils.h
+0-236libc/test/src/__support/wctype/conversion/utils/utils_test.cpp
+52-0libc/src/__support/wctype/conversion/utils/shared_utils.h
+44-0libc/test/src/__support/wctype/conversion/utils/shared_utils_test.cpp
+2-2libc/src/__support/wctype/conversion/utils/CMakeLists.txt
+2-2libc/test/src/__support/wctype/conversion/utils/CMakeLists.txt
+100-6176 files

LLVM/project 8b09e47clang/include/clang/CIR/Dialect/IR CIROps.td, clang/lib/CIR/CodeGen CIRGenBuiltinX86.cpp

[CIR][X86] Add support for `cpuid`/`cpuidex` (#173197)

Adds support for the `__builtin_ia32_cpuid` and `__builtin_ia32_cpuidex`
X86 builtins.

Part of [167765](https://github.com/llvm/llvm-project/issues/167765).
DeltaFile
+149-0clang/test/CIR/CodeGenBuiltins/X86/ms-x86-intrinsics.c
+66-0clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+41-0clang/include/clang/CIR/Dialect/IR/CIROps.td
+9-1clang/lib/CIR/CodeGen/CIRGenBuiltinX86.cpp
+265-14 files

LLVM/project e21fcc2clang/include/clang/CIR/Dialect/IR CIROps.td, clang/lib/CIR/CodeGen CIRGenExprScalar.cpp

[CIR] Upstream handling for data member pointer casts (#171950)

This adds the CIR basic handling for casts of data member pointers. Cast
to bool and null, as well as member function pointer casts will be
handled in followup PRs.
DeltaFile
+135-0clang/test/CIR/CodeGen/pointer-to-data-member-cast.cpp
+54-0clang/include/clang/CIR/Dialect/IR/CIROps.td
+52-0clang/lib/CIR/Dialect/Transforms/TargetLowering/LowerItaniumCXXABI.cpp
+34-0clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp
+32-0clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+20-1clang/lib/CIR/Dialect/Transforms/CXXABILowering.cpp
+327-13 files not shown
+342-19 files

LLVM/project 5e78d5eflang/include/flang/Evaluate tools.h, flang/test/Lower/CUDA cuda-data-transfer.cuf

[flang][cuda] Update cuda data transfer rules for full managed assigment (#175243)

DeltaFile
+16-0flang/test/Lower/CUDA/cuda-data-transfer.cuf
+1-2flang/include/flang/Evaluate/tools.h
+17-22 files

LLVM/project a96cda0llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/AArch64 externally-used-copyables.ll

[SLP]Update deps for copyables operands, if the user is used several times in node

If the user instruction is used several times in the node, and in one
cases its operand is copyable, but in another is not, need to check all
operands to be sure we do not miss scheduling
DeltaFile
+259-0llvm/test/Transforms/SLPVectorizer/AArch64/externally-used-copyables.ll
+85-0llvm/test/Transforms/SLPVectorizer/X86/multi-parent-instr-copyable-regular.ll
+77-0llvm/test/Transforms/SLPVectorizer/X86/associate-copyable-non-copyable-op.ll
+8-25llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+2-5llvm/test/Transforms/SLPVectorizer/X86/non-schedulable-node-with-non-schedulable-parent.ll
+431-305 files

LLVM/project f223ebfbolt Maintainers.md

[BOLT] Add aaupov to X86 maintainers list
DeltaFile
+3-0bolt/Maintainers.md
+3-01 files

LLVM/project 456d693clang/lib/CodeGen CGOpenMPRuntime.cpp

Minor NFC refactor/cleanup.
DeltaFile
+35-40clang/lib/CodeGen/CGOpenMPRuntime.cpp
+35-401 files

LLVM/project 3834d26clang/docs OpenMPSupport.rst ReleaseNotes.rst

Update RST files.
DeltaFile
+4-0clang/docs/OpenMPSupport.rst
+2-0clang/docs/ReleaseNotes.rst
+6-02 files

LLVM/project fc10e3bclang/test/OpenMP target_data_use_device_ptr_fallback_codegen.cpp

Add clang codegen test.
DeltaFile
+27-0clang/test/OpenMP/target_data_use_device_ptr_fallback_codegen.cpp
+27-01 files

LLVM/project 92109afclang/lib/CodeGen CGOpenMPRuntime.cpp, offload/test/mapping/use_device_ptr target_data_use_device_ptr_class_member_fallback_nullify.cpp target_data_use_device_ptr_class_member_ref_fallback_nullify.cpp

[Clang][OpenMP] Initial codegen changes for `use_device_ptr(fb_nullify)`.
DeltaFile
+30-10clang/lib/CodeGen/CGOpenMPRuntime.cpp
+1-3offload/test/mapping/use_device_ptr/target_data_use_device_ptr_class_member_fallback_nullify.cpp
+1-3offload/test/mapping/use_device_ptr/target_data_use_device_ptr_class_member_ref_fallback_nullify.cpp
+1-3offload/test/mapping/use_device_ptr/target_data_use_device_ptr_var_fallback_nullify.cpp
+33-194 files

LLVM/project 9f20350llvm/lib/Target/AMDGPU AMDGPULowerKernelAttributes.cpp

[AMDGPU] Fix AMDGPULowerKernelAttributes not invalidating analysis (#175256)

Summary:
The new PM wasn't using the changed result which triggered failures
after https://github.com/llvm/llvm-project/pull/174112
DeltaFile
+4-2llvm/lib/Target/AMDGPU/AMDGPULowerKernelAttributes.cpp
+4-21 files

LLVM/project c7a3e5dmlir/include/mlir/Bindings/Python IRCore.h, mlir/lib/Bindings/Python IRCore.cpp

[mlir][Python] downcast ir.Value to BlockArgument or OpResult
DeltaFile
+23-13mlir/lib/Bindings/Python/IRCore.cpp
+8-5mlir/include/mlir/Bindings/Python/IRCore.h
+31-182 files

LLVM/project 75d82a2offload/test/mapping/use_device_ptr target_data_use_device_ptr_var_fallback_nullify.cpp target_data_use_device_ptr_class_member_ref_fallback_nullify.cpp

Update test checks to incorporate Parsing/Sema changes.
DeltaFile
+3-3offload/test/mapping/use_device_ptr/target_data_use_device_ptr_var_fallback_nullify.cpp
+3-3offload/test/mapping/use_device_ptr/target_data_use_device_ptr_class_member_ref_fallback_nullify.cpp
+3-3offload/test/mapping/use_device_ptr/target_data_use_device_ptr_class_member_fallback_nullify.cpp
+2-3offload/test/mapping/use_device_ptr/target_data_use_device_ptr_var_ref_fallback_nullify.cpp
+0-2offload/test/mapping/use_device_ptr/target_data_use_device_ptr_class_member_ref_fallback_preserve.cpp
+0-2offload/test/mapping/use_device_ptr/target_data_use_device_ptr_var_fallback_preserve.cpp
+11-164 files not shown
+11-2410 files