LLVM/project 2436d9bllvm/lib/Support/rpmalloc rpmalloc.c malloc.c, llvm/lib/Target/AMDGPU AMDGPUPromoteAlloca.cpp SIInsertWaitcnts.cpp

Merge branch 'main' into users/jmmartinez/reapply/fix/extract_insert_vector_dynelt_with_O0-1
DeltaFile
+3,996-3,996llvm/lib/Support/rpmalloc/rpmalloc.c
+724-724llvm/lib/Support/rpmalloc/malloc.c
+677-36mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
+347-304llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
+637-0mlir/test/Dialect/LLVMIR/nvvm-mma-sparse-blockscale.mlir
+329-289llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
+6,710-5,349772 files not shown
+27,890-13,148778 files

LLVM/project 7345233lldb/include/lldb/Host Terminal.h, lldb/include/lldb/Host/common DiagnosticsRendering.h

[lldb] improve the heuristics for checking if a terminal supports Unicode (#171832)

This patch improves the way lldb checks if the terminal it's opened in
(if any) supports Unicode or not.

On POSIX systems, we check if `LANG` contains `UTF-8`.

On Windows, we always return `true` since we use the `WriteToConsoleW`
api.

This is a relanding of https://github.com/llvm/llvm-project/pull/168603.

The tests failed because the bots support Unicode but the tests expect
ASCII. To avoid different outputs depending on the environment the tests
are running in, this patch always force ASCII in the tests.
DeltaFile
+18-1lldb/include/lldb/Host/common/DiagnosticsRendering.h
+17-0lldb/source/Host/common/Terminal.cpp
+7-7lldb/test/Shell/Commands/command-expr-diagnostics.test
+6-6lldb/test/Shell/Commands/command-options.test
+12-0lldb/include/lldb/Host/Terminal.h
+5-6lldb/source/Host/common/DiagnosticsRendering.cpp
+65-202 files not shown
+70-258 files

LLVM/project 95e6d23llvm/lib/Target/X86 X86ISelLowering.cpp, llvm/test/CodeGen/X86 vector-shuffle-combining-avx2.ll

[X86] combineHorizOpWithShuffle - ensure we handle undef elements from widened shuffle (#172014)

Since #170838 we no longer canonicalise away whole-lane shuffles of
horizontal ops, so we need to better handle cases where widened shuffle
masks might still contain undefs.

Fixes #172010
DeltaFile
+33-0llvm/test/CodeGen/X86/vector-shuffle-combining-avx2.ll
+5-3llvm/lib/Target/X86/X86ISelLowering.cpp
+38-32 files

LLVM/project 568ce76mlir/include/mlir/Dialect/LLVMIR/Transforms UseDefaultVisibilityPass.h Passes.td, mlir/lib/Dialect/LLVMIR/Transforms UseDefaultVisibilityPass.cpp CMakeLists.txt

[MLIR][LLVM] Add pass to update ops with default visibility (#171727)

To support the `-fvisibility=...` option in Flang, we need a pass to
rewrite all the global definitions in the LLVM dialect that have the
default visibility to have the specified visibility. This change adds
such a pass.

Note that I did not add an option for `visiblity=default`; I believe
this makes sense for compiler drivers since users may want to tack an
option on at the end of a compile line to override earlier options, but
I don't think it makes sense for this pass to accept
`visibility=default`--it would just be an early exit IIUC.
DeltaFile
+179-0mlir/test/Dialect/LLVMIR/use-default-visibility.mlir
+54-0mlir/lib/Dialect/LLVMIR/Transforms/UseDefaultVisibilityPass.cpp
+25-0mlir/include/mlir/Dialect/LLVMIR/Transforms/UseDefaultVisibilityPass.h
+20-1mlir/include/mlir/Dialect/LLVMIR/Transforms/Passes.td
+1-0mlir/lib/Dialect/LLVMIR/Transforms/CMakeLists.txt
+279-15 files

LLVM/project 3a04e01libc/src/__support/wctype lower_to_upper.inc upper_to_lower.inc, libc/utils/wctype_utils gen.py README.rst

[libc][wctype][codegen] Add generation script for conversion data (#170868)

Closes #170871
DeltaFile
+400-0libc/src/__support/wctype/lower_to_upper.inc
+390-0libc/src/__support/wctype/upper_to_lower.inc
+52-0libc/utils/wctype_utils/gen.py
+35-0libc/utils/wctype_utils/conversion/hex_writer.py
+31-0libc/utils/wctype_utils/conversion/gen_conversion_data.py
+7-0libc/utils/wctype_utils/README.rst
+915-01 files not shown
+918-07 files

LLVM/project 7d21334flang/test/Semantics modfile73.f90 spec-expr.f90

[flang][NFC] Strip trailing whitespace from tests (12 of 14)

Only some fortran sourcefiles in flang/test/Semantics have been
modified. The remaining files will be cleaned up in subsequent commits.
DeltaFile
+16-16flang/test/Semantics/modfile73.f90
+10-10flang/test/Semantics/spec-expr.f90
+6-6flang/test/Semantics/resolve83.f90
+5-5flang/test/Semantics/resolve104.f90
+4-4flang/test/Semantics/resolve72.f90
+3-3flang/test/Semantics/resolve87.f90
+44-4419 files not shown
+73-7325 files

LLVM/project 6f44be6lldb/source/Plugins/SymbolFile/NativePDB UdtRecordCompleter.cpp UdtRecordCompleter.h, lldb/test/Shell/SymbolFile/NativePDB ast-types.cpp

[LLDB][NativePDB] Use original struct name when searching for constants (#166845)

We used to search for constants using the name we parsed. For C++, this
would mean using the demangled struct name (from the unique name). This
name is not always equal to the one used for the struct's name by the
compiler. For example:

```
  0x105E | LF_STRUCTURE [size = 120, hash = 0xF38F] ``anonymous namespace'::Anonymous<A::B::C<void> >::D`
           unique name: `.?AUD@?$Anonymous at U?$C at X@B at A@@@?A0x8C295248@@`
```
We would use the unique name and get to `(anonymous
namespace)::Anonymous<struct A::B::C<void>>::D`. Then, when finding the
constant in the field list, we'd search for `(anonymous
namespace)::Anonymous<struct A::B::C<void>>::D::StaticMember`. This
wouldn't yield any results, because the constant will use the demangled
name as given by the compiler.

With this PR, we use the struct's name as given in the PDB and append
the member name.
DeltaFile
+14-18lldb/source/Plugins/SymbolFile/NativePDB/UdtRecordCompleter.cpp
+19-3lldb/test/Shell/SymbolFile/NativePDB/ast-types.cpp
+2-7lldb/source/Plugins/SymbolFile/NativePDB/UdtRecordCompleter.h
+1-0lldb/test/Shell/SymbolFile/NativePDB/Inputs/ast-types.lldbinit
+36-284 files

LLVM/project 42defcdllvm/utils/gn/secondary/llvm/lib/Target/Hexagon BUILD.gn

[gn build] Port 48d942c7158a
DeltaFile
+0-3llvm/utils/gn/secondary/llvm/lib/Target/Hexagon/BUILD.gn
+0-31 files

LLVM/project 5ebb928mlir/include/mlir/Dialect/AMDGPU/IR AMDGPU.td, mlir/lib/Conversion/AMDGPUToROCDL AMDGPUToROCDL.cpp

[mlir][amdgpu] Adds make_dma_gather_base (#171857)

* Adds `tdm_gather_base` type.
* Adds `make_dma_gather_base` op.
* Adds `make_dma_gather_base` lowering to ROCDL.
DeltaFile
+67-48mlir/lib/Conversion/AMDGPUToROCDL/AMDGPUToROCDL.cpp
+75-29mlir/test/Conversion/AMDGPUToROCDL/gfx1250.mlir
+74-7mlir/include/mlir/Dialect/AMDGPU/IR/AMDGPU.td
+34-10mlir/lib/Dialect/AMDGPU/IR/AMDGPUDialect.cpp
+26-0mlir/test/Dialect/AMDGPU/invalid.mlir
+276-945 files

LLVM/project 1451f3dflang/lib/Lower/OpenMP Clauses.cpp ClauseProcessor.cpp, flang/lib/Semantics openmp-utils.cpp

[flang][OpenMP] Use StylizedInstance in converted clauses (#171907)

Invent `StylizedInstance` class to store special variables together with
the instantiated expression in omp::clause::Initializer. This will
eliminate the need for visiting the original AST nodes in lowering to
MLIR.
DeltaFile
+28-19flang/lib/Lower/OpenMP/Clauses.cpp
+16-16flang/lib/Lower/OpenMP/ClauseProcessor.cpp
+20-0flang/lib/Semantics/openmp-utils.cpp
+9-2llvm/include/llvm/Frontend/OpenMP/ClauseT.h
+2-2flang/lib/Lower/OpenMP/ClauseProcessor.h
+1-3flang/lib/Lower/OpenMP/OpenMP.cpp
+76-422 files not shown
+81-428 files

LLVM/project 099985fllvm/utils/gn/secondary/clang-tools-extra/clang-doc/tool BUILD.gn

[gn] port 3d1f04425a8fe
DeltaFile
+1-0llvm/utils/gn/secondary/clang-tools-extra/clang-doc/tool/BUILD.gn
+1-01 files

LLVM/project ffac200llvm/utils/gn/secondary/clang-tools-extra/clang-doc/tool BUILD.gn

[gn] port 4e9e7c5816bc1
DeltaFile
+1-0llvm/utils/gn/secondary/clang-tools-extra/clang-doc/tool/BUILD.gn
+1-01 files

LLVM/project 1dbff71clang/lib/CIR/CodeGen CIRGenModule.cpp CIRGenDeclOpenACC.cpp, clang/test/CIR/CodeGenOpenACC routine-bind.cpp routine-bind.c

[OpenACC][CIR] 'bind' lowering with identifier (#171749)

The bind clause specifies the name of the function to call on the
device, and takes either a string or identifier(per the standard):

"If the name is specified as an identifier, it is callled as if the name
were specified in the language being compiled. If the name is specified
as a string, the string is used for the procedure name unmodified".

The latter (as a string) is already implemented, this patch implements
the former. Unfortunately, no existing implementation of this in C++
seems to exist. Other languages, the 'name' of a function is sufficient
to identify it (in this case 'bind' can refer to undeclared functions),
so it is possible to figure out what the name should be. In C++ with
overloading (without a discriminator, ala-fortran), a name only names an
infinite overload set.

SO, in order to implement this, I've decided that the 'called as'
(bound) function must have the same signature as the one marked by the

    [6 lines not shown]
DeltaFile
+117-12clang/test/CIR/CodeGenOpenACC/routine-bind.cpp
+65-0clang/lib/CIR/CodeGen/CIRGenModule.cpp
+41-0clang/test/CIR/CodeGenOpenACC/routine-bind.c
+11-5clang/lib/CIR/CodeGen/CIRGenDeclOpenACC.cpp
+9-0clang/lib/CIR/CodeGen/CIRGenModule.h
+243-175 files

LLVM/project eb98089llvm/lib/ObjCopy ConfigManager.cpp, llvm/test/tools/llvm-objcopy/COFF strip-preserve-mtime.test

[llvm-objcopy] Allow -p on COFF targets (#171237)

Binutils allows `-p`, which prevents it from modifying the timestamp.
`llvm-objcopy` already preserves the timestamp in the COFF header, so
the only missing piece is allowing the option in the config manager.
DeltaFile
+50-0llvm/test/tools/llvm-objcopy/COFF/strip-preserve-mtime.test
+2-3llvm/lib/ObjCopy/ConfigManager.cpp
+52-32 files

LLVM/project b1f6180llvm/lib/Analysis DependenceAnalysis.cpp, llvm/test/Analysis/DependenceAnalysis infer_affine_domain_ovlf.ll

[DA] Introduce OverflowSafeSignedAPInt to prevent potential overflow
DeltaFile
+146-41llvm/lib/Analysis/DependenceAnalysis.cpp
+1-1llvm/test/Analysis/DependenceAnalysis/infer_affine_domain_ovlf.ll
+147-422 files

LLVM/project cd8bcfbllvm/lib/CodeGen WinEHPrepare.cpp

use removeIncomingValueIf() as suggested
DeltaFile
+20-21llvm/lib/CodeGen/WinEHPrepare.cpp
+20-211 files

LLVM/project bb0f8d1llvm/lib/Analysis DependenceAnalysis.cpp, llvm/test/Analysis/DependenceAnalysis infer_affine_domain_ovlf.ll

[DA] Introduce OverflowSafeSignedAPInt to prevent potential overflow
DeltaFile
+146-41llvm/lib/Analysis/DependenceAnalysis.cpp
+1-1llvm/test/Analysis/DependenceAnalysis/infer_affine_domain_ovlf.ll
+147-422 files

LLVM/project 234c414llvm/utils/gn/secondary/llvm/include/llvm/Config BUILD.gn

[gn] "port" 8e999e3d7857 (LLVM_ENABLE_IO_SANDBOX)
DeltaFile
+1-0llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
+1-01 files

LLVM/project 66601d8llvm/utils/gn/secondary/clang/lib/Analysis/Scalable BUILD.gn, llvm/utils/gn/secondary/clang/unittests BUILD.gn

[gn] port 4c6aa8fd8abe7e4f0 (clang/Analysis/Scalable)
DeltaFile
+19-0llvm/utils/gn/secondary/clang/unittests/Analysis/Scalable/BUILD.gn
+18-0llvm/utils/gn/secondary/clang/lib/Analysis/Scalable/BUILD.gn
+1-0llvm/utils/gn/secondary/clang/unittests/BUILD.gn
+38-03 files

LLVM/project 80e521ellvm/include/llvm/Transforms/Utils LoopPeel.h UnrollLoop.h, llvm/lib/Transforms/Scalar LoopUnrollPass.cpp

[LoopPeel] Peel loops to enable natural-sized loads
DeltaFile
+479-0llvm/test/Transforms/LoopUnroll/peel-last-for-load-widening.ll
+356-1llvm/lib/Transforms/Utils/LoopPeel.cpp
+172-0llvm/test/Transforms/LoopUnroll/peel-load-widening-edge-cases.ll
+15-3llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp
+13-1llvm/include/llvm/Transforms/Utils/LoopPeel.h
+2-1llvm/include/llvm/Transforms/Utils/UnrollLoop.h
+1,037-66 files

LLVM/project 7d151cflldb/source/API SBFrame.cpp

[LLDB][NFC] Remove redundant target/process checks in SBFrame (#153258)

This is a follow up to https://github.com/llvm/llvm-project/pull/152020,
continuing the removal of now-redundant `if(process && target)` checks.
Since this causes a diff in every line of the affected functions, this
commit also uses the opportunity to create some helper functions and
reduce nesting of the affected methods by rewriting all pre-condition
checks as early returns, while remaining strictly NFC.

This has exposed some odd behaviors:

1. `SBFrame::GetVariables` has a variable `num_produced` which is
clearly meant to be incremented on every iteration of the loop but it is
only incremented once, after the loop. So its value is always 0 or
   1. The variable now lives in `FetchVariablesUnlessInterrupted`.
2. `SBFrame::GetVariables` has an interruption mechanism for local
variables, but not for "recognized arguments". It's unclear if this is
by design or not, but it is now evident that there is a discrepancy
there.

    [4 lines not shown]
DeltaFile
+263-250lldb/source/API/SBFrame.cpp
+263-2501 files

LLVM/project e151434llvm/lib/Target/AMDGPU SIInsertWaitcnts.cpp

[AMDGPU][InsertWaitCnts][NFC] Merge VMEM_ACCESS and VMEM_READ_ACCESS into a single event type (#171973)

DeltaFile
+7-8llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
+7-81 files

LLVM/project 9d19f02llvm/lib/Analysis ValueTracking.cpp, llvm/test/Transforms/Attributor/AMDGPU nofpclass-amdgcn-rsq.ll

ValueTracking: Handle amdgcn.rsq intrinsic in computeKnownFPClass

We have other target intrinsics already in ValueTracking functions,
and no access to TTI.
DeltaFile
+56-56llvm/test/Transforms/Attributor/AMDGPU/nofpclass-amdgcn-rsq.ll
+38-0llvm/lib/Analysis/ValueTracking.cpp
+94-562 files

LLVM/project 87b3bf5llvm/test/Transforms/Attributor/AMDGPU nofpclass-amdgcn-rsq.ll

ValueTracking: Add baseline test for fpclass handling of amdgcn.rsq (#171836)

DeltaFile
+290-0llvm/test/Transforms/Attributor/AMDGPU/nofpclass-amdgcn-rsq.ll
+290-01 files

LLVM/project 07eb9famlir/include/mlir/Dialect/LLVMIR NVVMOps.td, mlir/lib/Dialect/LLVMIR/IR NVVMDialect.cpp

[MLIR][NVVM] Support for dense and sparse MMA with block scaling (#170566)

This change adds dense and sparse MMA with block scaling intrinsics to
MLIR -> NVVM IR -> NVPTX flow. NVVM and NVPTX implementation is based on
PTX ISA 9.0.
DeltaFile
+677-36mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
+637-0mlir/test/Dialect/LLVMIR/nvvm-mma-sparse-blockscale.mlir
+525-0mlir/test/Dialect/LLVMIR/nvvm-mma-blockscale.mlir
+458-35mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
+48-48mlir/test/Target/LLVMIR/nvvm/tcgen05-mma-sp-block-scale-shared.mlir
+48-48mlir/test/Target/LLVMIR/nvvm/tcgen05-mma-block-scale-shared.mlir
+2,393-1673 files not shown
+2,493-2679 files

LLVM/project 8db99e9llvm/lib/Analysis DependenceAnalysis.cpp

[DA] Remove ExtraGCD from GCD MIV (NFC)
DeltaFile
+1-7llvm/lib/Analysis/DependenceAnalysis.cpp
+1-71 files

LLVM/project bcbab83llvm/lib/Analysis DependenceAnalysis.cpp, llvm/test/Analysis/DependenceAnalysis gcd-miv-overflow.ll

[DA] Add overflow check in GCD MIV
DeltaFile
+2-3llvm/test/Analysis/DependenceAnalysis/gcd-miv-overflow.ll
+3-1llvm/lib/Analysis/DependenceAnalysis.cpp
+5-42 files

LLVM/project 8a590f0llvm/test/Analysis/DependenceAnalysis gcd-miv-overflow.ll

[DA] Add test for GCD MIV misses dependency due to overflow (NFC)
DeltaFile
+84-0llvm/test/Analysis/DependenceAnalysis/gcd-miv-overflow.ll
+84-01 files

LLVM/project 26ec186llvm/test CMakeLists.txt lit.cfg.py, llvm/test/Examples lit.local.cfg

[𝘀𝗽𝗿] initial version

Created using spr 1.3.5-bogner
DeltaFile
+2-2llvm/test/CMakeLists.txt
+1-1llvm/test/Examples/lit.local.cfg
+1-1llvm/test/lit.cfg.py
+1-1llvm/test/lit.site.cfg.py.in
+5-54 files

LLVM/project df7b90bclang-tools-extra/clang-tidy/bugprone BranchCloneCheck.cpp

[clang-tidy][NFC] Refactor `bugprone-branch-clone` (#171849)

DeltaFile
+14-42clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp
+14-421 files