LLVM/project dc62e28flang/include/flang/Parser openmp-utils.h, flang/lib/Lower/OpenMP Utils.cpp

[flang][OpenMP] Implement utility to locate OmpClause in ODS, NFC (#184866)

Simplify looking for a specific clause in OmpDirectiveSpecification.
This is alternative to DirectiveStructureChecker::FindClause for when
the internal checker structures have not yet been updated in the AST
traversal.
DeltaFile
+31-40flang/lib/Semantics/check-omp-loop.cpp
+4-14flang/lib/Semantics/check-omp-structure.cpp
+3-7flang/lib/Lower/OpenMP/Utils.cpp
+10-0flang/lib/Parser/openmp-utils.cpp
+2-6flang/lib/Parser/parse-tree.cpp
+3-0flang/include/flang/Parser/openmp-utils.h
+53-676 files

LLVM/project 275a215flang/lib/Semantics check-acc-structure.cpp, flang/test/Lower/OpenACC acc-cache.f90

[flang][openacc] Relax semantic check on cache directive (#184887)

The specification doesn't really forbid the colon notation to be used to
specify the full array. Reference compiler accepts this and our lowering
can already handle it.
DeltaFile
+16-0flang/test/Lower/OpenACC/acc-cache.f90
+0-6flang/lib/Semantics/check-acc-structure.cpp
+2-4flang/test/Semantics/OpenACC/acc-cache-validity.f90
+18-103 files

LLVM/project a82e3a1llvm/lib/Target/AMDGPU SIInstructions.td, llvm/test/CodeGen/AMDGPU llvm.fptrunc.round.ll

[AMDGPU] add back the true16 pattern for cvt_pk_rtz (#184857)

I found that the `SupportedRoundMode` pattern for true16 mode is removed
in https://github.com/llvm/llvm-project/pull/177069 by mistake. Added it
back in this patch and add gfx11 to the test which runs true16 mode
DeltaFile
+364-111llvm/test/CodeGen/AMDGPU/llvm.fptrunc.round.ll
+9-1llvm/lib/Target/AMDGPU/SIInstructions.td
+373-1122 files

LLVM/project 9548db8libc/shared/math ffmaf128.h, libc/src/__support/math ffmaf128.h CMakeLists.txt

[libc][math] Refactor ffmaf128 into a header only. (#184751)

closes #175325 
part of #147386
DeltaFile
+34-0libc/src/__support/math/ffmaf128.h
+29-0libc/shared/math/ffmaf128.h
+12-1utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+11-0libc/src/__support/math/CMakeLists.txt
+2-4libc/src/math/generic/ffmaf128.cpp
+1-2libc/src/math/generic/CMakeLists.txt
+89-73 files not shown
+93-79 files

LLVM/project f629dc9clang/lib/CIR/CodeGen CIRGenBuiltinAArch64.cpp, clang/lib/CIR/FrontendAction CIRGenAction.cpp

Address PR comments
DeltaFile
+3-3clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp
+0-2clang/lib/CIR/FrontendAction/CIRGenAction.cpp
+3-52 files

LLVM/project 2253d5bclang/lib/CIR/CodeGen CIRGenBuiltinAArch64.cpp, clang/lib/CIR/FrontendAction CIRGenAction.cpp

[CIR][AArch64] Add missing lowerings for vceqz_* NEON builtins

Implement the remaining CIR lowerings for the AdvSIMD (NEON)
`vceqz{|q|d|s}_*` intrinsic group (bitwise equal to zero).

The `vceqzd_s64` variant was already supported; this patch completes
the rest of the group.

Tests for these intrinsics are moved from:
  test/CodeGen/AArch64/neon-misc.c
to:
  test/CodeGen/AArch64/neon/intrinsics.c

The implementation largely mirrors the existing lowering in
CodeGen/TargetBuiltins/ARM.cpp.

`emitCommonNeonBuiltinExpr` is introduced to support these lowerings.
`getNeonType` is moved without functional changes.


    [2 lines not shown]
DeltaFile
+726-68clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp
+370-8clang/test/CodeGen/AArch64/neon/intrinsics.c
+1-306clang/test/CodeGen/AArch64/neon-misc.c
+6-0clang/lib/CodeGen/TargetBuiltins/ARM.cpp
+2-0clang/lib/CIR/FrontendAction/CIRGenAction.cpp
+1,105-3825 files

LLVM/project 43adf57flang/lib/Optimizer/OpenACC/Support RegisterOpenACCExtensions.cpp, flang/test/Fir/OpenACC offload-livein-value-canonicalization.fir

[flang][acc] Handle ViewLike ops with OutlineRematerializationOpInterface in OffloadLiveInValueCanonicalization (#184218)

`fir::ConvertOp` implements both `ViewLikeOpInterface` and
`OutlineRematerializationOpInterface`. `fir.convert` is also used for
ptr-to-int conversions like `(!fir.ref<i32>) -> i64`. That is not really
a "view" — it converts a pointer to an integer — but
`ViewLikeOpInterface` is still attached, so `getOriginalValue` traces
through it to the underlying value.

When the underlying value is not a rematerialization candidate (e.g.,
`fir.alloca`, a block argument, or a `fir.call` result),
`isRematerializationCandidate` returns false and the `fir.convert` is
left as a live-in. This prevents `ACCImplicitData` from tracing back to
the original pointer to create the data mapping.

This PR:
1. Registers `fir::ConvertOp` with
`OutlineRematerializationOpInterface`.
2. Adds a fallback in `isRematerializationCandidate`: when the traced

    [16 lines not shown]
DeltaFile
+118-0flang/test/Fir/OpenACC/offload-livein-value-canonicalization.fir
+15-1mlir/lib/Dialect/OpenACC/Transforms/OffloadLiveInValueCanonicalization.cpp
+2-0flang/lib/Optimizer/OpenACC/Support/RegisterOpenACCExtensions.cpp
+135-13 files

LLVM/project aabae9dclang/lib/CIR/CodeGen CIRGenBuiltinAArch64.cpp, clang/lib/CodeGen/TargetBuiltins ARM.cpp

[Clang][CIR][AArch64] NFC: Cleanups in AArch64 builtins lowering (#184404)

This patch performs small cleanups and fixes in the AArch64 builtins
lowering code, with the goal of aligning the CIR path more closely
with the existing Clang CodeGen implementation.

Changes include:
* Make sure that `noundef` is consistently matched using `{{.*}}`.
* Rename `AArch64BuiltinInfo` to `armVectorIntrinsicInfo` for better
  consistency with the original CodeGen implementation.
* Simplify `emitAArch64CompareBuiltinExpr`, fix an incorrect
  assert condition (missing `!`) and make sure to use the input `kind`
  condition instead of hard-coding `cir::CmpOpKind::eq`.
* Improve and clarify comments.

No functional changes intended (NFC).
DeltaFile
+30-31clang/test/CodeGen/AArch64/neon/intrinsics.c
+30-22clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp
+11-1clang/lib/CodeGen/TargetBuiltins/ARM.cpp
+0-4clang/test/CodeGen/AArch64/neon/fullfp16.c
+71-584 files

LLVM/project f271caeclang/lib/AST/ByteCode Compiler.cpp, clang/lib/Tooling DependencyScanningTool.cpp

Rebase

Created using spr 1.3.7
DeltaFile
+595-0llvm/test/Transforms/LoopVectorize/multiple-argmin-argmax.ll
+153-136llvm/lib/Target/WebAssembly/WebAssemblyFixIrreducibleControlFlow.cpp
+243-0clang/test/CodeGenCXX/dllexport-inherited-ctor.cpp
+243-0llvm/test/CodeGen/AArch64/pcdphint-atomic-store.ll
+226-0clang/lib/AST/ByteCode/Compiler.cpp
+196-28clang/lib/Tooling/DependencyScanningTool.cpp
+1,656-164114 files not shown
+3,986-952120 files

LLVM/project 6b6b0dd. README.md

TEST
DeltaFile
+1-0README.md
+1-01 files

LLVM/project dfe7738mlir/include/mlir/Dialect/OpenACC OpenACCCGOps.td OpenACCOpsTypes.td, mlir/lib/Dialect/OpenACC/IR OpenACCCG.cpp

[mlir][acc] Add acc.compute_region and acc.par_width operations (#184864)

Introduce two new codegen operations to the acc dialect that model GPU
compute region execution and parallel launch configuration:
- acc.par_width: specifies a parallel dimension.
- acc.compute_region: wraps a region of code for GPU execution,
capturing
launch configuration (from acc.par_width results) and input values as
block arguments.

These operations bridge the gap between high-level OpenACC compute
constructs (acc.parallel, acc.kernels, acc.serial) and gpu.launch. The
passes that do these transformations will soon follow.

---------

Co-authored-by: Scott Manley <rscottmanley at gmail.com>
DeltaFile
+236-0mlir/lib/Dialect/OpenACC/IR/OpenACCCG.cpp
+194-0mlir/test/Dialect/OpenACC/ops-cg.mlir
+153-0mlir/include/mlir/Dialect/OpenACC/OpenACCCGOps.td
+20-0mlir/test/Dialect/OpenACC/invalid-cg.mlir
+8-0mlir/include/mlir/Dialect/OpenACC/OpenACCOpsTypes.td
+1-1mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td
+612-16 files

LLVM/project 6bd8820clang/lib/CIR/CodeGen CIRGenExprCXX.cpp CIRGenCleanup.cpp, clang/test/CIR/CodeGen new-delete.cpp

[CIR] Add support for delete cleanup after new operators (#184707)

This adds support for calling operator delete when an exception is
thrown during initialization following an operator new call.

This does not yet handle the case where a temporary object is
materialized during the object initialization. That case is marked by
the "setupCleanupBlockActivation" diagnostic in deactivateCleanupBlock
and will be implemented in a future change.
DeltaFile
+247-57clang/lib/CIR/CodeGen/CIRGenExprCXX.cpp
+164-0clang/test/CIR/CodeGen/new-delete.cpp
+21-2clang/lib/CIR/CodeGen/CIRGenCleanup.cpp
+19-0clang/lib/CIR/CodeGen/EHScopeStack.h
+10-0clang/lib/CIR/CodeGen/CIRGenCall.cpp
+10-0clang/lib/CIR/CodeGen/CIRGenFunction.h
+471-592 files not shown
+477-618 files

LLVM/project fea72daclang/lib/AST TypePrinter.cpp, clang/test/AST/HLSL ByteAddressBuffers-AST.hlsl Texture2D-vector-AST.hlsl

[HLSL] Fix interleaved vector and matrix return types in AST dump

HLSL vector and matrix types were previously printed with their closing
syntax (', N>') in 'printAfter', causing them to interleave with function
parameters when used as return types (e.g., 'vector<float (args), 4>').

This change moves the HLSL vector and matrix closing syntax into
'printBefore' when 'UseHLSLTypes' is enabled, ensuring the type is
printed completely before the parameter list.

Note that address space qualifiers are now printed after the type
(e.g., 'vector<float, 4>hlsl_device'). This is because
'canPrefixQualifiers' in 'TypePrinter.cpp' returns false for these types.
We cannot easily change this to check 'UseHLSLTypes' because
'canPrefixQualifiers' is a static method and does not have access to the
PrintingPolicy at that point.

Fixes interleaved output in HLSL AST tests.

Assisted-by: Gemini
DeltaFile
+60-40clang/lib/AST/TypePrinter.cpp
+30-30clang/test/AST/HLSL/ByteAddressBuffers-AST.hlsl
+27-27clang/test/AST/HLSL/Texture2D-vector-AST.hlsl
+16-16clang/test/AST/HLSL/Texture2D-scalar-AST.hlsl
+5-5clang/test/AST/HLSL/pch_with_matrix_element_accessor.hlsl
+2-2clang/test/SemaHLSL/BuiltIns/matrix-errors.hlsl
+140-1204 files not shown
+144-12410 files

LLVM/project f2cdf3fmlir/include/mlir/Dialect/Arith/IR ArithOpsInterfaces.td ArithOps.td, mlir/lib/Conversion/ArithToLLVM ArithToLLVM.cpp

Revert "[mlir][arith] Add `exact` to `index_cast{,ui}` (#183395)" (#184876)

This reverts commit 7ad2c6db54a0e77249f2edb3c589ccf4c930d455.

PR #183395 introduced the `exact` flag to `index_cast` and
`index_castui` and updated some canonicalization patterns.
These canonicalization patterns were found to be unsound. For example:

* `index_cast(index_cast(x)) -> x`
* where one first truncates and then widens x

the rewrite is unsound because information is lost on the first cast as
it **may** truncate the value of x, therefore losing information. The
`exact` flag was made to make this transformation sound. Its semantics
are that when the `exact` flag is present, then it is assumed that the
operand to index_cast does not lose information (i.e., fits perfectly in
the destination type).

In PR #183395, the canonicalization rule was rewritten such that would

    [25 lines not shown]
DeltaFile
+0-64mlir/test/Dialect/Arith/canonicalize.mlir
+0-52mlir/test/Conversion/ArithToLLVM/arith-to-llvm.mlir
+0-47mlir/include/mlir/Dialect/Arith/IR/ArithOpsInterfaces.td
+5-34mlir/include/mlir/Dialect/Arith/IR/ArithOps.td
+8-28mlir/lib/Conversion/ArithToLLVM/ArithToLLVM.cpp
+0-28mlir/test/Dialect/Arith/ops.mlir
+13-2532 files not shown
+24-2718 files

LLVM/project 9767894clang/lib/Sema SemaHLSL.cpp HLSLBuiltinTypeDeclBuilder.cpp, clang/test/AST/HLSL Texture2D-vector-AST.hlsl Texture2D-scalar-AST.hlsl

[HLSL] Implement Texture2D::Gather and Texture2D::GatherCmp (#183323)

Add the Gather functions for Texture2D. Variations for all components
are added (Red, Blue, Greed, Alpha). If targeting Vulkan then the
GatherCmp* function for a component other than 0 will result in an
error, as that will lead to invalid SPIR-V.

Part of https://github.com/llvm/llvm-project/issues/175630.

Assisted by: Gemini
DeltaFile
+726-0clang/test/AST/HLSL/Texture2D-vector-AST.hlsl
+722-0clang/test/AST/HLSL/Texture2D-scalar-AST.hlsl
+0-439clang/test/AST/HLSL/Texture2D-AST.hlsl
+183-0clang/test/CodeGenHLSL/resources/Texture2D-Gather.hlsl
+126-26clang/lib/Sema/SemaHLSL.cpp
+143-4clang/lib/Sema/HLSLBuiltinTypeDeclBuilder.cpp
+1,900-4699 files not shown
+2,151-47215 files

LLVM/project 16e41f7libclc/opencl/lib/amdgcn-amdhsa/workitem get_local_size.cl get_global_size.cl

libclc: Reimplement amdhsa dispatch size functions

Assume cov5 and use new ABI.
DeltaFile
+14-10libclc/opencl/lib/amdgcn-amdhsa/workitem/get_local_size.cl
+8-4libclc/opencl/lib/amdgcn-amdhsa/workitem/get_global_size.cl
+22-142 files

LLVM/project 6ae0e6dclang/lib/Driver Driver.cpp, clang/test/Driver empty_arg.c

Don't crash when given an empty input filename. (#184718)

Commands such as `clang -- ''` hit two different crash bugs: a buffer
overflow caused by using a `memcmp` that might be larger than the input,
and a bogus assert in the option parser when attempting typo correction.
DeltaFile
+2-0clang/test/Driver/empty_arg.c
+1-1clang/lib/Driver/Driver.cpp
+0-2llvm/lib/Option/OptTable.cpp
+3-33 files

LLVM/project add7b71llvm/lib/Target/RISCV RISCVInstrInfoP.td RISCVISelLowering.cpp

[RISCV] Add RISCVISD opcodes for PSHL/PSRL/PSRA and lower to them. (#184836)

We only support splat shift amounts. Previously we checked if the shift
amount was a splat_vector and considered it legal.

I don't think there is a guarantee that the splat_vector will stick
around as a splat_vector. It's safer if we capture the splat and create
a dedicated node with a scalar shift amount.
DeltaFile
+36-35llvm/lib/Target/RISCV/RISCVInstrInfoP.td
+19-6llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+55-412 files

LLVM/project 85858f6llvm/lib/Target/RISCV RISCVInstrInfo.td RISCVInstrInfoP.td, llvm/test/CodeGen/RISCV rv32p.ll

[RISCV] Use SSLAI for XLen saturating shift left by immediate on RV32. (#184848)

DeltaFile
+31-0llvm/test/CodeGen/RISCV/rv32p.ll
+1-1llvm/lib/Target/RISCV/RISCVInstrInfo.td
+1-0llvm/lib/Target/RISCV/RISCVInstrInfoP.td
+33-13 files

LLVM/project b54a8d2llvm/lib/Frontend/OpenMP OMPIRBuilder.cpp, llvm/unittests/Frontend OpenMPIRBuilderTest.cpp

Refactor createIteratorLoop to use OMPIRBuilder utility functions and make end-of-block insertion robust.

- Replace manual splitBasicBlock/branch with splitBB
  and redirectTo()
- When insertion point is at BB.end() and the block is terminated, split
  before the terminator so the original successor path is preserved
  through omp.it.cont
- Add test for unterminated blocks
DeltaFile
+66-0llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
+13-23llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+79-232 files

LLVM/project ede065aclang/lib/CodeGen/TargetBuiltins AMDGPU.cpp, clang/test/CodeGen amdgpu-abi-version.c

clang/AMDGPU: Do not emit __oclc_ABI_version references with environment (#184868)

Assume a sufficently new code object version if the environment is set
to something indicating we should have a real library.
DeltaFile
+39-20clang/test/CodeGen/amdgpu-abi-version.c
+5-0clang/lib/CodeGen/TargetBuiltins/AMDGPU.cpp
+44-202 files

LLVM/project 2894bb8llvm/include/llvm/CodeGen RegisterPressure.h, llvm/lib/Target/AMDGPU GCNRegPressure.cpp GCNRegPressure.h

[AMDGPU] Used LiveRegUnits for physical register pressure tracking.

Addressed review comments as well.
DeltaFile
+198-112llvm/test/CodeGen/AMDGPU/schedule-gcn-physreg-pressure.ll
+103-112llvm/lib/Target/AMDGPU/GCNRegPressure.cpp
+17-13llvm/lib/Target/AMDGPU/GCNRegPressure.h
+0-14llvm/include/llvm/CodeGen/RegisterPressure.h
+5-5llvm/test/CodeGen/AMDGPU/machine-scheduler-sink-trivial-remats.mir
+5-5llvm/test/CodeGen/AMDGPU/materialize-frame-index-sgpr.ll
+328-2611 files not shown
+333-2657 files

LLVM/project e693f0flldb/unittests/Target CMakeLists.txt

[lldb] Don't link TestingSupport as a component (#184310)

This doesn't work with dylib builds, because TestingSupport is not part
of the dylib. Instead, we should link it via LINK_LIBS, like other tests
already do.

(cherry picked from commit d1c563beee794b3a967786fd07c437ffc66fb7f0)
DeltaFile
+1-1lldb/unittests/Target/CMakeLists.txt
+1-11 files

LLVM/project 3952053lldb/source/Target Target.cpp, lldb/unittests/Target ScratchTypeSystemTest.cpp CMakeLists.txt

[lldb][Target] Allow eLanguageTypeAssembly to use ScratchTypeSystemClang (#183771)

After cleaning up some of our `LanguageType`/`SourceLangage`
round-tripping (see `7f51a2a47d2e706d04855b0e41690ebafa2b3238`), a CU
with `DW_LANG_MIPS_Assembler` will get a language type of
`eLanguageTypeAssembly` (as opposed to `eLanguageTypeMipsAssembler`).
Reason being that there is no `DW_LNAME_` (DWARFv6 language code) for
`MIPS Assembler`, only for generic `Assembly`. So it's not possible to
round-trip cleanly between pre-DWARFv6 and DWARFv6 language codes, which
LLDB relies on for storing language types (and will lean into more
heavily in the future). This broke a special provision we have where we
allow `ScratchTypeSystemClang` to be used when evaluating expressions in
assembly CUs (i.e., CUs where the debug-info explicitly sets the
language to assembly).

If we ever want to distinguish MIPS from other Assembly, the proper way
to do so is introduce a `DW_LNAME_Mips_Assembler`. For now, this patch
adds another case for `eLanguageTypeAssembly` in
`GetScratchTypeSystemForLanguage`.

    [9 lines not shown]
DeltaFile
+59-0lldb/unittests/Target/ScratchTypeSystemTest.cpp
+2-1lldb/source/Target/Target.cpp
+2-0lldb/unittests/Target/CMakeLists.txt
+63-13 files

LLVM/project ecd6f8clldb/include/lldb/Host ProcessRunLock.h, lldb/include/lldb/Target Process.h

Revert "Add the ability to "allow another thread to see the private state" mode. (#184272)"

This reverts commit 97572c1860efeeb97b5940927cee72081b61810a.

This patch seems to cause TestWatchpointCommandPython.py to time out
on the ubuntu buildbots (but nowhere else that I can find so far.)  The
timeout is weird too, the TEST FILE is timing out but the individual
tests aren't being shown and there's no other output.  Grrr...
Anyway I'll revert this and then see if I can do some guessing about
how this change might cause the test to fail.
DeltaFile
+20-79lldb/test/API/python_api/run_locker/TestRunLocker.py
+3-31lldb/include/lldb/Target/Process.h
+11-21lldb/source/Target/Process.cpp
+1-3lldb/source/Target/StopInfo.cpp
+0-2lldb/include/lldb/Host/ProcessRunLock.h
+35-1365 files

LLVM/project 5d2560clldb/include/lldb/Target Process.h

Revert "When hijacking events, don't let the user thread that was allowed"

This reverts commit a8af467fad7e5fff71643a3d6f2d06ac4f637e66.

This was a follow-on to 97572c1860efeeb97b5940927cee72081b61810a which was me
trying to guess why the ubuntu bots were failing with an entirely unhelpful
failure mode.  I'll have to figure out how I can reproduce this somewhere so
I can look at it for real.
DeltaFile
+1-14lldb/include/lldb/Target/Process.h
+1-141 files

LLVM/project c969b5flldb/test/API/python_api/run_locker TestRunLocker.py

Revert "Skip some tests on Windows.  They were already expected fail and"

This reverts commit 894408ded44151e4e34a3402210f671355d66310.

These tests were added by 97572c1860efeeb97b5940927cee72081b61810a
and I am reverting that as well.
DeltaFile
+2-3lldb/test/API/python_api/run_locker/TestRunLocker.py
+2-31 files

LLVM/project f8087adclang/lib/CodeGen/TargetBuiltins AMDGPU.cpp

typo
DeltaFile
+1-1clang/lib/CodeGen/TargetBuiltins/AMDGPU.cpp
+1-11 files

LLVM/project 4717366clang/lib/CodeGen/TargetBuiltins AMDGPU.cpp, clang/test/CodeGen amdgpu-abi-version.c

clang/AMDGPU: Do not emit __oclc_ABI_version references with environment

Assume a sufficently new code object version if the environment is set to
something indicating we should have a real library.
DeltaFile
+39-20clang/test/CodeGen/amdgpu-abi-version.c
+5-0clang/lib/CodeGen/TargetBuiltins/AMDGPU.cpp
+44-202 files

LLVM/project 753b81cclang-tools-extra/clang-doc Serialize.cpp Serialize.h, clang-tools-extra/clang-doc/benchmarks ClangDocBenchmark.cpp

[clang-doc] Introduce Serializer class

Serialization has mostly been done with static functions, but soon we
will need to share state, like alocator references. To avoid blowing up
our parameter lists, we can just wrap the local functions within a
class.
DeltaFile
+106-110clang-tools-extra/clang-doc/Serialize.cpp
+141-39clang-tools-extra/clang-doc/Serialize.h
+2-1clang-tools-extra/clang-doc/benchmarks/ClangDocBenchmark.cpp
+2-1clang-tools-extra/unittests/clang-doc/SerializeTest.cpp
+2-1clang-tools-extra/clang-doc/Mapper.cpp
+253-1525 files