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

LLVM/project a7d0644clang-tools-extra/clang-doc Representation.h

[clang-doc][nfc] Reformat and revise comment block
DeltaFile
+9-12clang-tools-extra/clang-doc/Representation.h
+9-121 files

LLVM/project 582e3e7clang-tools-extra/clang-doc Serialize.cpp Serialize.h

[clang-doc] Removed OwnedPtr alias

The alias served a purpose during migration, but now conveys the wrong
semantics, as the memory of these pointers is generally interned inside
a local arena.
DeltaFile
+40-38clang-tools-extra/clang-doc/Serialize.cpp
+29-42clang-tools-extra/clang-doc/Serialize.h
+17-18clang-tools-extra/clang-doc/Representation.cpp
+3-14clang-tools-extra/clang-doc/Representation.h
+8-8clang-tools-extra/clang-doc/JSONGenerator.cpp
+8-6clang-tools-extra/clang-doc/Generators.h
+105-12610 files not shown
+145-16616 files

LLVM/project f88a3d9clang-tools-extra/clang-doc Representation.h Representation.cpp, clang-tools-extra/clang-doc/benchmarks ClangDocBenchmark.cpp

[clang-doc] Update type aliases

Many of the type aliases we introduced to simplify migration to arena
allocation  are no longer relevant after completing the migration. We
can use more relevant names and remove dead aliases.
DeltaFile
+13-25clang-tools-extra/clang-doc/Representation.h
+9-9clang-tools-extra/unittests/clang-doc/BitcodeTest.cpp
+4-4clang-tools-extra/clang-doc/Representation.cpp
+4-4clang-tools-extra/clang-doc/benchmarks/ClangDocBenchmark.cpp
+4-4clang-tools-extra/unittests/clang-doc/MergeTest.cpp
+4-4clang-tools-extra/unittests/clang-doc/ClangDocTest.cpp
+38-505 files not shown
+47-5911 files

LLVM/project df93913clang-tools-extra/clang-doc BitcodeReader.cpp BitcodeReader.h

[clang-doc] Simplify parsing and reading bitcode blocks

Much of the logic int he readBlock implementation is boilerplate, and is
repeated for each implementation/specialization. This will become much
worse as we introduce new custom block reading logic as we migrate
towards arena allocation. In preparation for that, we're introducing the
change in logic now, which should make later refactoring much more
straightforward.
DeltaFile
+103-120clang-tools-extra/clang-doc/BitcodeReader.cpp
+5-0clang-tools-extra/clang-doc/BitcodeReader.h
+1-1clang-tools-extra/clang-doc/Representation.h
+109-1213 files

LLVM/project 0d56841clang-tools-extra/clang-doc Representation.cpp Representation.h

[clang-doc] Support deep copy between arenas for merging

Upcoming changes to the merge step will necessitate that we clear the
transient arenas and merge new items into the persistent arena. However
there are some challenges with that, as the existing types typically
don't want to be copied. We introduce some new APIs to simplify that
task and ensure we don't accidentally leak memory.

On the performance front, we reclaim about 2% of the overhead, bringing
the cumulative overhead from the series of patches down to about 7% over
the baseline.

| Metric | Baseline | Prev | This | Culm% | Seq% |
| :--- | :--- | :--- | :--- | :--- | :--- |
| Time | 920.5s | 1014.5s | 991.5s | +7.7% | -2.3% |
| Memory | 86.0G | 39.9G | 40.0G | -53.4% | +0.3% |

| Benchmark | Baseline | Prev | This | Culm% | Seq% |
| :--- | :--- | :--- | :--- | :--- | :--- |

    [28 lines not shown]
DeltaFile
+140-21clang-tools-extra/clang-doc/Representation.cpp
+30-0clang-tools-extra/clang-doc/Representation.h
+170-212 files

LLVM/project 4b38757clang-tools-extra/clang-doc Representation.cpp

[clang-doc] Consolidate merging logic

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 d56067dclang-tools-extra/clang-doc BitcodeReader.cpp Serialize.cpp, clang-tools-extra/unittests/clang-doc SerializeTest.cpp MergeTest.cpp

[clang-doc] Move Info types into arenas

Info types used to own significant chunks of data. As we move these into
local arenas, these types must be trivially destructible, to avoid
leaking resources when the arena is reset. Unfortunaly, there isn't a
good way to transition all the data types one at a time, since most of
them are tied together in some way. Further, as they're now allocated in
the arenas, they often cannot be treated the same way, and even the
aliases and interfaces put in pLace to simplify the transition cannot
cover the full range of changes required.

We also use some SFINAE tricks to avoid adding boilerplate for helper
APIs, we'd otherwise ahve to support

Though it introduces some additional churn, we also try to keep tests
from using arena allocation as much as possible, since this is not
required to test the implementation of the library. As much of the test
code needed to be rewritten anyway, we take the opportunity to
transition now.

    [41 lines not shown]
DeltaFile
+419-187clang-tools-extra/clang-doc/BitcodeReader.cpp
+246-189clang-tools-extra/unittests/clang-doc/SerializeTest.cpp
+196-129clang-tools-extra/unittests/clang-doc/MergeTest.cpp
+176-80clang-tools-extra/unittests/clang-doc/ClangDocTest.cpp
+137-75clang-tools-extra/clang-doc/Serialize.cpp
+71-41clang-tools-extra/unittests/clang-doc/YAMLGeneratorTest.cpp
+1,245-70114 files not shown
+1,649-94320 files

LLVM/project 426319aclang-tools-extra/clang-doc Generators.h ClangDoc.cpp, clang-tools-extra/clang-doc/benchmarks ClangDocBenchmark.cpp

[clang-doc] Move non-arena allocated types off the OwnedPtr alias

Some types should not be using this alias, which was over applied to
APIs that wont participate in arena style allocation. This patch
restores them to their correct spelling.
DeltaFile
+7-7clang-tools-extra/clang-doc/Generators.h
+4-4clang-tools-extra/clang-doc/ClangDoc.cpp
+4-4clang-tools-extra/clang-doc/MDMustacheGenerator.cpp
+3-3clang-tools-extra/clang-doc/HTMLGenerator.cpp
+2-2clang-tools-extra/clang-doc/benchmarks/ClangDocBenchmark.cpp
+1-1clang-tools-extra/clang-doc/Generators.cpp
+21-211 files not shown
+22-227 files