LLVM/project ea16f7dlibcxx/include fstream

[libcxx] Fix xsgetn in basic_filebuf (#167779)

The optimized version of xsgetn for basic_filebuf added in #165223 has
an issue where if the reads come from both the buffer and the
filesystem it returns the wrong number of characters. This patch should
address the issue.
DeltaFile
+8-2libcxx/include/fstream
+8-21 files

LLVM/project 89c08adlldb/unittests/Expression ValueMatcher.cpp DWARFExpressionTest.cpp

[lldb] Add a gtest matcher for lldb_private::Value (#167427)

This commit adds a new `ValueMatcher` class that can be used in gtest
matching contexts to match against `lldb_private::Value` objects. We
always match against the values `value_type` and `context_type`. For
HostAddress values we will also match against the expected host buffer
contents. For Scalar, FileAddress, and LoadAddress values we match
against an expected Scalar value.

The matcher is used to improve the quality of the tests in the
`DwarfExpressionTest.cpp` file. Previously, the local `Evaluate`
function would return an `Expected<Scalar>` value which makes it hard to
verify that we actually get a Value of the expected type without adding
custom evaluation code. Now we return an `Expected<Value>` so that we
can match against the full value contents.

The resulting change improves the quality of the existing checks and in
some cases eliminates the need for special code to explicitly check
value types.

    [3 lines not shown]
DeltaFile
+205-0lldb/unittests/Expression/ValueMatcher.cpp
+60-142lldb/unittests/Expression/DWARFExpressionTest.cpp
+155-0lldb/unittests/Expression/ValueMatcher.h
+1-0lldb/unittests/Expression/CMakeLists.txt
+421-1424 files

LLVM/project d6703bbllvm/lib/Target/AArch64/GISel AArch64InstructionSelector.cpp

[GISel][AArch64] Create emitCMP instead of cloning a virtual register (NFC) (#155262)

CMN also has a function like this, we should do the same with CMP.
DeltaFile
+13-4llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
+13-41 files

LLVM/project 0acdbd5llvm/lib/CodeGen/LiveDebugValues InstrRefBasedImpl.cpp, llvm/unittests/CodeGen InstrRefLDVTest.cpp

[InstrRef] Consistently use MLocTracker::getLocID() before calling lookupOrTrackRegister (#167841)

The LocID for registers is just the register ID. The getLocID function
is supposed to hide this detail, but it wasn't being used consistently.

This avoids a bunch of implicit casts from Register or MCRegister to
unsigned.
DeltaFile
+17-17llvm/unittests/CodeGen/InstrRefLDVTest.cpp
+19-14llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
+36-312 files

LLVM/project c78fb8dllvm/include/llvm/ADT DenseMap.h

[ADT] Simplify SmallDenseMap::grow (NFC) (#167829)

Without this patch, SmallDenseMap::grow has two separate code paths to
grow the bucket array.  The code path to handle the small mode has its
own traversal over the bucket array.  This patch simplifies this logic
as follows:

1. Allocate a temporary instance of SmallDenseMap.
2. Move valid key/value pairs to the temporary instance.
3. Move LargeRep to *this.

Remarks:

- This patch adds moveFromImpl to move key/value pairs.
  moveFromOldBuckets is updated to use the new helper function.

- This patch adds a private constructor to SmallDenseMap that takes an
  exact number of buckets, accompanied by tag ExactBucketCount.


    [6 lines not shown]
DeltaFile
+33-42llvm/include/llvm/ADT/DenseMap.h
+33-421 files

LLVM/project 12322b2llvm/lib/Target/AArch64 AArch64ISelLowering.cpp, llvm/test/CodeGen/AArch64 sme-aarch64-svcount.ll

[AArch64][SVE] Allow basic use of `target("aarch64.svcount")` with +sve  (#167875)

This prevents the backend from crashing for basic uses of __SVCount_t
type (e.g., as function arguments), without +sve2p1 or +sme2.
    
Fixes #167462
DeltaFile
+11-9llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+2-2llvm/test/CodeGen/AArch64/sme-aarch64-svcount.ll
+13-112 files

LLVM/project f7e6521compiler-rt/lib/builtins/arm divsf3.S mulsf3.S, compiler-rt/lib/builtins/arm/thumb1 mulsf3.S

[compiler-rt][ARM] Optimized mulsf3 and divsf3 (#161546)

This commit adds optimized assembly versions of single-precision float
multiplication and division. Both functions are implemented in a style
that can be assembled as either of Arm and Thumb2; for multiplication, a
separate implementation is provided for Thumb1. Also, extensive new
tests are added for multiplication and division.

These implementations can be removed from the build by defining the
cmake variable COMPILER_RT_ARM_OPTIMIZED_FP=OFF.

Outlying parts of the functionality which are not on the fast path, such
as NaN handling and underflow, are handled in helper functions written
in C. These can be shared between the Arm/Thumb2 and Thumb1
implementations, and also reused by other optimized assembly functions
we hope to add in future.
DeltaFile
+616-0compiler-rt/test/builtins/Unit/mulsf3_test.c
+608-0compiler-rt/lib/builtins/arm/divsf3.S
+408-95compiler-rt/test/builtins/Unit/divsf3_test.c
+309-0compiler-rt/lib/builtins/arm/mulsf3.S
+251-0compiler-rt/lib/builtins/arm/thumb1/mulsf3.S
+78-0compiler-rt/lib/builtins/arm/funder.c
+2,270-955 files not shown
+2,461-9511 files

LLVM/project a04c6b5llvm/lib/Transforms/Vectorize LoopVectorize.cpp, llvm/test/Transforms/LoopVectorize/AArch64 bug165359.ll

[LV] Update LoopVectorizationPlanner::emitInvalidCostRemarks to handle reduction plans (#165913)

The TypeSwitch for extracting the Opcode now handles the `VPReductionRecipe` case.

Fixes #165359.
DeltaFile
+25-0llvm/test/Transforms/LoopVectorize/AArch64/bug165359.ll
+3-0llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+28-02 files

LLVM/project 6a0ba8bclang/lib/CIR/CodeGen CIRGenExprAggregate.cpp, clang/test/CIR/CodeGen struct-init.cpp

[CIR] Prepare a 'this' for CXXDefaultInitExprs (#165994)

Prepare a 'this' for CXXDefaultInitExprs
DeltaFile
+23-0clang/test/CIR/CodeGen/struct-init.cpp
+3-0clang/lib/CIR/CodeGen/CIRGenExprAggregate.cpp
+26-02 files

LLVM/project e1324a9flang/include/flang/Semantics symbol.h, flang/lib/Lower/OpenMP OpenMP.cpp

Revert "[Flang][OpenMP] Update declare mapper lookup via use-module" (#167896)

Reverts llvm/llvm-project#163860
DeltaFile
+5-54flang/lib/Lower/OpenMP/OpenMP.cpp
+13-34flang/lib/Semantics/resolve-names.cpp
+1-25flang/test/Lower/OpenMP/declare-mapper.f90
+1-19flang/include/flang/Semantics/symbol.h
+0-14flang/test/Semantics/OpenMP/declare-mapper-modfile.f90
+0-12flang/lib/Semantics/mod-file.cpp
+20-1587 files not shown
+37-19713 files

LLVM/project e5c418fllvm/include/llvm/TableGen CodeGenHelpers.h, llvm/utils/TableGen SubtargetEmitter.cpp

[NFC][TableGen] Adopt CodeGenHelpers in SubtargetEmitter (#163820)

- Adopt ifdef and namespace emitters in SubtargeEmitter.
- To aid that, factor out emission of different sections of the code
into individual helper functions.
DeltaFile
+82-83llvm/utils/TableGen/SubtargetEmitter.cpp
+37-7llvm/include/llvm/TableGen/CodeGenHelpers.h
+119-902 files

LLVM/project d9979cfllvm/lib/Target/AMDGPU AMDGPULowerExecSync.cpp

Fix pass description
DeltaFile
+1-2llvm/lib/Target/AMDGPU/AMDGPULowerExecSync.cpp
+1-21 files

LLVM/project a12600cflang/test/Lower/Intrinsics eoshift.f90 ishftc.f90

[flang][NFC] Strip trailing whitespace from tests (4 of N)

Only the fortran source files in flang/test/Intrinsics have been modified. The
other files in flang/test will be cleaned up in subsequent commits
DeltaFile
+11-11flang/test/Lower/Intrinsics/eoshift.f90
+9-9flang/test/Lower/Intrinsics/ishftc.f90
+8-8flang/test/Lower/Intrinsics/max.f90
+8-8flang/test/Lower/Intrinsics/associated.f90
+6-6flang/test/Lower/Intrinsics/execute_command_line.f90
+6-6flang/test/Lower/Intrinsics/perror.f90
+48-4829 files not shown
+89-9835 files

LLVM/project 1bd035doffload/tools/offload-tblgen EntryPointGen.cpp

[offload] defer "---> olInit" trace message (#167893)

Tracing requires liboffload to be initialized, so calling
isTracingEnabled() before olInit always returns false. This caused the
first trace log to look like:
```
-> OL_SUCCESS
```
instead of:
```
---> olInit() -> OL_SUCCESS
```
This patch moves the pre-call trace print for olInit so it is emitted
only after initialization.

It would be possible to add extra logic to detect whether liboffload is
already initialized and only postpone the first pre-call print, but this
would add unnecessary complexity, especially since this is tablegen
code. The difference would matter only in the unlikely case of a crash

    [4 lines not shown]
DeltaFile
+11-5offload/tools/offload-tblgen/EntryPointGen.cpp
+11-51 files

LLVM/project c243406clang/lib/CIR/CodeGen CIRGenVTables.cpp

[clang][CIR] Fix build after 4d10c1165442cbbbc0017b48fcdd7dae1ccf3678
DeltaFile
+3-1clang/lib/CIR/CodeGen/CIRGenVTables.cpp
+3-11 files

LLVM/project f87d6afclang/lib/CIR/CodeGen CIRGenBuiltinX86.cpp

[clang][CIR] Fix build after 59c01cc8bb37dcff2d2efc2ddf287b6b89438200
DeltaFile
+0-4clang/lib/CIR/CodeGen/CIRGenBuiltinX86.cpp
+0-41 files

LLVM/project b18ca21llvm/lib/Target/X86 X86FloatingPoint.cpp

Reapply "[X86] Remove Redundant memset Calls"

This reverts commit acb798eb5108f838f5beb1eae5a3738c53599a8a.

It turns out the memset calls were papering over the fact that the
arrays being used were not initialized rather than papering over a
valgrind issue. Move the initialization to the actual member to keep
things simpler and to be more consistent with the rest of LLVM.
DeltaFile
+3-8llvm/lib/Target/X86/X86FloatingPoint.cpp
+3-81 files

LLVM/project cfa590emlir/include/mlir/Dialect/LLVMIR ROCDLOps.td, mlir/test/Dialect/LLVMIR rocdl.mlir

[ROCDL] Added missing cluster.ids op (gfx1250) (#167890)

Added missing cluster.ids op - i.e., along x, y, and z dims. Extended
all rocdl tests
DeltaFile
+16-10mlir/test/Target/LLVMIR/rocdl.mlir
+12-6mlir/test/Dialect/LLVMIR/rocdl.mlir
+5-1mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td
+33-173 files

LLVM/project 5ad56callvm/test/MC/Disassembler/AMDGPU gfx11_dasm_vop3_dpp16.txt, llvm/utils update_mc_test_checks.py

[Utils][update_mc_test_checks][NFC] Support sorting disassembler tests. (#167504)

Useful resolving differences vs mainline downstream.
DeltaFile
+4,719-5,242llvm/test/MC/Disassembler/AMDGPU/gfx11_dasm_vop3_dpp16.txt
+13-4llvm/utils/update_mc_test_checks.py
+4,732-5,2462 files

LLVM/project 9651a04mlir/lib/Dialect/Linalg/Transforms EraseUnusedOperandsAndResults.cpp

[mlir] Use llvm::make_pointer_range (NFC) (#167833)

llvm::map_range(..., [](OpOperand &o) { return &o; })

is equivalent to llvm::make_pointer_range, and the latter is shorter.
DeltaFile
+4-4mlir/lib/Dialect/Linalg/Transforms/EraseUnusedOperandsAndResults.cpp
+4-41 files

LLVM/project e6fb012llvm/lib/Transforms/IPO IROutliner.cpp

[IPO] Remove a redundant cast (NFC) (#167832)

Idx is already of type unsigned.

Identified with readability-redundant-casting.
DeltaFile
+3-3llvm/lib/Transforms/IPO/IROutliner.cpp
+3-31 files

LLVM/project 3c85d04clang/include/clang/Analysis/FlowSensitive StorageLocation.h, clang/lib/Analysis/FlowSensitive ASTOps.cpp

[clang] Use DenseMap::keys (NFC) (#167831)

With DenseMap::keys, we don't need to use [[maybe_unused]].
DeltaFile
+1-1clang/include/clang/Analysis/FlowSensitive/StorageLocation.h
+1-1clang/lib/Analysis/FlowSensitive/ASTOps.cpp
+2-22 files

LLVM/project bb5f3a0flang/include/flang/Semantics symbol.h, flang/lib/Lower/OpenMP OpenMP.cpp

[Flang][OpenMP] Update declare mapper lookup via use-module (#163860)

- Implemented semantic TODO to catch undeclared mappers.
- Fix mapper lookup to include modules imported through USE.
- Update and add tests.

Fixes #163385.
DeltaFile
+54-5flang/lib/Lower/OpenMP/OpenMP.cpp
+34-13flang/lib/Semantics/resolve-names.cpp
+25-1flang/test/Lower/OpenMP/declare-mapper.f90
+19-1flang/include/flang/Semantics/symbol.h
+14-0flang/test/Semantics/OpenMP/declare-mapper-modfile.f90
+7-5flang/test/Semantics/OpenMP/map-clause-symbols.f90
+153-257 files not shown
+197-3713 files

LLVM/project 55aff64llvm/lib/Target/PowerPC PPCISelLowering.cpp PPCTargetTransformInfo.cpp, llvm/test/CodeGen/PowerPC memcmp32_fixsize.ll memcmp64_fixsize.ll

[PowerPC] fold i128 equality/inequality compares of two loads into a vectorized compare using vcmpequb.p when Altivec is available (#158657)

The patch add 16 bytes load size for function
PPCTTIImpl::enableMemCmpExpansion and fold i128 equality/inequality
compares of two loads into a vectorized compare using vcmpequb.p when
Altivec is available.

Rationale:
A scalar i128 SETCC (eq/ne) normally lowers to multiple scalar ops. On
VSX-capable subtargets, we can instead reinterpret the i128 loads as
v16i8 vectors and use the Altive vcmpequb.p instruction to perform a
full 128-bit equality check in a single vector compare.

Example Result:
This transformation replaces memcmp(a, b, 16) with two vector loads and
one vector compare instruction.
DeltaFile
+133-0llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+20-92llvm/test/CodeGen/PowerPC/memcmp32_fixsize.ll
+18-60llvm/test/CodeGen/PowerPC/memcmp64_fixsize.ll
+13-42llvm/test/CodeGen/PowerPC/memcmpIR.ll
+17-33llvm/test/CodeGen/PowerPC/memCmpUsedInZeroEqualityComparison.ll
+5-1llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
+206-2286 files

LLVM/project 7129d76lldb/source/Commands CMakeLists.txt, lldb/source/ValueObject CMakeLists.txt

Revert "[lldb][NFC] Mark ValueObject library with NO_PLUGIN_DEPENDENCIES" (#167886)

Reverts llvm/llvm-project#167794

This breaks a build with BUILD_SHARED_LIBS=ON:

/usr/bin/ld: lib/liblldbCommands.a(CommandObjectTarget.cpp.o): undefined
reference to symbol '_ZN5clang22PCHContainerOperationsC1Ev

Fixing that issue leads to similar failures due to different symbols.
DeltaFile
+3-1lldb/source/ValueObject/CMakeLists.txt
+0-2lldb/source/Commands/CMakeLists.txt
+3-32 files

LLVM/project 5432c13llvm/lib/Transforms/Scalar StraightLineStrengthReduce.cpp, llvm/test/CodeGen/AMDGPU promote-constOffset-to-imm.ll waitcnt-vscnt.ll

Merge branch 'main' into users/sdesmalen-arm/predicated-partial-reduce-add
DeltaFile
+2,034-0llvm/test/tools/llvm-mca/AArch64/Neoverse/N3-forwarding.s
+862-273llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp
+466-275llvm/test/CodeGen/X86/bfloat.ll
+243-244llvm/test/CodeGen/AMDGPU/promote-constOffset-to-imm.ll
+133-196llvm/test/CodeGen/AMDGPU/waitcnt-vscnt.ll
+271-0llvm/test/Transforms/StraightLineStrengthReduce/NVPTX/slsr-i8-gep.ll
+4,009-988100 files not shown
+6,199-2,197106 files

LLVM/project 0f45a33llvm/lib/Transforms/Scalar StraightLineStrengthReduce.cpp

[Scalar] Fix warnings

This patch fixes:

  llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp:689:45:
  error: lambda capture 'DT' is not used
  [-Werror,-Wunused-lambda-capture]

  llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp:584:1:
  error: unused function 'operator<<' [-Werror,-Wunused-function]
DeltaFile
+2-3llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp
+2-31 files

LLVM/project 7506ebcllvm/lib/CodeGen/SelectionDAG DAGCombiner.cpp

Add freeze
DeltaFile
+12-10llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+12-101 files

LLVM/project 94fb856lldb/source/Plugins/Language/CPlusPlus GenericInitializerList.cpp LibCxxInitializerList.cpp, lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/initializer_list TestDataFormatterStdInitializerList.py

[lldb] Add libstdcpp initializer_list formatter (#167515)

Make the existing libc++ formatter generic
Add initializer_list summary provider.
Add test for `libstdcpp`
DeltaFile
+145-0lldb/source/Plugins/Language/CPlusPlus/GenericInitializerList.cpp
+0-124lldb/source/Plugins/Language/CPlusPlus/LibCxxInitializerList.cpp
+11-5lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
+14-2lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/initializer_list/TestDataFormatterStdInitializerList.py
+0-4lldb/source/Plugins/Language/CPlusPlus/LibCxx.h
+3-0lldb/source/Plugins/Language/CPlusPlus/Generic.h
+173-1352 files not shown
+174-1378 files

LLVM/project 8047938llvm/include/llvm/TableGen Main.h, llvm/lib/TableGen Main.cpp

[TableGen][NFCI] Change TableGenMain() to take function_ref.

It was switched from a function pointer to std::function in

TableGen: Make 2nd arg MainFn of TableGenMain(argv0, MainFn) optional.
f675ec6165ab6add5e57cd43a2e9fa1a9bc21d81

but there's no mention of any particular reason for that.
DeltaFile
+6-8llvm/include/llvm/TableGen/Main.h
+2-4llvm/lib/TableGen/Main.cpp
+1-1llvm/utils/TableGen/Basic/TableGen.cpp
+9-133 files