LLVM/project 36caa31llvm/docs TestingGuide.rst, llvm/test/tools/llubi poison.ll main.ll

[llubi] Add UTC helper (#180603)

This patch adds a UTC helper `llvm/utils/update_llubi_test_checks.py` to
generate check lines for the trace. Generalizer and multiple prefixes
are not supported since they are meaningless for traces. I know it is a
bit weird, but I don't have a better idea :(

I found that `llvm/utils/update_test_body.py` also works. But it is
annoying to duplicate the command twice.
DeltaFile
+135-0llvm/utils/update_llubi_test_checks.py
+6-5llvm/test/tools/llubi/poison.ll
+5-4llvm/test/tools/llubi/main.ll
+3-2llvm/test/tools/llubi/main2.ll
+3-0llvm/docs/TestingGuide.rst
+1-0llvm/utils/UpdateTestChecks/common.py
+153-116 files

LLVM/project 7b56bc8clang-tools-extra/docs/clang-tidy index.rst

[clang-tidy][docs] Update documentation to current --help (#180575)

I noticed the documentation is missing this doc fix:
https://github.com/llvm/llvm-project/commit/455105f1c67ccb625a1dccbf55cc2266bf9eaba2

I reran `clang-tidy --help` on current main.
DeltaFile
+22-12clang-tools-extra/docs/clang-tidy/index.rst
+22-121 files

LLVM/project ac85248llvm/lib/Target/X86 X86WinEHState.cpp X86PassRegistry.def, llvm/test/CodeGen/WinEH wineh-statenumbering-cleanups.ll

[NewPM] Port x86-winehstate (#180687)

x86-winehstate has been converted to a module pass for NewPM since it
uses data from the Module by overriding `doInitialization` and
`doFinalization`.
DeltaFile
+76-38llvm/lib/Target/X86/X86WinEHState.cpp
+6-6llvm/lib/Target/X86/X86PassRegistry.def
+9-2llvm/lib/Target/X86/X86.h
+2-2llvm/lib/Target/X86/X86TargetMachine.cpp
+2-1llvm/lib/Target/X86/X86CodeGenPassBuilder.cpp
+2-0llvm/test/CodeGen/WinEH/wineh-statenumbering-cleanups.ll
+97-495 files not shown
+102-4911 files

LLVM/project 16bfc02llvm/test/CodeGen/AMDGPU vector-reduce-add.ll llvm.amdgcn.readfirstlane.ll

[AMDGPU] [GlobalIsel] Enabling lit tests for new regbank select (#180680)

This patch will enable few more lit tests that depends on G_FRAME_INDEX
opcode.
DeltaFile
+550-278llvm/test/CodeGen/AMDGPU/vector-reduce-add.ll
+43-43llvm/test/CodeGen/AMDGPU/llvm.amdgcn.readfirstlane.ll
+5-5llvm/test/CodeGen/AMDGPU/flat-scratch-svs.ll
+598-3263 files

LLVM/project ae35e87clang/docs ReleaseNotes.rst

Release Note
DeltaFile
+2-0clang/docs/ReleaseNotes.rst
+2-01 files

LLVM/project 004a25fclang/include/clang/Basic AttrDocs.td, clang/test/CodeGen attr-no-outline.c attr-nooutline.c

Change spelling to clang::no_outline, more tests
DeltaFile
+107-0clang/test/CodeGen/attr-no-outline.c
+40-0clang/test/CodeGenObjC/attr-no-outline.m
+0-25clang/test/CodeGen/attr-nooutline.c
+0-18clang/include/clang/Basic/AttrDocs.td
+7-0clang/test/Sema/attr-no-outline.cpp
+0-7clang/test/Sema/attr-nooutline.cpp
+154-505 files not shown
+166-6211 files

LLVM/project abdec1bclang/include/clang/Basic CodeGenOptions.def, clang/include/clang/Options Options.td

[clang] Ensure -mno-outline adds attributes

Before this change, `-mno-outline` and `-moutline` only controlled the
pass pipelines for the invoked compiler/linker.

The drawback of this implementation is that, when using LTO, only the
flag provided to the linker invocation is honoured (and any files which
individually use `-mno-outline` will have that flag ignored).

This change serialises the `-mno-outline` flag into each function's
IR/Bitcode, so that we can correctly disable outlining from functions in
files which disabled outlining, without affecting outlining choices for
functions from other files. This matches how other optimisation flags
are handled so the IR/Bitcode can be correctly merged during LTO.
DeltaFile
+14-3clang/test/CodeGen/attr-no-outline.c
+7-10clang/include/clang/Options/Options.td
+6-5clang/lib/Driver/ToolChains/CommonArgs.cpp
+3-1clang/lib/CodeGen/CodeGenModule.cpp
+3-0clang/include/clang/Basic/CodeGenOptions.def
+1-1clang/test/Driver/aarch64-outliner.c
+34-203 files not shown
+37-239 files

LLVM/project f87a9ebclang/docs ReleaseNotes.rst, clang/test/Sema attr-nooutline.c attr-nooutline.cpp

Address Review Feedback: Flags, Release Notes
DeltaFile
+3-3clang/docs/ReleaseNotes.rst
+1-1clang/test/Sema/attr-nooutline.c
+1-1clang/test/Sema/attr-nooutline.cpp
+5-53 files

LLVM/project be05211clang/docs ReleaseNotes.rst

Release Notes
DeltaFile
+3-0clang/docs/ReleaseNotes.rst
+3-01 files

LLVM/project 99894cdllvm/docs ReleaseNotes.md

Release Note
DeltaFile
+3-0llvm/docs/ReleaseNotes.md
+3-01 files

LLVM/project aea6a74clang/include/clang/Basic AttrDocs.td Attr.td, clang/test/CodeGen attr-nooutline.c

Address reviewer feedback: Tests, Docs, TableGen
DeltaFile
+30-0clang/include/clang/Basic/AttrDocs.td
+19-10clang/test/CodeGen/attr-nooutline.c
+2-2clang/include/clang/Basic/Attr.td
+51-123 files

LLVM/project d0e6493clang/include/clang/Basic Attr.td, clang/lib/CodeGen CodeGenModule.cpp

[clang] Add clang::nooutline Attribute

This change:
- Adds a `[[clang::nooutline]]` function attribute for C and C++. There
  is no equivalent GNU syntax for this attribute, so no `__attribute__`
  syntax.
- Uses the presence of `[[clang::nooutline]]` to add the `nooutline`
  attribute to IR function definitions.
- Adds test for the above.

The `nooutline` attribute disables both the Machine Outliner (enabled at
Oz for some targets), and the IR Outliner (disabled by default).
DeltaFile
+16-0clang/test/CodeGen/attr-nooutline.c
+7-0clang/test/Sema/attr-nooutline.c
+7-0clang/test/Sema/attr-nooutline.cpp
+7-0clang/include/clang/Basic/Attr.td
+3-0clang/lib/CodeGen/CodeGenModule.cpp
+1-0clang/test/Misc/pragma-attribute-supported-attributes-list.test
+41-06 files

LLVM/project deb91c7llvm/include/llvm/IR Attributes.td, llvm/lib/IR AutoUpgrade.cpp

[outliners] Turn nooutline into an Enum Attribute

This change turns the `"nooutline"` attribute into an enum attribute
called `nooutline`, and adds an auto-upgrader for bitcode to make the
same change to existing IR.

This IR attribute disables both the Machine Outliner (enabled at Oz for
some targets), and the IR Outliner (disabled by default).
DeltaFile
+12-0llvm/test/Bitcode/upgrade-nooutline.ll
+6-0llvm/lib/IR/AutoUpgrade.cpp
+4-0llvm/lib/Transforms/Utils/CodeExtractor.cpp
+2-2llvm/test/Transforms/IROutliner/nooutline-attribute.ll
+3-0llvm/include/llvm/IR/Attributes.td
+1-1llvm/lib/Transforms/IPO/IROutliner.cpp
+28-36 files not shown
+36-612 files

LLVM/project a17cf15clang/include/clang/Options Options.td

Undo typo
DeltaFile
+1-1clang/include/clang/Options/Options.td
+1-11 files

LLVM/project 5056543clang/include/clang/CIR/Dialect/IR CIROps.td, clang/lib/CIR/Dialect/IR CIRDialect.cpp

[CIR] Add static_local attribute to GlobalOp and GetGlobalOp

This attribute marks function-local static variables that require
guarded initialization (e.g., C++ static local variables with
non-constant initializers). It is used by CIRGen to communicate
to LoweringPrepare which globals need guard variable emission.
DeltaFile
+33-0clang/test/CIR/IR/invalid-static-local.cir
+19-0clang/test/CIR/IR/static-local.cir
+15-1clang/include/clang/CIR/Dialect/IR/CIROps.td
+4-0clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+71-14 files

LLVM/project 50746f2flang/lib/Lower HlfirIntrinsics.cpp, flang/test/Lower/HLFIR elemental-result-length-len-folding.f90 assumed-rank-inquiries.f90

[flang] Don't do actual concatenation when computing LEN() of concatenated strings (#180676)

For cases like the following don't actually compute concatenation of
`str // "abc"`, because we only need final length:
```
  character(len=*), intent(in) :: str
  character(len=len(str // "abc")) :: res
```
For such cases, don't emit hlfir.concat.

Fixes #157763
DeltaFile
+54-0flang/test/Lower/HLFIR/elemental-result-length-len-folding.f90
+24-0flang/lib/Lower/HlfirIntrinsics.cpp
+1-1flang/test/Lower/HLFIR/assumed-rank-inquiries.f90
+79-13 files

LLVM/project dd24729clang/include/clang/CIR/Interfaces ASTAttrInterfaces.td ASTAttrInterfaces.h, clang/lib/CIR/Interfaces ASTAttrInterfaces.cpp CMakeLists.txt

[CIR] Add ASTVarDeclInterface for AST attribute access

Add the ASTVarDeclInterface which provides methods to access clang AST
VarDecl information from CIR attributes. This interface enables:
- mangleStaticGuardVariable: Mangle guard variable names using clang's
  MangleContext
- isLocalVarDecl: Check if a variable is function-local
- getTLSKind: Get thread-local storage kind
- isInline: Check if the variable is inline
- getTemplateSpecializationKind: Get template specialization info
- getVarDecl: Direct access to the underlying VarDecl pointer

This infrastructure is needed for proper handling of static local
variables with guard variables in LoweringPrepare.
DeltaFile
+51-0clang/include/clang/CIR/Interfaces/ASTAttrInterfaces.td
+22-0clang/include/clang/CIR/Interfaces/ASTAttrInterfaces.h
+21-0clang/lib/CIR/Interfaces/ASTAttrInterfaces.cpp
+9-0clang/include/clang/CIR/Interfaces/CMakeLists.txt
+2-0clang/lib/CIR/Interfaces/CMakeLists.txt
+105-05 files

LLVM/project 1094775llvm/lib/Target/X86 X86ISelLowering.cpp, llvm/test/CodeGen/X86 avx512bwvl-arith.ll

[X86] Fix lower1BitShuffle blend-with-zero shuffles to AND mask (#180472)

### Summary
This PR resolves https://github.com/llvm/llvm-project/issues/180426.
DeltaFile
+14-0llvm/test/CodeGen/X86/avx512bwvl-arith.ll
+11-3llvm/lib/Target/X86/X86ISelLowering.cpp
+25-32 files

LLVM/project f932646llvm/lib/Transforms/Utils Local.cpp, llvm/test/Transforms/SimplifyCFG branch-weight-overflow.ll

[SimplifyCFG][PGO] Add missing overflow check to ConstantFoldTerminator (#178964)

Branch weight metadata can overflow when folding large branch weights.
Updated branch weights to uint64_t, added check for overflow, and then
set branch weights using setFittedBranchWeights to ensure branch weight
metadata is not lost.
DeltaFile
+51-0llvm/test/Transforms/SimplifyCFG/branch-weight-overflow.ll
+8-4llvm/lib/Transforms/Utils/Local.cpp
+59-42 files

LLVM/project 690aa65mlir/lib/Dialect/Shape/IR Shape.cpp, mlir/test/Dialect/Shape canonicalize.mlir

[mlir][shape] Fix crash in ShapeOfOpToConstShapeOp (#180737)

This PR fixes a crash when `shape.shape_of` op has static arg and shape
result type. Fixes #180719.
DeltaFile
+10-4mlir/lib/Dialect/Shape/IR/Shape.cpp
+10-0mlir/test/Dialect/Shape/canonicalize.mlir
+20-42 files

LLVM/project 0aa4a01mlir/lib/Dialect/SparseTensor/IR SparseTensorDialect.cpp, mlir/test/Dialect/SparseTensor invalid.mlir

[mlir][sparse] Fix a crash if block not have terminator (#180741)

This PR fixes a crash in `verifyNumBlockArgs` if region not end with a
terminator. Fixes #180720.
DeltaFile
+14-0mlir/test/Dialect/SparseTensor/invalid.mlir
+6-1mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp
+20-12 files

LLVM/project 1a45b52clang-tools-extra/clang-doc Generators.cpp Generators.h, clang-tools-extra/clang-doc/tool ClangDocMain.cpp

[clang-doc] Apply modernize-use-string-view to the code (#180332)

DeltaFile
+2-2clang-tools-extra/clang-doc/tool/ClangDocMain.cpp
+1-1clang-tools-extra/clang-doc/Generators.cpp
+1-1clang-tools-extra/clang-doc/Generators.h
+4-43 files

LLVM/project 91224e3libc/config config.json, libc/config/baremetal config.json

[libc] Disable math exceptions for baremetal (#180863)

To further save code size for baremetal builds, disable math function
exceptions.
DeltaFile
+1-1libc/config/baremetal/config.json
+1-1libc/config/config.json
+2-22 files

LLVM/project 7e734daclang/lib/CodeGen CGBuiltin.cpp, clang/test/CodeGen math-builtins-long.c builtins.c

Clang: Add nsz to llvm.minnum and llvm.maxnum emitted from fmin and fmax (#113133)

See: https://github.com/llvm/llvm-project/pull/112852

We will define llvm.minnum and llvm.maxnum with +0.0>-0.0, by default,
while libc doesn't require it.
DeltaFile
+40-40clang/test/Headers/__clang_hip_math.hip
+12-12clang/test/CodeGen/RISCV/math-builtins.c
+14-8clang/lib/CodeGen/CGBuiltin.cpp
+8-8clang/test/CodeGen/math-builtins-long.c
+6-6clang/test/CodeGen/builtins.c
+6-2clang/test/Headers/nvptx_device_math_complex.cpp
+86-763 files not shown
+98-849 files

LLVM/project 0f6ee50clang/lib/CIR/CodeGen CIRGenBuiltin.cpp CIRGenBuiltinX86.cpp, clang/test/CIR/CodeGenBuiltins builtins-elementwise.c

[CIR][X86] Add support for vpshl/vpshr builtins (#179538)

This patch also adds support for fshl/fshr operations so that
vpshl/vpshr intrinsics can lower to them
Part of: #167765
DeltaFile
+401-0clang/test/CIR/CodeGenBuiltins/X86/avx512vbmi2-builtins.c
+87-0clang/test/CIR/CodeGenBuiltins/builtins-elementwise.c
+17-2clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp
+9-4clang/lib/CIR/CodeGen/CIRGenBuiltinX86.cpp
+514-64 files

LLVM/project 0c884aautils/bazel/llvm-project-overlay/clang/unittests BUILD.bazel

[FlowSensitive] [StatusOr] Add test fixture target to Bazel (#180302)

This can be used to make sure downstream extensions to the model still
pass the unit tests.
DeltaFile
+29-0utils/bazel/llvm-project-overlay/clang/unittests/BUILD.bazel
+29-01 files

LLVM/project 0e72620llvm/lib/CodeGen ExpandIRInsts.cpp, llvm/test/CodeGen/AMDGPU div_v2i128.ll div_i128.ll

[CodeGen] Expand power-of-2 div/rem at IR level in ExpandIRInsts.

Previously, power-of-2 div/rem operations wider than
MaxLegalDivRemBitWidth were excluded from IR expansion and left for
backend peephole optimizations. Some backends can fail to process such
instructions in case we switch off DAGCombiner.

Now ExpandIRInsts expands them into shift/mask sequences:
- udiv X, 2^C  ->  lshr X, C
- urem X, 2^C  ->  and X, (2^C - 1)
- sdiv X, 2^C  ->  bias adjustment + ashr X, C
- srem X, 2^C  ->  X - (((X + Bias) >> C) << C)

Special cases handled:
- Division/remainder by 1 or -1 (identity, negation, or zero)
- Exact division (sdiv exact skips bias, produces ashr exact)
- Negative power-of-2 divisors (result is negated)
- INT_MIN divisor (correct via countr_zero on bit pattern)
DeltaFile
+69-1,283llvm/test/CodeGen/AMDGPU/div_v2i128.ll
+55-93llvm/test/CodeGen/X86/div_i129_v_pow2k.ll
+148-0llvm/test/Transforms/ExpandIRInsts/X86/sdiv129.ll
+125-8llvm/lib/CodeGen/ExpandIRInsts.cpp
+115-0llvm/test/Transforms/ExpandIRInsts/X86/srem129.ll
+20-49llvm/test/CodeGen/AMDGPU/div_i128.ll
+532-1,4334 files not shown
+645-1,46310 files

LLVM/project 7952896mlir/include/mlir/Dialect/OpenACC OpenACCOps.td OpenACCCGOps.td, mlir/lib/Dialect/OpenACC/IR OpenACC.cpp

[mlir][acc] Fixed side effects for [first]private/reduction. (#180791)

This patch moves the definitions of memory effects for the data
entry/exit operations into C++ code. The main reason for this
is to modify the effects of [first]private and reduction
operations: they should not access `CurrentDeviceIdResource`
when they are located inside a compute construct.

The ODS to C++ migration was done with AI assistance. I reviewed
these changes and made sure it was an NFC change. After that
I modified [first]private and reduction implementations.
DeltaFile
+264-0mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp
+79-85mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td
+5-4mlir/include/mlir/Dialect/OpenACC/OpenACCCGOps.td
+348-893 files

LLVM/project ac1220flibc/cmake/modules LLVMLibCCompileOptionRules.cmake, libc/config config.json

[libc] Add option to disable printf bit int (#180832)

Requested as a binary size optimization. Updates the parser, converter
utils, config, tests, and docs.
DeltaFile
+15-1libc/src/stdio/printf_core/core_structs.h
+7-1libc/docs/dev/printf_behavior.rst
+6-0libc/src/stdio/printf_core/parser.h
+4-1libc/config/config.json
+4-1libc/config/baremetal/config.json
+4-0libc/cmake/modules/LLVMLibCCompileOptionRules.cmake
+40-46 files not shown
+52-412 files

LLVM/project 59bcec2llvm/include/llvm/CAS OnDiskKeyValueDB.h, llvm/lib/CAS OnDiskKeyValueDB.cpp UnifiedOnDiskCache.cpp

[llvm][cas] Validate OnDiskKeyValueDB against the corresponding OnDiskGraphDB (#180852)

We were previously using the primary OnDiskGraphDB when validating the
upstream OnDiskKeyValueDB, which is incorrect since the values being
stored are direct offsets and therefore cannot be used across DBs
without translating to a hash value first.

rdar://170067863
DeltaFile
+23-7llvm/lib/CAS/OnDiskKeyValueDB.cpp
+1-14llvm/lib/CAS/UnifiedOnDiskCache.cpp
+1-7llvm/unittests/CAS/OnDiskKeyValueDBTest.cpp
+2-5llvm/include/llvm/CAS/OnDiskKeyValueDB.h
+7-0llvm/test/tools/llvm-cas/validation.test
+1-5llvm/lib/CAS/ActionCaches.cpp
+35-386 files