LLVM/project 9c4f97allvm/test/CodeGen/AArch64 bf16-v8-instructions.ll bf16-instructions.ll, llvm/test/CodeGen/AMDGPU ctlz_zero_poison.ll ctlz_zero_undef.ll

Merge branch 'main' into users/el-ev/fold-multi-use-select
DeltaFile
+3,073-1,259llvm/test/CodeGen/AArch64/bf16-v8-instructions.ll
+2,614-0llvm/test/CodeGen/AMDGPU/ctlz_zero_poison.ll
+0-2,614llvm/test/CodeGen/AMDGPU/ctlz_zero_undef.ll
+1,660-649llvm/test/CodeGen/AArch64/bf16-instructions.ll
+1,440-725llvm/test/CodeGen/AArch64/bf16-v4-instructions.ll
+1,670-0llvm/test/CodeGen/AMDGPU/cttz_zero_poison.ll
+10,457-5,2471,386 files not shown
+54,420-25,2301,392 files

LLVM/project b4f7c93llvm/lib/Target/AArch64 AArch64ISelLowering.cpp, llvm/test/CodeGen/AArch64 bitreverse.ll sve-fixed-length-rev.ll

[AArch64][Isel] For fixed length vectors use sve for bitreverse when available (#196025)

Lowering bitreverse via the SVE path seems to be giving significant
performance improvements for fixed width vectors

Speedups after the patch

uint8x8_t   1.01x
uint16x4_t  2.02x
uint32x2_t  2.01x
uint64x1_t  2.02x
uint8x16_t  1.00x
uint16x8_t  2.03x
uint32x4_t  2.03x
uint64x2_t  2.02x
DeltaFile
+199-47llvm/test/CodeGen/AArch64/bitreverse.ll
+7-7llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+2-8llvm/test/CodeGen/AArch64/sve-fixed-length-rev.ll
+2-6llvm/test/CodeGen/AArch64/sve-fixed-length-bit-counting.ll
+210-684 files

LLVM/project 3af3f03llvm/lib/Analysis InstructionSimplify.cpp, llvm/test/Transforms/InstSimplify call.ll

address review comments

Co-Authored-By: dtcxzyw <dtcxzyw2333 at gmail.com>
DeltaFile
+3-4llvm/lib/Analysis/InstructionSimplify.cpp
+0-3llvm/test/Transforms/InstSimplify/call.ll
+3-72 files

LLVM/project 7be5546llvm/test/Transforms/InstSimplify call.ll

update test
DeltaFile
+3-12llvm/test/Transforms/InstSimplify/call.ll
+3-121 files

LLVM/project 0e8f87fllvm/test/Transforms/InstSimplify call.ll

add test
DeltaFile
+81-0llvm/test/Transforms/InstSimplify/call.ll
+81-01 files

LLVM/project e3c0d11llvm/lib/Analysis InstructionSimplify.cpp

[InstSimplify] Fold fshl/fshr of complementary shifts to identity
DeltaFile
+11-0llvm/lib/Analysis/InstructionSimplify.cpp
+11-01 files

LLVM/project 05c0db7llvm/lib/TableGen Main.cpp, llvm/test/TableGen depfile.td

[TableGen] Emit the primary input file in -d depfile output (#197061)

This fixes a bug where old, but still supported, versions of CMake and
ninja perpetually consider zero-include tablegen files to be out of
date. It also matches what Clang and GCC do for regular C compilations.

When a .td input has no `include` directives, the depfile produced by
`-d` contains only `<output>:` followed by zero dependencies. My version
(3.27) of CMake's `cmake_transform_depfile` step then writes a 0-byte
file, which old versions of ninja treat as a missing depfile and re-run
the rule on every incremental build (e.g. Attributes.td, ValueTypes.td).

Here's the effect on Attributes.inc.d:

```
$ cat ./build/include/llvm/IR/Attributes.inc.d
Attributes.inc:
# switch branches and rebuild...
$ cat ./build/include/llvm/IR/Attributes.inc.d

    [3 lines not shown]
DeltaFile
+19-0llvm/test/TableGen/depfile.td
+10-0llvm/lib/TableGen/Main.cpp
+29-02 files

LLVM/project 51687a6llvm/lib/Transforms/IPO Instrumentor.cpp InstrumentorConfigFile.cpp, llvm/test/Instrumentation/Instrumentor multi_config.ll alloca_and_function.ll

[Instrumentor] Allow multiple config files with different filters

To instrument different functions in different ways we allow to provide
multiple config files now. Each file will result in one instrumentation
run. Multiple files can be passed via command line option or listed in
a "summary" file that is passed via command line option (to keep the
command length managable).
DeltaFile
+53-14llvm/lib/Transforms/IPO/Instrumentor.cpp
+56-0llvm/test/Instrumentation/Instrumentor/multi_config.ll
+20-20llvm/test/Instrumentation/Instrumentor/alloca_and_function.ll
+37-0llvm/lib/Transforms/IPO/InstrumentorConfigFile.cpp
+16-0llvm/test/Instrumentation/Instrumentor/multi_config_4.json
+12-0llvm/test/Instrumentation/Instrumentor/multi_config_2.json
+194-3415 files not shown
+247-4521 files

LLVM/project 18edc05llvm/include/llvm/Transforms/IPO Instrumentor.h, llvm/lib/Transforms/IPO Instrumentor.cpp

[Instrumentor] Add a global function regexp to limit the instrumentation

Only functions that match the "function_regex" will be instrumented,
or if they have the instrumentation attribute.
DeltaFile
+57-0llvm/test/Instrumentation/Instrumentor/function_regex.ll
+26-0llvm/test/Instrumentation/Instrumentor/function_regex.json
+26-0llvm/test/Instrumentation/Instrumentor/bad_function_regex.json
+22-4llvm/lib/Transforms/IPO/Instrumentor.cpp
+13-0llvm/test/Instrumentation/Instrumentor/bad_function_regexp.ll
+7-1llvm/include/llvm/Transforms/IPO/Instrumentor.h
+151-51 files not shown
+154-67 files

LLVM/project 2d46ea3clang/test/Instrumentor UnreachableRT.cpp InstrumentorUnreachable.cpp, llvm/include/llvm/Transforms/IPO Instrumentor.h

[Instrumentor] Add unreachable support; unreachable stack trace printing

Allow to instrument unreachable and provide a use case for stack trace
printing.
DeltaFile
+21-0clang/test/Instrumentor/UnreachableRT.cpp
+21-0llvm/include/llvm/Transforms/IPO/Instrumentor.h
+20-0clang/test/Instrumentor/InstrumentorUnreachable.cpp
+15-0clang/test/Instrumentor/UnreachableRT.json
+12-0llvm/lib/Transforms/IPO/Instrumentor.cpp
+5-1clang/test/Instrumentor/lit.local.cfg
+94-11 files not shown
+99-17 files

LLVM/project 3f1e2a2llvm/lib/Transforms/IPO Instrumentor.cpp InstrumentorConfigFile.cpp, llvm/test/Instrumentation/Instrumentor multi_config.ll alloca_and_function.ll

[Instrumentor] Allow multiple config files with different filters

To instrument different functions in different ways we allow to provide
multiple config files now. Each file will result in one instrumentation
run. Multiple files can be passed via command line option or listed in
a "summary" file that is passed via command line option (to keep the
command length managable).
DeltaFile
+53-14llvm/lib/Transforms/IPO/Instrumentor.cpp
+56-0llvm/test/Instrumentation/Instrumentor/multi_config.ll
+20-20llvm/test/Instrumentation/Instrumentor/alloca_and_function.ll
+36-0llvm/lib/Transforms/IPO/InstrumentorConfigFile.cpp
+16-0llvm/test/Instrumentation/Instrumentor/multi_config_4.json
+12-0llvm/test/Instrumentation/Instrumentor/multi_config_3.json
+193-3415 files not shown
+246-4521 files

LLVM/project b43e153llvm/include/llvm/Transforms/IPO Instrumentor.h, llvm/lib/Transforms/IPO Instrumentor.cpp

[Instrumentor] Add a global function regexp to limit the instrumentation

Only functions that match the "function_regex" will be instrumented,
or if they have the instrumentation attribute.
DeltaFile
+57-0llvm/test/Instrumentation/Instrumentor/function_regex.ll
+26-0llvm/test/Instrumentation/Instrumentor/function_regex.json
+20-2llvm/lib/Transforms/IPO/Instrumentor.cpp
+7-1llvm/include/llvm/Transforms/IPO/Instrumentor.h
+3-1llvm/test/Instrumentation/Instrumentor/default_config.json
+113-45 files

LLVM/project 6709926clang-tools-extra/docs/clang-tidy Contributing.rst

[clang-tidy][docs] Remove outdated Phabricator reference (#196997)

Removed the old Phabricator mention from the clang-tidy contributing
guide. Since LLVM uses GitHub for code review now, this updates the
wording to match the current contribution workflow.
DeltaFile
+2-2clang-tools-extra/docs/clang-tidy/Contributing.rst
+2-21 files

LLVM/project de27589clang/test/Instrumentor UnreachableRT.cpp InstrumentorUnreachable.cpp, llvm/include/llvm/Transforms/IPO Instrumentor.h

[Instrumentor] Add unreachable support; unreachable stack trace printing

Allow to instrument unreachable and provide a use case for stack trace
printing.
DeltaFile
+21-0clang/test/Instrumentor/UnreachableRT.cpp
+21-0llvm/include/llvm/Transforms/IPO/Instrumentor.h
+20-0clang/test/Instrumentor/InstrumentorUnreachable.cpp
+15-0clang/test/Instrumentor/UnreachableRT.json
+12-0llvm/lib/Transforms/IPO/Instrumentor.cpp
+5-1clang/test/Instrumentor/lit.local.cfg
+94-11 files not shown
+99-17 files

LLVM/project 08c77d0llvm/utils/gn/secondary/clang/unittests/ScalableStaticAnalysisFramework BUILD.gn

[gn build] Port 0c101370f58a (#197073)
DeltaFile
+1-0llvm/utils/gn/secondary/clang/unittests/ScalableStaticAnalysisFramework/BUILD.gn
+1-01 files

LLVM/project b48b110llvm/test/Transforms/LoopVectorize/RISCV strided-accesses.ll

[LV][RISCV] Simplify strided-accesses test checks by ignoring loop metadata. nfc (#196026)

Use --replace-value-regex to ignore specific !llvm.loop metadata numbers
since the metadata IDs are not important for this test.
DeltaFile
+212-394llvm/test/Transforms/LoopVectorize/RISCV/strided-accesses.ll
+212-3941 files

LLVM/project 70a70e0llvm/lib/Target/AMDGPU AMDGPUAsmPrinter.cpp GCNSubtarget.h, llvm/lib/Target/AMDGPU/MCTargetDesc AMDGPUMCExpr.cpp

Revert "[AMDGPU] Account for inline asm size in inst_pref_size calculation" (#197070)

Reverts llvm/llvm-project#192306
breaking other roundtrip test
DeltaFile
+0-154llvm/test/CodeGen/AMDGPU/inst-prefetch-inline-asm.ll
+41-42llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
+9-41llvm/test/CodeGen/AMDGPU/inst-prefetch-hint.ll
+0-45llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCExpr.cpp
+0-18llvm/lib/Target/AMDGPU/GCNSubtarget.h
+14-3llvm/lib/Target/AMDGPU/SIProgramInfo.cpp
+64-3034 files not shown
+68-32410 files

LLVM/project 1122075llvm/docs Instrumentor.rst UserGuides.rst, llvm/utils instrumentor-config-wizard.py

[Instrumentor][NFC] Add docs and config-wizard script

This commit adds initial documentation for the instrumentor to the
html/man pages and provides a script that helps new users to setup the
config and stubs file interactively.
DeltaFile
+834-0llvm/utils/instrumentor-config-wizard.py
+776-0llvm/docs/Instrumentor.rst
+5-0llvm/docs/UserGuides.rst
+1,615-03 files

LLVM/project 896e337llvm/lib/Target/AMDGPU AMDGPUAsmPrinter.cpp GCNSubtarget.h, llvm/lib/Target/AMDGPU/MCTargetDesc AMDGPUMCExpr.cpp

Revert "[AMDGPU] Account for inline asm size in inst_pref_size calculation (#…"

This reverts commit 7ddee0b619f658cef905a69427ef9531fd1d229d.
DeltaFile
+0-154llvm/test/CodeGen/AMDGPU/inst-prefetch-inline-asm.ll
+41-42llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
+9-41llvm/test/CodeGen/AMDGPU/inst-prefetch-hint.ll
+0-45llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCExpr.cpp
+0-18llvm/lib/Target/AMDGPU/GCNSubtarget.h
+14-3llvm/lib/Target/AMDGPU/SIProgramInfo.cpp
+64-3034 files not shown
+68-32410 files

LLVM/project 7bdb2d2llvm/docs Instrumentor.rst UserGuides.rst, llvm/utils instrumentor-config-wizard.py

[Instrumentor][NFC] Add docs and config-wizard script

This commit adds initial documentation for the instrumentor to the
html/man pages and provides a script that helps new users to setup the
config and stubs file interactively.
DeltaFile
+776-0llvm/docs/Instrumentor.rst
+737-0llvm/utils/instrumentor-config-wizard.py
+5-0llvm/docs/UserGuides.rst
+1,518-03 files

LLVM/project 0c10137clang/include/clang/ScalableStaticAnalysisFramework/Analyses/PointerFlow PointerFlowAnalysis.h, clang/lib/ScalableStaticAnalysisFramework/Analyses/PointerFlow PointerFlowAnalysis.cpp PointerFlowExtractor.cpp

[SSAF][WPA] Add PointerFlowReachableAnalysis (#193097)

PointerFlowReachableAnalysis uses PointerFlow and UnsafeBufferUsage
summaries.  It computes reachable nodes in the PointerFlow graph from
unsafe buffer nodes in the UnsafeBufferUsage summary.
    
rdar://174874942

---------

Co-authored-by: Balázs Benics <benicsbalazs at gmail.com>
Co-authored-by: Jan Korous <jkorous at apple.com>
DeltaFile
+378-0clang/unittests/ScalableStaticAnalysisFramework/WholeProgramAnalysis/UnsafeBufferReachableAnalysisTest.cpp
+120-5clang/lib/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowAnalysis.cpp
+29-5clang/include/clang/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowAnalysis.h
+0-1clang/lib/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowExtractor.cpp
+1-0clang/unittests/ScalableStaticAnalysisFramework/CMakeLists.txt
+528-115 files

LLVM/project f15ad32clang/lib/CIR/CodeGen CIRGenExpr.cpp

Relocate stack addrspace casts after allocas
DeltaFile
+3-3clang/lib/CIR/CodeGen/CIRGenExpr.cpp
+3-31 files

LLVM/project dc58013llvm/include/llvm/DebugInfo/GSYM FunctionInfo.h CallSiteInfo.h, llvm/lib/DebugInfo/GSYM GsymCreator.cpp

[llvm-gsymutil] Replace truncated DWARF names with mangled names from symbol table (#184221)

## Summary
- During `GsymCreator::finalize()`, when deduplicating entries with the
same address range, check if the DWARF
  entry's name is a truncated version of the symbol table's mangled name
- If the DWARF name is a substring of the demangled symbol table name,
replace it with the full mangled name
  before discarding the symbol table entry
- This allows downstream tools to properly demangle and display full
function signatures

  ## Test plan

  ### Unit tests
- `TestMangledNameReplacement`: Verifies DWARF name `make_ftype` is
replaced with `_Z10make_ftypePci` and line
  table is preserved
- `TestMangledNameReplacementNegative`: Verifies no replacement when

    [41 lines not shown]
DeltaFile
+139-0llvm/unittests/DebugInfo/GSYM/GSYMTest.cpp
+128-0llvm/test/tools/llvm-gsymutil/X86/elf-swift-mangled-name-replacement.yaml
+128-0llvm/test/tools/llvm-gsymutil/X86/elf-mangled-name-replacement.yaml
+47-12llvm/lib/DebugInfo/GSYM/GsymCreator.cpp
+11-6llvm/include/llvm/DebugInfo/GSYM/FunctionInfo.h
+7-0llvm/include/llvm/DebugInfo/GSYM/CallSiteInfo.h
+460-186 files

LLVM/project 71929a1flang/lib/Optimizer/OpenMP LowerWorkdistribute.cpp, mlir/lib/Dialect/OpenMP/IR OpenMPDialect.cpp

[mlir][OpenMP] Add iterator support to map/motion clause

Extend map/motion clause to support `!omp.iterated<Ty>` handles
alongside map/motion locators.

This is part of feature work for #188061

Assisted with copilot
DeltaFile
+128-21mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
+100-1mlir/test/Dialect/OpenMP/ops.mlir
+83-0mlir/test/Target/LLVMIR/openmp-todo.mlir
+38-4mlir/test/Dialect/OpenMP/invalid.mlir
+19-18flang/lib/Optimizer/OpenMP/LowerWorkdistribute.cpp
+14-3mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+382-475 files not shown
+403-6111 files

LLVM/project 1d1453emlir/lib/Dialect/OpenMP/IR OpenMPDialect.cpp, mlir/lib/Target/LLVMIR/Dialect/OpenMP OpenMPToLLVMIRTranslation.cpp

Add verifier check for iterated map info and tests for declare mapper
DeltaFile
+79-60mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
+109-1mlir/test/Dialect/OpenMP/invalid.mlir
+24-0mlir/test/Target/LLVMIR/openmp-todo.mlir
+18-0mlir/test/Dialect/OpenMP/ops.mlir
+6-0mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+236-615 files

LLVM/project 7312fa6llvm/test/CodeGen/AMDGPU regpressure-physreg-limits.mir

Added new test for physical register isAllocatable and aliasing.
DeltaFile
+124-0llvm/test/CodeGen/AMDGPU/regpressure-physreg-limits.mir
+124-01 files

LLVM/project 729a085clang/test/Instrumentor StackUsageRT.cpp StackUsageRT.json, llvm/include/llvm/Transforms/IPO Instrumentor.h

[Instrumentor] Add Alloca and Function support; stack usage example

This adds support for alloca instrumentation and function pre/post
instrumentation. Alloca support follows load/store support directly.
Functions require special care to determine the insertion points.

Together, we can showcase how the stack high watermark can be profiled,
see InstrumentorStackUsage.cpp.
DeltaFile
+296-7llvm/lib/Transforms/IPO/Instrumentor.cpp
+118-8llvm/include/llvm/Transforms/IPO/Instrumentor.h
+60-0clang/test/Instrumentor/StackUsageRT.cpp
+59-0llvm/test/Instrumentation/Instrumentor/default_config.json
+56-0llvm/test/Instrumentation/Instrumentor/alloca_and_function.ll
+54-0clang/test/Instrumentor/StackUsageRT.json
+643-152 files not shown
+682-158 files

LLVM/project 0b501edmlir/lib/Dialect/OpenMP/IR OpenMPDialect.cpp, mlir/lib/Target/LLVMIR/Dialect/OpenMP OpenMPToLLVMIRTranslation.cpp

Add verifier check for iterated map info and tests for declare mapper
DeltaFile
+79-60mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
+109-1mlir/test/Dialect/OpenMP/invalid.mlir
+24-0mlir/test/Target/LLVMIR/openmp-todo.mlir
+18-0mlir/test/Dialect/OpenMP/ops.mlir
+6-0mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+236-615 files

LLVM/project c2e6fafllvm/lib/Target/AMDGPU GCNRegPressure.cpp GCNRegPressure.h

Added helper shouldTrackPhysReg.
DeltaFile
+8-11llvm/lib/Target/AMDGPU/GCNRegPressure.cpp
+4-0llvm/lib/Target/AMDGPU/GCNRegPressure.h
+12-112 files

LLVM/project 127cc5cflang/lib/Optimizer/OpenMP LowerWorkdistribute.cpp, mlir/lib/Dialect/OpenMP/IR OpenMPDialect.cpp

[mlir][OpenMP] Add iterator support to map/motion clause

Extend map/motion clause to support `!omp.iterated<Ty>` handles
alongside map/motion locators.

This is part of feature work for #188061

Assisted with copilot
DeltaFile
+128-21mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
+100-1mlir/test/Dialect/OpenMP/ops.mlir
+83-0mlir/test/Target/LLVMIR/openmp-todo.mlir
+38-4mlir/test/Dialect/OpenMP/invalid.mlir
+19-18flang/lib/Optimizer/OpenMP/LowerWorkdistribute.cpp
+14-3mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+382-475 files not shown
+403-6111 files