LLVM/project 3aff10dmlir/lib/Conversion/XeVMToLLVM XeVMToLLVM.cpp, mlir/test/Conversion/XeVMToLLVM legalize_large_vector.mlir

[MLIR][XeVM] Update HandleVectorExtract pattern. (#191052)

Split loads only if pointer address space is private.
Splitting loads from non-private memory could hurt performance.
DeltaFile
+20-0mlir/test/Conversion/XeVMToLLVM/legalize_large_vector.mlir
+4-2mlir/lib/Conversion/XeVMToLLVM/XeVMToLLVM.cpp
+24-22 files

LLVM/project f39386bmlir/include/mlir/Conversion Passes.td, mlir/lib/Conversion/XeGPUToXeVM XeGPUToXeVM.cpp

[MLIR][XeVM] Update XeVM type converter (#189306)

Ideally, DLTI should be used for getting Index type which as it is tied
to bitwidth of pointer type that can be expressed with DLTI.
But currently, a separate pass option for bitwidth of Index type is used
in many passes.
GPU to XeVM lowering pipeline also use passes with such options.
But XeVM type converter does not provide a way to reflect choice of
Index type bitwidth and uses a hardcoded value.
This PR updates XeVM type converter to use Index type bitwidth from pass
option. This is done by using LLVM type converter for converting element
type instead of the previous custom logic.
In addition to handling Index type properly, by using LLVM type
converter, low precision float types are correctly converted to LLVM
supported types.
DeltaFile
+89-58mlir/lib/Conversion/XeGPUToXeVM/XeGPUToXeVM.cpp
+4-1mlir/lib/Dialect/GPU/Pipelines/GPUToXeVMPipeline.cpp
+4-0mlir/include/mlir/Conversion/Passes.td
+97-593 files

LLVM/project 2490ee3clang/include/clang/CIR/Dialect/IR CIRAttrs.td, clang/lib/CIR/CodeGen CIRGenRecordLayoutBuilder.cpp

[CIR][ABI] Add ABI metadata fields to RecordType (#188300)

Store AST-derived layout information on `cir::RecordType` so that ABI
lowering passes (which have no AST access) can make correct calling
convention decisions.

The five new fields on `RecordTypeStorage` are: `triviallyCopyable`
(from `canPassInRegisters`), `triviallyDestructible` (from
`hasTrivialDestructor`), `isEmpty` (from
`CXXRecordDecl::isEmpty`/`field_empty`), `dataSizeInBits` (from
`ASTRecordLayout::getDataSize`), and `recordAlignInBytes` (from
`ASTRecordLayout::getAlignment`). They're set during
`computeRecordLayout` and are not part of the printed/parsed CIR text.
The `complete()` signature uses defaults so existing callers don't need
changes.

Anonymous records (created by passes, not CIRGen) default to trivially
copyable/destructible since they represent synthetic aggregates like
member pointer lowering tuples.

    [2 lines not shown]
DeltaFile
+91-0clang/unittests/CIR/RecordTypeMetadataTest.cpp
+62-0clang/include/clang/CIR/Dialect/IR/CIRAttrs.td
+30-0clang/lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp
+29-0clang/test/CIR/CodeGen/record-type-metadata.cpp
+7-8clang/lib/CIR/Dialect/IR/CIRTypes.cpp
+14-0clang/lib/CIR/Dialect/IR/CIRAttrs.cpp
+233-86 files not shown
+256-912 files

LLVM/project ab64532llvm/utils/gn/secondary/lldb/test BUILD.gn

[gn] port 6175a4d455e1 (#191503)
DeltaFile
+1-1llvm/utils/gn/secondary/lldb/test/BUILD.gn
+1-11 files

LLVM/project 9e5d363llvm/lib/Target/AMDGPU SIInsertWaitcnts.cpp

[AMDGPU][SIInsertWaitcnts][NFC] Drop `using llvm::AMDGPU` (#180782)

This is a followup patch for PR
https://github.com/llvm/llvm-project/pull/178345 which introduced `using
llvm::AMDGPU` to keep the patch size small.
DeltaFile
+361-327llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
+361-3271 files

LLVM/project 644cd1bllvm/lib/Target/AMDGPU AMDGPULowerVGPREncoding.cpp, llvm/test/CodeGen/AMDGPU vgpr-setreg-mode-swar.mir hazard-setreg-vgpr-msb-gfx1250.mir

[AMDGPU] Refactor setreg handling in the VGPR MSB lowering

It can skip inserting S_SET_VGPR_MSB if we set the mode via
piggybacking. We are now relying on the HW bug for correct
behavior. If/when the bug is fixed lowering will be incorrect.

SETREG is not a piggybacking target anymore. Instead piggybacking is
disabled if we have seen a SETREG since the last mode change.
DeltaFile
+117-48llvm/test/CodeGen/AMDGPU/vgpr-setreg-mode-swar.mir
+14-34llvm/lib/Target/AMDGPU/AMDGPULowerVGPREncoding.cpp
+9-3llvm/test/CodeGen/AMDGPU/hazard-setreg-vgpr-msb-gfx1250.mir
+140-853 files

LLVM/project 11d4f83llvm/lib/Target/SystemZ SystemZAsmPrinter.cpp

Fix formatting
DeltaFile
+1-2llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp
+1-21 files

LLVM/project 130378cllvm/include/llvm/MC MCAsmStreamer.h, llvm/lib/MC MCAsmStreamer.cpp

[MC] Move addEncodingComment() into new base class MCAsmBaseStreamer

This is in preparation to use this functionality in the
SystemZHLASMAsmStreamer. No functional change.
DeltaFile
+122-132llvm/lib/MC/MCAsmStreamer.cpp
+32-1llvm/include/llvm/MC/MCAsmStreamer.h
+154-1332 files

LLVM/project efeb937llvm/lib/Target/SystemZ SystemZAsmPrinter.cpp SystemZAsmPrinter.h

Move logic for argument area length.
DeltaFile
+16-16llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp
+1-1llvm/lib/Target/SystemZ/SystemZAsmPrinter.h
+17-172 files

LLVM/project dd2ba5bllvm/lib/Target/AMDGPU AMDGPURewriteAGPRCopyMFMA.cpp

[AMDGPU] Added a debug counter to Rewrite AGPR-Copy-MFMA pass (#189437)

The debug counter can be used to control the MFMA chains rewritten to
AGPR form.
DeltaFile
+6-1llvm/lib/Target/AMDGPU/AMDGPURewriteAGPRCopyMFMA.cpp
+6-11 files

LLVM/project d9c5a06llvm/lib/Target/SystemZ SystemZAsmPrinter.cpp, llvm/test/CodeGen/SystemZ zos-hlasm-out.ll zos-jumptable.ll

Also make name of function part of the label denoting end of function.

This should help with matching the end.
DeltaFile
+1-1llvm/test/CodeGen/SystemZ/zos-hlasm-out.ll
+1-1llvm/test/CodeGen/SystemZ/zos-jumptable.ll
+1-1llvm/test/CodeGen/SystemZ/zos-ppa1.ll
+1-1llvm/test/CodeGen/SystemZ/zos-prologue-epilog.ll
+1-1llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp
+5-55 files

LLVM/project 12b21d9clang/unittests/Basic CharInfoTest.cpp

remove accidentially duplicated include

Created using spr 1.3.8-wip
DeltaFile
+0-1clang/unittests/Basic/CharInfoTest.cpp
+0-11 files

LLVM/project b35caa4clang/unittests/Basic CharInfoTest.cpp, clang/unittests/Frontend CompilerInstanceTest.cpp

add fixes for unit tests

Created using spr 1.3.8-wip
DeltaFile
+1-1clang/unittests/Basic/CharInfoTest.cpp
+1-1clang/unittests/Frontend/CompilerInstanceTest.cpp
+2-22 files

LLVM/project 2e34ed9libc/test/src/stdio rewind_test.cpp, llvm/test/Analysis/LoopAccessAnalysis nssw-predicate-implied.ll nusw-predicates.ll

Merge branch 'main' into users/rampitec/preserve-msb
DeltaFile
+108-0llvm/test/Analysis/LoopAccessAnalysis/nssw-predicate-implied.ll
+96-0llvm/test/Analysis/LoopAccessAnalysis/nusw-predicates.ll
+82-0llvm/test/Transforms/LoopVectorize/runtime-check-small-clamped-bounds.ll
+76-0libc/test/src/stdio/rewind_test.cpp
+16-16llvm/test/CodeGen/WebAssembly/cfg-stackify-eh-legacy.ll
+16-16llvm/test/CodeGen/WebAssembly/cfg-stackify-eh.ll
+394-3225 files not shown
+576-7831 files

LLVM/project 41ade98llvm/lib/Target/WebAssembly WebAssemblyCFGStackify.cpp, llvm/test/CodeGen/WebAssembly cfg-stackify-eh-legacy.ll cfg-stackify-eh.ll

[WebAssembly] Fix attributes of exception_grouping_2 test (#191466)

Function calls in `exception_grouping_2` test had incorrect attribute
numbers, making many of them incorrectly `noreturn`, rendering many BBs
after them unreachable. As a result of them, the function became a
trivial single-BB and the test passsed because it didn't have any
exceptions in it. I think this happened because I created that test in
another file and later pasted the function into these files, which had
different attribute numbers.

This also has a few drive-by comment typo fixes.
DeltaFile
+16-16llvm/test/CodeGen/WebAssembly/cfg-stackify-eh-legacy.ll
+16-16llvm/test/CodeGen/WebAssembly/cfg-stackify-eh.ll
+1-1llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
+33-333 files

LLVM/project 7a4a1e9llvm/test/Analysis/LoopAccessAnalysis nssw-predicate-implied.ll nusw-predicates.ll, llvm/test/Transforms/LoopVectorize runtime-check-small-clamped-bounds.ll

[LV,LAA] Add tests showing incorrect SCEV predicate reasoning. (NFC) (#191443)

Add test cases for https://github.com/llvm/llvm-project/issues/191382.
DeltaFile
+108-0llvm/test/Analysis/LoopAccessAnalysis/nssw-predicate-implied.ll
+96-0llvm/test/Analysis/LoopAccessAnalysis/nusw-predicates.ll
+82-0llvm/test/Transforms/LoopVectorize/runtime-check-small-clamped-bounds.ll
+286-03 files

LLVM/project c93431eflang/test/Lower/OpenMP atomic-capture-complex.f90, llvm/lib/Frontend/OpenMP OMPIRBuilder.cpp

[OpenMP][OMPIRBuilder] Support complex types in atomic update/capture

Route struct-typed values through the libcall path in
`emitAtomicUpdate`.

Previously, the libcall path was gated on `RMWOp == BAD_BINOP`, so
atomic capture swap patterns (`v = x; x = expr`) for complex values
lowered as structs fell through to the cmpxchg path. That path called
`getScalarSizeInBits()` on a struct type, produced 0, and triggered an
assertion in `IntegerType::get()`.

Remove the `BAD_BINOP` restriction so struct types always use the
libcall path. This is safe because the libcall path does not use
`RMWOp` and already handles arbitrary type sizes correctly.

Also fix `LoadSize` in the libcall path to use `XElemTy` rather than
the pointer type, which previously gave the wrong size for larger
complex types such as `complex(8)`.


    [3 lines not shown]
DeltaFile
+34-0flang/test/Lower/OpenMP/atomic-capture-complex.f90
+22-0mlir/test/Target/LLVMIR/openmp-llvm.mlir
+5-8llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+61-83 files

LLVM/project 20dc214clang/docs ReleaseNotes.rst, clang/lib/Sema SemaDeclCXX.cpp

[clang] fix crash on qualified friend function definitions  (#186398)

This patch fixes a crash caused by qualified friend function definitions
and We now recover early by diagnosing the invalid qualifier and
clearing the scope
fixes #185341
DeltaFile
+17-0clang/test/SemaCXX/gh185341.cpp
+13-2clang/lib/Sema/SemaDeclCXX.cpp
+1-0clang/docs/ReleaseNotes.rst
+31-23 files

LLVM/project 2ae4dddclang/include/clang/ScalableStaticAnalysisFramework/Analyses/EntityPointerLevel EntityPointerLevel.h, clang/include/clang/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage UnsafeBufferUsage.h UnsafeBufferUsageExtractor.h

Revert "[NFC][SSAF] Move EntityPointerLevel to a separate folder" (#191481)

Reverts llvm/llvm-project#191331

A set of bots are broken. For more examples check the reverted PR.
https://lab.llvm.org/buildbot/#/builders/225/builds/5596
Example:
```
   30 | ssaf::getUnsafeBuffers(const UnsafeBufferUsageEntitySummary &S) {
      | ^~~~
clang/include/clang/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage/UnsafeBufferUsage.h:30:3: note: only here as a ‘friend’
   30 |   getUnsafeBuffers(const UnsafeBufferUsageEntitySummary &);
      |   ^~~~~~~~~~~~~~~~
FAILED: clang/lib/ScalableStaticAnalysisFramework/Analyses/EntityPointerLevel/EntityPointerLevel.cpp:61:5: error: qualified name does not name a class before ‘:’ token
   61 |     : ConstStmtVisitor<EntityPointerLevelTranslator,
      |     ^
```
DeltaFile
+0-244clang/lib/ScalableStaticAnalysisFramework/Analyses/EntityPointerLevel/EntityPointerLevel.cpp
+213-7clang/lib/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage/UnsafeBufferUsageExtractor.cpp
+0-99clang/include/clang/ScalableStaticAnalysisFramework/Analyses/EntityPointerLevel/EntityPointerLevel.h
+67-1clang/include/clang/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage/UnsafeBufferUsage.h
+5-0clang/include/clang/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage/UnsafeBufferUsageExtractor.h
+4-0clang/lib/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage/UnsafeBufferUsage.cpp
+289-3512 files not shown
+292-3538 files

LLVM/project 05ffd0dclang/include/clang/CIR/Dialect/IR CIRTypes.td, clang/lib/CIR/CodeGen CIRGenModule.cpp CIRGenModule.h

[CIR] Handle globals with vptr init (#191291)

When a class contains virtual functions but no data members and has a
trivial constructor, global variables of that type are initialized with
a vptr. CIR was incorrectly creating the global variable with the type
of the vtable (an anonymous record) rather than the class type.

When replacing structors with aliases, we were calling a function to
update argument types at the call sites, but this was only necessary
because we initially generated the call using the same incorrect type
that we used for the global. The type correction wasn't implemented
because we hadn't encountered a case where it was needed. Having found
such a case led me to diagnose the problem as above, and I verified that
the same test case compiled without -mconstructor-aliases just failed in
the verifier because we never hit the replacement code. I'm now
convinced that this argument type fixup isn't necessary, so I replaced
the fixup function with an assert.

Assisted-by: Cursor / claude-4.6-opus-high
DeltaFile
+13-15clang/lib/CIR/CodeGen/CIRGenModule.cpp
+16-0clang/test/CIR/CodeGen/global-ptr-init.cpp
+0-5clang/lib/CIR/CodeGen/CIRGenModule.h
+3-1clang/lib/CIR/CodeGen/CIRGenExprConstant.cpp
+3-0clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+1-0clang/include/clang/CIR/Dialect/IR/CIRTypes.td
+36-216 files

LLVM/project ded4480llvm/lib/Target/AMDGPU AMDGPULowerVGPREncoding.cpp, llvm/test/CodeGen/AMDGPU vgpr-setreg-mode-swar.mir hazard-setreg-vgpr-msb-gfx1250.mir

[AMDGPU] Fix setreg handling in the VGPR MSB lowering

There are multiple issues with it:

1. It can skip inserting S_SET_VGPR_MSB if we set the mode via
   piggybacking. We are now relying on the HW bug for correct
   behavior. If/when the bug is fixed lowering will be incorrect.
2. We should just unconditionally update MSBs if immediate allows it.
   We shall set correct bits and keep the rest of the immediate
   (that is done). There is no reasonable way for an user to change
   MSBs nor does it do anything good to set it with SETREG and then
   immediately overwrite with S_SET_VGPR_MSB.
3. We can always update immediate if Offset is zero.
4. Redundant mode changes created as seen in the
   hazard-setreg-vgpr-msb-gfx1250.mir.

With unconditional immediate update most of time and not relying on
the SETREG for setting MSBs there is no good reason to complicate
handling by supporting SETREG as a piggybacking target. Moreover,

    [10 lines not shown]
DeltaFile
+118-49llvm/test/CodeGen/AMDGPU/vgpr-setreg-mode-swar.mir
+15-35llvm/lib/Target/AMDGPU/AMDGPULowerVGPREncoding.cpp
+9-3llvm/test/CodeGen/AMDGPU/hazard-setreg-vgpr-msb-gfx1250.mir
+142-873 files

LLVM/project 2ac04cdllvm/lib/Target/AMDGPU AMDGPULowerVGPREncoding.cpp, llvm/test/CodeGen/AMDGPU vgpr-setreg-mode-swar.mir

[AMDGPU] Preserve old MSBs when handling SETREG
DeltaFile
+1-1llvm/test/CodeGen/AMDGPU/vgpr-setreg-mode-swar.mir
+1-1llvm/lib/Target/AMDGPU/AMDGPULowerVGPREncoding.cpp
+2-22 files

LLVM/project e4b93b7libc/include stdio.yaml, libc/src/stdio rewind.h

[libc] implement rewind (#191302)

Add the "rewind" function defined in the C standard, and adds tests.
DeltaFile
+76-0libc/test/src/stdio/rewind_test.cpp
+28-0libc/src/stdio/generic/rewind.cpp
+21-0libc/src/stdio/rewind.h
+18-0libc/test/src/stdio/CMakeLists.txt
+13-0libc/src/stdio/generic/CMakeLists.txt
+6-0libc/include/stdio.yaml
+162-04 files not shown
+166-010 files

LLVM/project 2cd49f7flang/include/flang/Semantics openmp-utils.h, flang/lib/Semantics openmp-utils.cpp check-omp-loop.cpp

[flang][OpenMP] Rename GetRequiredCount to GetMinimumSequenceCount (#191465)

The new name better describes the calculated value.

Also adjust a diagnostic message to say that *at least* N loops are
expected in the sequence.
DeltaFile
+5-5flang/lib/Semantics/openmp-utils.cpp
+5-4flang/include/flang/Semantics/openmp-utils.h
+2-2flang/lib/Semantics/check-omp-loop.cpp
+1-1flang/test/Semantics/OpenMP/loop-transformation-clauses01.f90
+1-1flang/test/Semantics/OpenMP/fuse1.f90
+14-135 files

LLVM/project 86c307dclang-tools-extra/clang-doc Representation.cpp

[clang-doc] Consolidate merging logic (#190051)

As we migrate things in the arena, this logic may get more complex.
Factoring it out now, will give clear extension points to make this
easier to manage.
DeltaFile
+10-9clang-tools-extra/clang-doc/Representation.cpp
+10-91 files

LLVM/project 1a3cf72clang/include/clang/ScalableStaticAnalysisFramework/Analyses/EntityPointerLevel EntityPointerLevel.h, clang/include/clang/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage UnsafeBufferUsage.h UnsafeBufferUsageExtractor.h

[NFC][SSAF] Move EntityPointerLevel to a separate folder (#191331)

EntityPointerLevel will later be shared with other summaries besides
UnsafeBufferUsage. This commit moves it to a separate file.
DeltaFile
+244-0clang/lib/ScalableStaticAnalysisFramework/Analyses/EntityPointerLevel/EntityPointerLevel.cpp
+7-213clang/lib/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage/UnsafeBufferUsageExtractor.cpp
+99-0clang/include/clang/ScalableStaticAnalysisFramework/Analyses/EntityPointerLevel/EntityPointerLevel.h
+1-67clang/include/clang/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage/UnsafeBufferUsage.h
+0-5clang/include/clang/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage/UnsafeBufferUsageExtractor.h
+0-4clang/lib/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage/UnsafeBufferUsage.cpp
+351-2892 files not shown
+353-2928 files

LLVM/project f0004d8compiler-rt/lib/scudo/standalone combined.h, compiler-rt/lib/scudo/standalone/tests combined_test.cpp

[scudo] Remove fill when realloc to smaller size. (#191321)

In the reallocate function, when there is a realloc smaller than the
current size, the code would attempt to fill in the bytes after the new
size. This doesn't really add any extra security and is mostly a waste
of time, so skip it.

Remove the test that verifies this functionality.
DeltaFile
+27-43compiler-rt/lib/scudo/standalone/combined.h
+0-6compiler-rt/lib/scudo/standalone/tests/combined_test.cpp
+27-492 files

LLVM/project 6ce8481llvm/lib/Target/AMDGPU AMDGPULowerVGPREncoding.cpp, llvm/test/CodeGen/AMDGPU vgpr-setreg-mode-swar.mir hazard-setreg-vgpr-msb-gfx1250.mir

[AMDGPU] Always update SETREG MSBs if offset is 0 (#191362)

We can always update immediate if Offset is zero. The bits
HW will write are always at the same position if offset is 0.

In particular it removes redundant mode changes created as seen
in the hazard-setreg-vgpr-msb-gfx1250.mir.

This still relies on the wrong behavior that SETREG updates
MSBs, so it will have to be changed later. Test immediates may be
off from desired for that reason in this patch.
DeltaFile
+106-13llvm/test/CodeGen/AMDGPU/vgpr-setreg-mode-swar.mir
+10-22llvm/test/CodeGen/AMDGPU/hazard-setreg-vgpr-msb-gfx1250.mir
+5-4llvm/lib/Target/AMDGPU/AMDGPULowerVGPREncoding.cpp
+121-393 files

LLVM/project d2a70ccllvm/lib/Target/AArch64 AArch64StackTagging.cpp, llvm/test/CodeGen/AArch64 O0-pipeline.ll O3-pipeline.ll

[spr] initial version

Created using spr 1.3.8-wip
DeltaFile
+12-4llvm/lib/Target/AArch64/AArch64StackTagging.cpp
+1-6llvm/test/CodeGen/AArch64/O0-pipeline.ll
+0-4llvm/test/CodeGen/AArch64/O3-pipeline.ll
+13-143 files

LLVM/project 4919d27clang-tools-extra/clang-doc Serialize.cpp Representation.cpp, clang-tools-extra/clang-doc/benchmarks ClangDocBenchmark.cpp

[clang-doc] Use distinct APIs for fixed arena allocation sites

Typically, code either always emits data into the TransientArena or the
PersistentArena. Use more explicit APIs to convey the intent directly
instead of relying on parameters or defaults.
DeltaFile
+18-17clang-tools-extra/clang-doc/Serialize.cpp
+7-8clang-tools-extra/clang-doc/Representation.cpp
+7-7clang-tools-extra/clang-doc/BitcodeReader.cpp
+8-3clang-tools-extra/clang-doc/Representation.h
+3-3clang-tools-extra/clang-doc/benchmarks/ClangDocBenchmark.cpp
+43-385 files