LLVM/project d1e477bllvm/lib/Transforms/Vectorize VPlanTransforms.cpp LoopVectorize.cpp

Revert "[VPlan] Detect and create partial reductions in VPlan. (NFCI) (#167851)"

This reverts commit f4e8cc1a2229dca76d21c8d37439c4c194b06b86.

This change wasn't NFC; it causes failed asserts when building
ffmpeg for i686 windows, see
https://github.com/llvm/llvm-project/pull/167851 for details.
DeltaFile
+2-358llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+267-7llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+62-3llvm/lib/Transforms/Vectorize/VPRecipeBuilder.h
+35-7llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp
+0-20llvm/lib/Transforms/Vectorize/VPlanUtils.h
+0-17llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
+366-4124 files not shown
+368-44210 files

LLVM/project d5711ddmlir/include/mlir/Dialect/UB/IR UBOps.td, mlir/lib/Dialect/UB/IR UBOps.cpp

[mlir][UB] Erase ops that precede `ub.unreachable`
DeltaFile
+37-0mlir/lib/Dialect/UB/IR/UBOps.cpp
+25-0mlir/test/Dialect/UB/canonicalize.mlir
+1-0mlir/include/mlir/Dialect/UB/IR/UBOps.td
+63-03 files

LLVM/project cf9912emlir/include/mlir/Dialect/SCF/IR SCFOps.td, mlir/include/mlir/Dialect/UB/IR UBOps.h

address comments
DeltaFile
+48-0mlir/include/mlir/Interfaces/ExecutionProgressOpInterface.td
+23-0mlir/lib/Interfaces/ExecutionProgressOpInterface.cpp
+23-0mlir/include/mlir/Interfaces/ExecutionProgressOpInterface.h
+0-12mlir/include/mlir/Interfaces/ControlFlowInterfaces.td
+3-5mlir/include/mlir/Dialect/UB/IR/UBOps.h
+6-2mlir/include/mlir/Dialect/SCF/IR/SCFOps.td
+103-196 files not shown
+111-2012 files

LLVM/project 8e7a2d8clang/lib/AST ExprConstant.cpp, clang/lib/AST/ByteCode InterpBuiltin.cpp Context.cpp

Revert "[clang][bytecode] Use in `Expr::tryEvaluateObjectSize` (#1790… (#179099)

…33)"

This reverts commit 756c321c33af2be0bd40707948aae3c06163a0a6.

Test failure in clang/test/AST/ByteCode/builtins.c in CI build

CC @tbaederr
DeltaFile
+31-37clang/lib/AST/ByteCode/InterpBuiltin.cpp
+0-29clang/lib/AST/ByteCode/Context.cpp
+0-13clang/lib/AST/ByteCode/Context.h
+0-4clang/lib/AST/ExprConstant.cpp
+4-0clang/test/Sema/warn-fortify-source.c
+0-3clang/lib/AST/ByteCode/InterpHelpers.h
+35-8612 files not shown
+35-9818 files

LLVM/project a34bfacllvm/include/llvm/ADT APInt.h, llvm/unittests/ADT APIntTest.cpp

[APInt] Extend isSameValue to also do signed-compares (#178854)

Introduce a SignedCompare parameter of isSameValue to use sext instead
of zext.
DeltaFile
+22-1llvm/unittests/ADT/APIntTest.cpp
+12-6llvm/include/llvm/ADT/APInt.h
+34-72 files

LLVM/project a19cbc4llvm/lib/Transforms/Vectorize VPlan.h VPlanRecipes.cpp

[VPlan] Rename VectorEndPointer's IndexedTy to SourceElementTy (NFC) (#178856)

For consistency with IR terminology.
DeltaFile
+9-8llvm/lib/Transforms/Vectorize/VPlan.h
+3-3llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+12-112 files

LLVM/project 618d71dllvm/test/CodeGen/X86 avx512-intrinsics.ll

[X86] Add test coverage for #179057 (#179092)

Incorrect folding of fixupimm scalar intrinsics passthrough when the
mask is known zero
DeltaFile
+36-0llvm/test/CodeGen/X86/avx512-intrinsics.ll
+36-01 files

LLVM/project 7f967a9mlir/lib/AsmParser AttributeParser.cpp, mlir/test/IR invalid-dense-array-attr.mlir

[mlir][IR] Diagnose index element type in DenseArrayAttr (#179075)

DeltaFile
+22-0mlir/test/IR/invalid-dense-array-attr.mlir
+2-2mlir/lib/AsmParser/AttributeParser.cpp
+24-22 files

LLVM/project 584bd38llvm/docs/tutorial/MyFirstLanguageFrontend LangImpl03.rst

[docs] fix output question (#177842)

See the code:
<img width="2631" height="1090" alt="image"
src="https://github.com/user-attachments/assets/dfe949b3-fbc6-4cd3-9e8d-5c0adbfcc67a"
/>
<img width="1751" height="577" alt="image"
src="https://github.com/user-attachments/assets/e3b78596-24b9-4bd5-b40d-a4154b2e6bb2"
/>


So the output is not the number, is the text "__anon_expr".
DeltaFile
+2-2llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl03.rst
+2-21 files

LLVM/project 756c321clang/lib/AST ExprConstant.cpp, clang/lib/AST/ByteCode InterpBuiltin.cpp Context.cpp

[clang][bytecode] Use in `Expr::tryEvaluateObjectSize` (#179033)

Fixes #138474

Use new bytecode intepreter in `Expr::tryEvaluateObjectSize`. Reuses the
already existing implementation for `__builtin_object_size` in of the
intepreter.

---------

Co-authored-by: Timm Baeder <tbaeder at redhat.com>
DeltaFile
+37-31clang/lib/AST/ByteCode/InterpBuiltin.cpp
+29-0clang/lib/AST/ByteCode/Context.cpp
+13-0clang/lib/AST/ByteCode/Context.h
+0-4clang/test/Sema/warn-fortify-source.c
+4-0clang/lib/AST/ExprConstant.cpp
+3-0clang/lib/AST/ByteCode/InterpHelpers.h
+86-3512 files not shown
+98-3518 files

LLVM/project 6885042clang/lib/AST/ByteCode Compiler.cpp, clang/test/AST/ByteCode invalid.cpp

[clang][bytecode] Reject CK_BitCast nodes with errors early (#179087)

Fixes https://github.com/llvm/llvm-project/issues/179020
DeltaFile
+5-0clang/test/AST/ByteCode/invalid.cpp
+2-0clang/lib/AST/ByteCode/Compiler.cpp
+7-02 files

LLVM/project 487de1alibc/test/src/time mktime_test.cpp gmtime_test.cpp

[libc][test] Fix TmMatcher and correct tm_yday/tm_wday test values (#179029)

The TmMatcher was using || instead of && to compare tm struct fields,
causing it to match if ANY field was equal rather than ALL fields. This
masked incorrect expected values in the time tests.

Happily, only the tests needed fixing.  The code was correct.

Fixed the matcher and corrected all tm_yday and tm_wday values to match
glibc's gmtime_r output.
DeltaFile
+20-20libc/test/src/time/mktime_test.cpp
+12-12libc/test/src/time/gmtime_test.cpp
+8-8libc/test/src/time/TmMatcher.h
+2-2libc/test/src/time/gmtime_r_test.cpp
+42-424 files

LLVM/project b6e5e8elldb/source/Plugins/Process/FreeBSDKernel ThreadFreeBSDKernel.cpp ProcessFreeBSDKernel.cpp

[lldb] [Process/FreeBSDKernel] Select paniced thread automatically (#178069)

Kernel panic is a special case, and there is no signal or exception for
that so we need to rely on special workaround called `dumptid`.
FreeBSDKernel plugin is supposed to find this thread and set it manually
through `SetStopInfo()` in `CalculateStopInfo()` like Mach core plugin
does.

Before (We had to find and select crashed thread list otherwise thread 1
was selected by default):
```
➜ sudo lldb /boot/panic/kernel -c /var/crash/vmcore.last
(lldb) target create "/boot/panic/kernel" --core "/var/crash/vmcore.last"
Core file '/var/crash/vmcore.last' (x86_64) was loaded.
(lldb) bt
* thread #1, name = '(pid 12991) dtrace'
  * frame #0: 0xffffffff80bf9322 kernel`sched_switch(td=0xfffff8015882f780, flags=259) at sched_ule.c:2448:26
    frame #1: 0xffffffff80bd38d2 kernel`mi_switch(flags=259) at kern_synch.c:530:2
    frame #2: 0xffffffff80c29799 kernel`sleepq_switch(wchan=0xfffff8014edff300, pri=0) at subr_sleepqueue.c:608:2

    [38 lines not shown]
DeltaFile
+10-1lldb/source/Plugins/Process/FreeBSDKernel/ThreadFreeBSDKernel.cpp
+7-3lldb/source/Plugins/Process/FreeBSDKernel/ProcessFreeBSDKernel.cpp
+3-0lldb/source/Plugins/Process/FreeBSDKernel/ThreadFreeBSDKernel.h
+20-43 files

LLVM/project a51d3a2clang/lib/CIR/CodeGen TargetInfo.cpp, clang/lib/CIR/Dialect/Transforms/TargetLowering LowerModule.cpp

[CIR][AMDGPU] Lower Language specific address spaces and implement AMDGPU target
DeltaFile
+48-9clang/test/CIR/Lowering/global-address-space.cir
+51-0clang/test/CIR/CodeGen/amdgpu-address-spaces.cpp
+47-0clang/lib/CIR/Dialect/Transforms/TargetLowering/Targets/AMDGPU.cpp
+46-0clang/lib/CIR/CodeGen/TargetInfo.cpp
+17-8clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+9-2clang/lib/CIR/Dialect/Transforms/TargetLowering/LowerModule.cpp
+218-194 files not shown
+234-1910 files

LLVM/project d6d3754clang/lib/CIR/CodeGen CIRGenModule.cpp CIRGenExpr.cpp, clang/test/CIR/Lowering global-address-space.cir

preserve AS for getGlobal op
DeltaFile
+31-0clang/test/CIR/Lowering/global-address-space.cir
+3-3clang/lib/CIR/CodeGen/CIRGenModule.cpp
+2-2clang/lib/CIR/CodeGen/CIRGenExpr.cpp
+36-53 files

LLVM/project 9b1cff9clang/lib/CIR/CodeGen CIRGenModule.cpp CIRGenModule.h, clang/lib/CIR/Dialect/IR CIRDialect.cpp

[CIR] Address Space support for GlobalOps
DeltaFile
+48-9clang/lib/CIR/CodeGen/CIRGenModule.cpp
+19-20clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+30-0clang/test/CIR/IR/address-space.cir
+21-2clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+20-0clang/test/CIR/IR/invalid-addrspace.cir
+16-4clang/lib/CIR/CodeGen/CIRGenModule.h
+154-357 files not shown
+216-4313 files

LLVM/project e465147clang/lib/CIR/CodeGen CIRGenModule.cpp CIRGenModule.h, clang/lib/CIR/Dialect/IR CIRDialect.cpp

[CIR] Address Space support for GlobalOps
DeltaFile
+48-9clang/lib/CIR/CodeGen/CIRGenModule.cpp
+19-20clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+30-0clang/test/CIR/IR/address-space.cir
+21-2clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+20-0clang/test/CIR/IR/invalid-addrspace.cir
+16-4clang/lib/CIR/CodeGen/CIRGenModule.h
+154-357 files not shown
+212-3913 files

LLVM/project bba5371polly/ci polly-x86_64-linux.py polly-x86_64-linux-plugin.py

[Polly][CI] Add ScriptedBuilder scripts

Add ScriptedBuilder-equivalents of the current PollyBuilder-based
buildbots.
DeltaFile
+50-0polly/ci/polly-x86_64-linux.py
+49-0polly/ci/polly-x86_64-linux-plugin.py
+49-0polly/ci/polly-x86_64-linux-shared-plugin.py
+49-0polly/ci/polly-x86_64-linux-shared.py
+49-0polly/ci/polly-x86_64-linux-shlib-plugin.py
+49-0polly/ci/polly-x86_64-linux-shlib.py
+295-02 files not shown
+344-08 files

LLVM/project 33cef35flang/lib/Semantics type.cpp, flang/test/Semantics bug178786.f90

[flang] Assign sizes & offsets before instantiating some component types (#178927)

Semantics is instantiating derived types too soon is some cases, leading
to incorrect sizes and component offsets in cases of valid forward
references to derived types -- these appear in the declarations of
allocatable and pointer components. The incorrect size led to a runtime
crash in the linked bug report after an insufficient allocation.

Since those components are indirect, their sizes in the derived type
instantiation can be known without having to recursive instantiate the
components' types. Then, after laying out the derived type
instantiation, the compiler can then ensure that the components' types
are instantiated.

Fixes https://github.com/llvm/llvm-project/issues/178786.
DeltaFile
+63-0flang/test/Semantics/bug178786.f90
+36-8flang/lib/Semantics/type.cpp
+99-82 files

LLVM/project 6577aa5flang/lib/Semantics expression.cpp, flang/test/Semantics bug178813.f90

[flang] Fix proc ptr default initializers in structure constructors (#178897)

The default initializers for procedure pointer components are not being
used for unspecified components in structure constructors.

Fixes https://github.com/llvm/llvm-project/issues/178813.
DeltaFile
+14-14flang/lib/Semantics/expression.cpp
+8-0flang/test/Semantics/bug178813.f90
+22-142 files

LLVM/project 5cba86cclang/include/clang/CIR/Dialect/Builder CIRBaseBuilder.h, clang/lib/CIR/CodeGen CIRGenExpr.cpp

[CIR] Implement MemorySpaceAttrInterface for lang and target specific AS
DeltaFile
+46-45clang/lib/CIR/Dialect/IR/CIRTypes.cpp
+41-0clang/test/CIR/IR/address-space.cir
+29-3clang/test/CIR/IR/invalid-addrspace.cir
+20-3clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+9-11clang/include/clang/CIR/Dialect/Builder/CIRBaseBuilder.h
+5-11clang/lib/CIR/CodeGen/CIRGenExpr.cpp
+150-739 files not shown
+187-9515 files

LLVM/project 55ee00eflang/lib/Semantics expression.cpp check-call.cpp, flang/test/Semantics bug2131.cuf

[flang][CUDA] Allow constant to match device actual in specific procedure (#178658)

When scanning the specific procedures of a generic interface for a match
for a set of actual arguments, accept a constant actual argument as a
match for a dummy argument with the DEVICE attribute.
DeltaFile
+26-0flang/test/Semantics/bug2131.cuf
+1-4flang/lib/Semantics/expression.cpp
+3-2flang/lib/Semantics/check-call.cpp
+30-63 files

LLVM/project 20103eeflang/include/flang/Evaluate check-expression.h, flang/lib/Evaluate check-expression.cpp fold-integer.cpp

[flang] Fix exposed "free" instances of ac-implied-do indices (#178516)

Tweak the implementations of IsConstantExpr, IsInitialDataTarget, and
related utilities so that "free" instances of array constructor implied
DO indices are not treated as constant expressions when the surrounding
context (if any) doesn't contain their bounds. This fixes a current bug
in which a "free" implied DO index in a structure constructor got
wrapped up an a Constant<SomeDerived>, which led to a crash in lowering.
DeltaFile
+71-34flang/lib/Evaluate/check-expression.cpp
+25-11flang/include/flang/Evaluate/check-expression.h
+9-0flang/test/Semantics/ac-impl-do-data-ptr.f90
+3-3flang/lib/Evaluate/fold-integer.cpp
+2-2flang/lib/Semantics/pointer-assignment.cpp
+2-2flang/lib/Evaluate/shape.cpp
+112-525 files not shown
+119-5811 files

LLVM/project 9ddd795clang/include/clang/CIR/Dialect/Builder CIRBaseBuilder.h, clang/lib/CIR/CodeGen CIRGenExpr.cpp

[CIR] Implement MemorySpaceAttrInterface for lang and target specific AS attributes
DeltaFile
+53-53clang/lib/CIR/Dialect/IR/CIRTypes.cpp
+41-0clang/test/CIR/IR/address-space.cir
+29-3clang/test/CIR/IR/invalid-addrspace.cir
+20-3clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+9-11clang/include/clang/CIR/Dialect/Builder/CIRBaseBuilder.h
+5-11clang/lib/CIR/CodeGen/CIRGenExpr.cpp
+157-819 files not shown
+193-10315 files

LLVM/project bc45ea2lld/ELF Relocations.cpp Config.h, lld/ELF/Arch RISCV.cpp

[ELF] Fix IRELATIVE addend if the resolver address is updated by linker relaxation (#179063)

For a non-preemptible ifunc, `handleNonPreemptibleIfunc` creates a
cloned
symbol (`directSym`) to compute the addend of the IRELATIVE dynamic
relocation.
This cloned symbol wasn't tracked by `initSymbolAnchors`, so its value
wasn't adjusted during RISC-V/LoongArch linker relaxation.
This caused IRELATIVE addends to point to pre-relaxation addresses.

Fix this by:

- Tracking cloned IRELATIVE symbols in `ctx.irelativeSyms`
- Adding these symbols to `relaxAux->anchors` in `initSymbolAnchors`
DeltaFile
+92-38lld/test/ELF/riscv-ifunc-nonpreemptible.s
+70-0lld/test/ELF/loongarch-ifunc-nonpreemptible.s
+21-41lld/ELF/Relocations.cpp
+18-13lld/ELF/Arch/RISCV.cpp
+3-0lld/ELF/Config.h
+204-925 files

LLVM/project 7d661e8clang/include/clang/Analysis/Analyses/LifetimeSafety Facts.h, clang/include/clang/Basic DiagnosticGroups.td

use-after-invalidation
DeltaFile
+57-5clang/lib/Analysis/LifetimeSafety/Checker.cpp
+36-0clang/lib/Analysis/LifetimeSafety/LifetimeAnnotations.cpp
+21-0clang/include/clang/Analysis/Analyses/LifetimeSafety/Facts.h
+11-0clang/lib/Sema/AnalysisBasedWarnings.cpp
+10-0clang/lib/Analysis/LifetimeSafety/FactsGenerator.cpp
+9-1clang/include/clang/Basic/DiagnosticGroups.td
+144-66 files not shown
+169-612 files

LLVM/project d43e735llvm/lib/Transforms/Vectorize VPlanConstruction.cpp

[VPlan] Split up attachCheckBlock in distinct helpers for re-use (NFC).

Split up attachCheckBlock into its distinct operations:
* inserting the check block in the CFG + updating phis, and
* adding the branch VPInstruction.

Those helpers can be re-used in follow-up changes.
DeltaFile
+33-25llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp
+33-251 files

LLVM/project 1731c59llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/readability BUILD.gn

[gn build] Port 975d56272e35
DeltaFile
+1-0llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/readability/BUILD.gn
+1-01 files

LLVM/project f4e8cc1llvm/lib/Transforms/Vectorize VPlanTransforms.cpp LoopVectorize.cpp

[VPlan] Detect and create partial reductions in VPlan. (NFCI) (#167851)

As a first step, move the existing partial reduction detection logic to
VPlan, trying to preserve the existing code structure & behavior as
closely as possible.

With this, partial reductions are detected and created together in a
single step.

This allows forming partial reductions and bundling them up if
profitable together in a follow-up.

PR: https://github.com/llvm/llvm-project/pull/167851
DeltaFile
+358-2llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+7-267llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+3-62llvm/lib/Transforms/Vectorize/VPRecipeBuilder.h
+7-35llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp
+20-0llvm/lib/Transforms/Vectorize/VPlanUtils.h
+17-0llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
+412-3664 files not shown
+442-36810 files

LLVM/project 975d562clang-tools-extra/clang-tidy/readability TrailingCommaCheck.cpp, clang-tools-extra/docs/clang-tidy/checks/readability trailing-comma.rst

[clang-tidy] Add new check readability-trailing-comma (#173669)

clang-format has a couple of similar options:

https://clang.llvm.org/docs/ClangFormatStyleOptions.html#enumtrailingcomma
- add trailing commas for enum

https://clang.llvm.org/docs/ClangFormatStyleOptions.html#inserttrailingcommas
- add trailing commas for C++
but generally they are marked with such warning:

> Warning
>
> Setting this option to any value other than Leave could lead to
incorrect code formatting due to clang-format’s lack of complete
semantic information. As such, extra care should be taken to review code
changes made by this option.

clang-tidy on the other hand has all semantic information, thus can

    [5 lines not shown]
DeltaFile
+179-0clang-tools-extra/clang-tidy/readability/TrailingCommaCheck.cpp
+161-0clang-tools-extra/test/clang-tidy/checkers/readability/trailing-comma.cpp
+117-0clang-tools-extra/test/clang-tidy/checkers/readability/trailing-comma.c
+89-0clang-tools-extra/test/clang-tidy/checkers/readability/trailing-comma-cxx20.cpp
+79-0clang-tools-extra/test/clang-tidy/checkers/readability/trailing-comma-remove.cpp
+68-0clang-tools-extra/docs/clang-tidy/checks/readability/trailing-comma.rst
+693-08 files not shown
+890-014 files