LLVM/project e744320utils/bazel/llvm-project-overlay/lldb BUILD.bazel

[Bazel] Fix Host target's exported headers to include windows (#213018)

When PR# 201283 added windows os select to the build of the Host target,
it missed the exported headers since the CI checks run only linux and
mac (and I hadn't gotten to this in my slow slog of windows bazel lldb
support). I found when translating to BUCK and running into this
compilation error on windows for buck2 built lldb.
Still cannot build and claude tells me the exclude is necessary to avoid
a duplicate.

claude assisted with bazel rule creation
DeltaFile
+4-0utils/bazel/llvm-project-overlay/lldb/BUILD.bazel
+4-01 files

LLVM/project d7c1e60llvm/test/Transforms/PhaseOrdering/X86 avg.ll, llvm/test/Transforms/SLPVectorizer/AArch64 trimmed-node-gather-cost.ll

[SLP]Recalculate gather costs after tree trimming

Gather node costs are computed against the set of vectorized nodes
available for reuse. Tree trimming changes that set, but the costs were
not recalculated: a gather that reused a trimmed-away vectorized value
kept its 0 cost, and the node transformed to a gather matched the same
sibling gather for a free reuse, so the buildvector cost was lost and
unprofitable trees were vectorized.

Recalculate costs of all gather nodes after trimming.

Fixes #212983

Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/213034
DeltaFile
+170-240llvm/test/Transforms/PhaseOrdering/X86/avg.ll
+19-139llvm/test/Transforms/SLPVectorizer/X86/pr46983.ll
+8-16llvm/test/Transforms/SLPVectorizer/X86/poor-throughput-seeds.ll
+11-9llvm/test/Transforms/SLPVectorizer/X86/multi-parent-instr-copyable-regular.ll
+8-9llvm/test/Transforms/SLPVectorizer/AArch64/trimmed-node-gather-cost.ll
+1-14llvm/test/Transforms/SLPVectorizer/X86/split-node-reused-in-later-vector.ll
+217-4272 files not shown
+227-4368 files

LLVM/project a853e6flibc/hdr/types struct_passwd.h, libc/include pwd.yaml

[libc] Add struct passwd type, pwd.yaml, and pwd_utils parser (#212421)

Added struct passwd type definition, pwd.yaml header specification, and
parse_passwd_line utility returning ErrorOr<struct passwd> for
colon-separated
password file parsing with hermetic unit tests.

Note: Additional POSIX pwd.h functions (getpwuid, getpwnam, getpwuid_r,
getpwnam_r, fgetpwent) are omitted from this initial change and will be
added in follow-up PRs.

* Added libc/include/llvm-libc-types/struct_passwd.h and proxy header
* Added libc/include/pwd.yaml header specification
* Added pwd_utils.h and pwd_utils.cpp implementing ErrorOr<struct
passwd> parse_passwd_line
* Added pwd.h to target public headers for linux architectures
* Added unit tests in libc/test/src/pwd/pwd_utils_test.cpp

Assisted-by: Automated tooling, human reviewed.
DeltaFile
+104-0libc/test/src/pwd/pwd_utils_test.cpp
+73-0libc/src/pwd/pwd_utils.cpp
+31-0libc/include/llvm-libc-types/struct_passwd.h
+30-0libc/src/pwd/pwd_utils.h
+26-0libc/include/pwd.yaml
+26-0libc/hdr/types/struct_passwd.h
+290-012 files not shown
+345-018 files

LLVM/project 09da485llvm/lib/Target/SPIRV SPIRVNonSemanticDebugHandler.cpp SPIRVAsmPrinter.cpp

Remove unused parameter.
DeltaFile
+1-2llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.h
+1-1llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp
+1-1llvm/lib/Target/SPIRV/SPIRVAsmPrinter.cpp
+3-43 files

LLVM/project 2a3f74fllvm/lib/Transforms/Vectorize VPlanTransforms.cpp

Update trunc combine, fix m_Not return position
DeltaFile
+4-4llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+4-41 files

LLVM/project e001308libcxx/src exception.cpp, libcxx/src/support/runtime exception_fallback.ipp

[libc++] Fix exception_fallback.ipp not compiling (#212961)
DeltaFile
+0-1libcxx/src/exception.cpp
+1-0libcxx/src/support/runtime/exception_fallback.ipp
+1-12 files

LLVM/project 3b2fe5allvm/test/Transforms/SLPVectorizer/AArch64 trimmed-node-gather-cost.ll

[SLP][NFC]Add a test with the non-profitable vectorization, NFC



Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/213028
DeltaFile
+133-0llvm/test/Transforms/SLPVectorizer/AArch64/trimmed-node-gather-cost.ll
+133-01 files

LLVM/project 11d7c9cllvm/tools/llvm-calc-occupancy llvm-calc-occupancy.cpp

[llvm-calc-occupancy] Fix build after SGPR queries moved to TargetParser (#213023)

Urgent buildbot fix for #208727.

That PR was developed before #209848, which moved the SGPR count queries
into TargetParser and removed
`AMDGPU::IsaInfo::getAddressableNumSGPRs()`, so
`llvm-calc-occupancy.cpp` fails to compile on current `main`:

```
llvm-calc-occupancy.cpp:229:41: error: no member named 'getAddressableNumSGPRs' in namespace 'llvm::AMDGPU::IsaInfo'
```

This switches to the equivalent
`GCNSubtarget::getAddressableNumSGPRs()`, which forwards to the
TargetParser version. All other `IsaInfo::*` calls in the file were
checked against the new API and are unaffected.

Verified locally: `ninja llvm-calc-occupancy` builds clean,
`llvm/test/tools/llvm-calc-occupancy` passes, and the reported
addressable SGPR count is unchanged (102 on gfx90a).
DeltaFile
+1-1llvm/tools/llvm-calc-occupancy/llvm-calc-occupancy.cpp
+1-11 files

LLVM/project cb0944coffload/unittests/OffloadAPI/device_code CMakeLists.txt, offload/unittests/OffloadAPI/program olCreateProgram.cpp

[offload][lit] Add jit unittest (#212860)

Basic test for the JIT path.

Context: https://github.com/llvm/llvm-project/pull/212823

---------

Signed-off-by: Nick Sarnie <nick.sarnie at intel.com>
DeltaFile
+19-0offload/unittests/OffloadAPI/program/olCreateProgram.cpp
+2-0offload/unittests/OffloadAPI/device_code/CMakeLists.txt
+21-02 files

LLVM/project b95468fclang/lib/Driver/ToolChains HIPSPV.h HIPSPV.cpp, clang/test/Driver hipspv-link-static-library.hip hipspv-pass-plugin.hip

[HIPSPV] Add in-tree SPIR-V backend support for chipStar (#206910)
DeltaFile
+125-35clang/lib/Driver/ToolChains/HIPSPV.cpp
+39-27clang/test/Driver/hipspv-toolchain.hip
+13-9clang/test/Driver/hipspv-pass-plugin.hip
+5-2clang/lib/Driver/ToolChains/HIPSPV.h
+2-1llvm/lib/Target/SPIRV/SPIRVSubtarget.cpp
+2-1clang/test/Driver/hipspv-link-static-library.hip
+186-756 files

LLVM/project 2d697f8clang/test/OpenMP loop_transform_final_iv.c reverse_codegen.cpp

[OpenMP] Restore loop variable values after loop-transformation constructs. (#212853)

This PR relands #208533 which was reverted in #212832 due to test
failures with iterator-based loops.

Original Change:
#208533 fixes loop variable finalization for OpenMP 6.0
loop-transformations constructs: tile, stripe, reverse, interchange and
fuse to comply with spec requirement page 371, lines 19-21. The spec
requires that "After the execution of the loop-transforming construct,
the loop-iteration variables of any of its transformation-affected loops
have the values that they would have without the loop-transforming
directive".

What's Fixed in This Reland:
The original implementation attempted to finalize all loop variables,
including iterators in range-based for loops (CXXForRangeStmt). This
caused issues because the finalization formula `final_value =
lower_bound + num_iterations * step` only applies to arithmetic types
(integers, floats).
DeltaFile
+192-98clang/test/OpenMP/interchange_codegen.cpp
+172-110clang/test/OpenMP/tile_codegen.cpp
+172-110clang/test/OpenMP/stripe_codegen.cpp
+216-66clang/test/OpenMP/fuse_codegen.cpp
+154-85clang/test/OpenMP/reverse_codegen.cpp
+129-0clang/test/OpenMP/loop_transform_final_iv.c
+1,035-4694 files not shown
+1,221-53410 files

LLVM/project 1001697llvm/lib/Target/SPIRV SPIRVNonSemanticDebugHandler.cpp

Fix rebase.
DeltaFile
+0-6llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp
+0-61 files

LLVM/project 3f3cecallvm/lib/Target/SPIRV SPIRVAsmPrinter.cpp SPIRVNonSemanticDebugHandler.h

[SPIRV] Drive DebugFunctionDefinition placement via begin/endInstruction

Replace the SPIRV-specific notifyMachineInstructionEmitted() callback with
DebugHandlerBase::beginInstruction()/endInstruction().
Keep notifyEntryLabelEmitted() for the synthesized entry OpLabel, which
has no MachineInstr.
DeltaFile
+22-14llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp
+8-12llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.h
+2-5llvm/lib/Target/SPIRV/SPIRVAsmPrinter.cpp
+32-313 files

LLVM/project 58077a9llvm/test/CodeGen/SPIRV/debug-info debug-function-definition.ll

Improve test.
DeltaFile
+19-4llvm/test/CodeGen/SPIRV/debug-info/debug-function-definition.ll
+19-41 files

LLVM/project 5ab44b1llvm/lib/Target/SPIRV SPIRVNonSemanticDebugHandler.h SPIRVNonSemanticDebugHandler.cpp

Remove CachedExtInstSetReg.
DeltaFile
+2-9llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp
+3-2llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.h
+5-112 files

LLVM/project 877b5d8llvm/lib/Target/SPIRV SPIRVNonSemanticDebugHandler.h SPIRVNonSemanticDebugHandler.cpp

Change signature.
DeltaFile
+4-5llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp
+2-2llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.h
+6-72 files

LLVM/project 9453fd1llvm/test/CodeGen/SPIRV/debug-info debug-function-definition.ll

Fix path check.
DeltaFile
+1-1llvm/test/CodeGen/SPIRV/debug-info/debug-function-definition.ll
+1-11 files

LLVM/project 3f996dallvm/lib/Target/SPIRV SPIRVNonSemanticDebugHandler.h

Keep original comment.
DeltaFile
+3-0llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.h
+3-01 files

LLVM/project 670862cllvm/lib/Target/SPIRV SPIRVAsmPrinter.cpp SPIRVNonSemanticDebugHandler.h, llvm/test/CodeGen/SPIRV/debug-info debug-function-definition-after-opvariable.ll debug-function-definition.ll

Implement support for NSDI DebugFunctionDefinition.
DeltaFile
+160-6llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp
+50-21llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.h
+40-0llvm/test/CodeGen/SPIRV/debug-info/debug-function-definition.ll
+36-0llvm/test/CodeGen/SPIRV/debug-info/debug-function-definition-after-opvariable.ll
+14-3llvm/lib/Target/SPIRV/SPIRVAsmPrinter.cpp
+300-305 files

LLVM/project 1fbaedbllvm/lib/Target/SPIRV SPIRVNonSemanticDebugHandler.cpp

Implement support for NSDI DebugFunction opcode.
DeltaFile
+6-0llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp
+6-01 files

LLVM/project 4278c4dllvm/lib/Target/SPIRV SPIRVNonSemanticDebugHandler.cpp

Simplify loops.
DeltaFile
+0-6llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp
+0-61 files

LLVM/project 640b8bcllvm/lib/Target/SPIRV SPIRVNonSemanticDebugHandler.cpp

Implement support for NSDI DebugFunction opcode.
DeltaFile
+6-0llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp
+6-01 files

LLVM/project f30df09llvm/lib/Target/Hexagon HexagonISelLowering.h HexagonISelLowering.cpp, llvm/test/CodeGen/Hexagon fminimum.ll fmaximum.ll

[Hexagon] Fix ISel error: LLVM: cannot select -fmaximum (#211283)

This patch adds a custom lowering for FMAXIMUM.
FMAXIMUM is NaN-propagating, and currently, we
don't have any hexagon instruction to support
that behaviour. The patch is also extended to
cover FMINIMUM as well.

Check if any of the inputs are NaN. If so,
propagate the NaN to the output, otherwise
return the maximum/minimum of the inputs,
using ISD::FMINNUM/ISD::FMAXNUM to run
Hexagon's F2_sfmin/F2_sfmax when no operand
is NaN. NaN is propagated (rather than
replaced with a new ConstantFP NaN node) to
avoid triggering a wrong C2_MUX selection in
ISD::SELECT.
DeltaFile
+72-0llvm/test/CodeGen/Hexagon/fminimum.ll
+72-0llvm/test/CodeGen/Hexagon/fmaximum.ll
+46-0llvm/lib/Target/Hexagon/HexagonISelLowering.cpp
+1-0llvm/lib/Target/Hexagon/HexagonISelLowering.h
+191-04 files

LLVM/project 409b7b4llvm/lib/Target/AArch64 AArch64ISelLowering.cpp

[NFC][AArch64ISelLowering] Use getExtractSubvector and getInsertSubvector helpers. (#213004)
DeltaFile
+79-152llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+79-1521 files

LLVM/project cf6335bllvm/lib/Target/X86 X86ISelLowering.cpp, llvm/test/CodeGen/X86 avx10_2bf16-fma.ll avx10_2bf16-arith-scalar.ll

[X86] Lower scalar bf16 arithmetic on AVX10.2 via packed ops (#212245)

Currently basic(fadd/fsub/fmul/fdiv/fsqrt/fma) bf16 operations, as they
are not natively supported, are expanded to f32 operations.
However with AVX10.2 there are packed versions for these operations
which should be used instead and are enabled with this PR.

Since there is no native bf16 register class I instead go through f16
since it matches its size and register class.
This conversion will end up getting optimized away leaving only the
intended packed operation.


I used AI to double check and expand on comments.
DeltaFile
+221-0llvm/test/CodeGen/X86/avx10_2bf16-arith-scalar.ll
+32-0llvm/lib/Target/X86/X86ISelLowering.cpp
+1-11llvm/test/CodeGen/X86/avx10_2bf16-fma.ll
+254-113 files

LLVM/project 44ef4c5flang/include/flang/Optimizer/Transforms Passes.td, flang/test/Driver mlir-pass-pipeline.f90 mlir-debug-pass-pipeline.f90

[flang][Transforms] Scope SelectOpsConversion to func::FuncOp
DeltaFile
+1-1flang/include/flang/Optimizer/Transforms/Passes.td
+1-0flang/test/Fir/basic-program.fir
+1-0flang/test/Driver/mlir-pass-pipeline.f90
+1-0flang/test/Driver/mlir-debug-pass-pipeline.f90
+1-0flang/test/Driver/bbc-mlir-pass-pipeline.f90
+5-15 files

LLVM/project be3dd0cflang/test/Fir/SelectOpsConversion select_case.fir

[flang][Transforms] Add @select_case_unsigned test for SelectOpsConversion
DeltaFile
+51-0flang/test/Fir/SelectOpsConversion/select_case.fir
+51-01 files

LLVM/project 9931586llvm/lib/Target/SPIRV SPIRVNonSemanticDebugHandler.cpp

Simplify loops.
DeltaFile
+2-7llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp
+2-71 files

LLVM/project 3a3fee2llvm/test/CodeGen/SPIRV/debug-info debug-function-namespace-scope.ll

Fix negative checks.
DeltaFile
+5-2llvm/test/CodeGen/SPIRV/debug-info/debug-function-namespace-scope.ll
+5-21 files

LLVM/project a6717b4llvm/test/CodeGen/SPIRV/debug-info debug-function.ll

Fix path separators.
DeltaFile
+1-1llvm/test/CodeGen/SPIRV/debug-info/debug-function.ll
+1-11 files