LLVM/project 143664fbolt/test merge-fdata-skip-truncated.test merge-fdata-no-lbr-mode.test, bolt/tools/merge-fdata merge-fdata.cpp

[BOLT][merge-fdata] Skip truncated lines in raw profile data (#183187)

Raw profile data file may contain lines truncated due to unexpected
app exit. This change is to have merge_fdata check number of fields
in each line of raw profile data file and ignore a line if the number
is not expected.
DeltaFile
+22-0bolt/tools/merge-fdata/merge-fdata.cpp
+20-0bolt/test/merge-fdata-skip-truncated.test
+3-3bolt/test/merge-fdata-no-lbr-mode.test
+3-3bolt/test/merge-fdata-bat-no-lbr.test
+2-2bolt/test/merge-fdata-mixed-mode.test
+2-2bolt/test/merge-fdata-mixed-bat-no-lbr.test
+52-106 files

LLVM/project b75222cclang/lib/CIR/CodeGen TargetInfo.h, clang/lib/CIR/Dialect/IR CIRTypes.cpp

correct nits
DeltaFile
+3-1clang/lib/CIR/CodeGen/TargetInfo.h
+2-2clang/lib/CIR/Dialect/IR/CIRTypes.cpp
+2-2clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+7-53 files

LLVM/project d12870ellvm/lib/Target/RISCV RISCVOptWInstrs.cpp, llvm/test/CodeGen/RISCV opt-w-instrs-p-ext.mir

[RISCV] Add MERGE, MVM, and MVMN to isSignExtendedW in RISCVOptWInstrs. (#183433)

These instructions are a combination of AND/OR/XOR which return sign
extended values if all inputs are sign extended.
DeltaFile
+119-0llvm/test/CodeGen/RISCV/opt-w-instrs-p-ext.mir
+13-3llvm/lib/Target/RISCV/RISCVOptWInstrs.cpp
+132-32 files

LLVM/project 8533889llvm/lib/Target/RISCV RISCVInstrInfoP.td RISCVISelDAGToDAG.cpp, llvm/test/CodeGen/RISCV rvp-unaligned-load-store.ll

[RISCV] Partial support for using PPAIRE.B/H to optimize unaligned load sequences. (#183423)

Patterns are based on patterns we use for Zbkb. We can't copy all
patterns because PPAIRE.B/H are a little different than PACKW/PACKH.

PACKW packs the first 16 bits of rs1 and rs2 and sign extends the upper
32 bits of rd. PACKH packs the first 8 bits of rs1 and rs2 and puts
zeros in bits 16 of rd.

PPAIRE.B copies the even bytes of rs1 to the even bytes of rd and copies
the even bytes of rs2 to the odd bytes of rd. PPAIRE.H is similar, but
copys halfwords instead of bytes. We can treat them equivalently to
PACKH/PACKW when we know that we only care about the lower halfword or
word, respectively of the result.
DeltaFile
+124-178llvm/test/CodeGen/RISCV/rvp-unaligned-load-store.ll
+27-0llvm/lib/Target/RISCV/RISCVInstrInfoP.td
+6-0llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
+157-1783 files

LLVM/project 5361c38llvm/lib/Target/SystemZ SystemZAsmPrinter.cpp, llvm/test/CodeGen/SystemZ zos-ada-relocations.ll

[SystemZ] Emit external aliases for indirect function descriptors in the ADA section

This is the last of the three patches aimed to support indirect symbol handling for
the SystemZ backend.

An external alias is emitted for indirect function descriptors within the ADA
section, rather than a temporary alias, while also setting all of the appropriate
symbol attributes that are needed for the HLASM streamer to emit the correct XATTR
and ALIAS instructions for the indirect symbols.

Moreover, this patch updates the `CodeGen/SystemZ/zos-ada-relocations.ll` test
as the ADA section is currently the only user of indirect symbols on z/OS.
DeltaFile
+7-4llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp
+5-1llvm/test/CodeGen/SystemZ/zos-ada-relocations.ll
+12-52 files

LLVM/project dd9d242llvm/lib/Target/RISCV RISCVInstrInfoZb.td RISCVRegisterInfo.cpp, llvm/lib/Target/RISCV/AsmParser RISCVAsmParser.cpp

[RISCV] Treat zext.h as a separate instruction from pack(w) with Zbkb. (#183364)

The Zbb encoding for zext.h is a subset of the encoding for pack(w).

There is a statement in the ISA manual that says "For RV32, the pack
instruction with rs2=x0 is the zext.h instruction. Hence, for RV32, any
extension that contains the pack instruction also contains the zext.h
instruction"

This patch makes the zext.h instruction mnemonic canonical when only
Zbkb is enabled. -Mno-aliases will not disable the printing of zext.h. I
believe this matches binutils.

I've taught the assembler to remap PACK/PACKW to ZEXT_H to make printing
parsed assembly match the disassembler output.
DeltaFile
+6-19llvm/lib/Target/RISCV/RISCVInstrInfoZb.td
+20-0llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
+11-0llvm/test/MC/RISCV/rv64zcb-zbkb-valid.s
+11-0llvm/test/MC/RISCV/rv32zcb-zbkb-valid.s
+2-9llvm/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp
+5-2llvm/lib/Target/RISCV/RISCVRegisterInfo.cpp
+55-301 files not shown
+57-337 files

LLVM/project 8d3ab19llvm/include/llvm/MC MCSymbolGOFF.h MCSectionGOFF.h, llvm/lib/MC GOFFObjectWriter.cpp MCAsmInfoGOFF.cpp

[SystemZ] Emit external aliases required for indirect symbol handling support

This is the second of three patches aimed to support indirect symbol handling for
the SystemZ backend. An external name is added for both MC sections and symbols
and makes the relevant printers and writers utilize the external name when present.
Furthermore, the ALIAS HLASM instruction is emitted after every XATTR instruction.
DeltaFile
+19-15llvm/lib/MC/GOFFObjectWriter.cpp
+17-0llvm/lib/Target/SystemZ/MCTargetDesc/SystemZTargetStreamer.h
+9-0llvm/include/llvm/MC/MCSymbolGOFF.h
+8-0llvm/include/llvm/MC/MCSectionGOFF.h
+6-0llvm/lib/MC/MCAsmInfoGOFF.cpp
+4-0llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.cpp
+63-156 files

LLVM/project f7be6a8clang/include/clang/CIR/Dialect/Builder CIRBaseBuilder.h, clang/include/clang/CIR/Dialect/IR CIRTypes.h CIRTypes.td

Handle empty AS attr as LangAs::Default and Normalize LangAs::Default a to null in PointerType
DeltaFile
+13-2clang/lib/CIR/Dialect/IR/CIRTypes.cpp
+4-0clang/include/clang/CIR/Dialect/IR/CIRTypes.h
+4-0clang/include/clang/CIR/Dialect/IR/CIRTypes.td
+0-2clang/include/clang/CIR/Dialect/Builder/CIRBaseBuilder.h
+21-44 files

LLVM/project ad530e8clang/lib/CIR/Dialect/IR CIRTypes.cpp

test work now yo
DeltaFile
+2-0clang/lib/CIR/Dialect/IR/CIRTypes.cpp
+2-01 files

LLVM/project a1a56ffclang/lib/CIR/CodeGen CIRGenBuiltin.cpp

nit: Handle target AS value as unsigned int
DeltaFile
+1-1clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp
+1-11 files

LLVM/project d8192fdclang/include/clang/CIR/Dialect/Builder CIRBaseBuilder.h, clang/include/clang/CIR/Dialect/IR CIRTypes.h

Address first round of comments
DeltaFile
+5-6clang/lib/CIR/Dialect/IR/CIRTypes.cpp
+2-3clang/include/clang/CIR/Dialect/IR/CIRTypes.h
+2-2clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp
+1-1clang/lib/CIR/CodeGen/CIRGenExpr.cpp
+1-1clang/include/clang/CIR/Dialect/Builder/CIRBaseBuilder.h
+11-135 files

LLVM/project e71fcdfclang/include/clang/CIR/Dialect/Builder CIRBaseBuilder.h, clang/include/clang/CIR/Dialect/IR CIRAttrs.td

[CIR] Infrastructure and MemorySpaceAttrInterface for Address Spaces
DeltaFile
+150-39clang/lib/CIR/Dialect/IR/CIRTypes.cpp
+104-4clang/lib/CIR/Dialect/IR/CIRAttrs.cpp
+52-3clang/include/clang/CIR/Dialect/IR/CIRAttrs.td
+41-0clang/test/CIR/IR/address-space.cir
+29-3clang/test/CIR/IR/invalid-addrspace.cir
+9-11clang/include/clang/CIR/Dialect/Builder/CIRBaseBuilder.h
+385-6012 files not shown
+452-7718 files

LLVM/project 8f3dd82libc/shared/math asinpif.h, libc/src/__support/math asinpif.h

[libc][math][c23] implement `asinpif` function (#181511)

Implementing `asinpi` for single-precision. it continues what is done in
#152690 that implemented `asinpif16` with header-only approach that is
followed since #147386
DeltaFile
+152-0libc/src/__support/math/asinpif.h
+44-0libc/test/src/math/smoke/asinpif_test.cpp
+38-0libc/test/src/math/asinpif_test.cpp
+33-0libc/test/src/math/exhaustive/asinpif_test.cpp
+24-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+23-0libc/shared/math/asinpif.h
+314-023 files not shown
+431-129 files

LLVM/project 765c4e6clang/lib/Sema SemaLambda.cpp, clang/test/Modules pr178893.cppm

[clang] Don't use `VarDecl` of local variables as `ManglingContextDecl` for lambdas (#179035)

Currently, in a C++20 modules context, a `VarDecl` of a local variable
can wrongly end up as a `ManglingContextDecl` for a lambda.

Fix this by removing `ContextKind::NonInlineInModulePurview` in
`Sema::getCurrentMangleNumberContext` and add
`IsExternallyVisibleInModulePurview` checks in the appropriate places:

- For externally visible functions defined in a module purview, add a
check to `isInInlineFunction`, renaming it to
`IsInFunctionThatRequiresMangling`
- For externally visible variables defined in a module purview, add a
new `ContextKind::ExternallyVisibleVariableInModulePurview` and an
appropriate check to the `VarDecl` case

Fixes #178893

---------

    [2 lines not shown]
DeltaFile
+46-33clang/lib/Sema/SemaLambda.cpp
+29-0clang/test/Modules/pr178893.cppm
+75-332 files

LLVM/project d7bd36dmlir/lib/Bindings/Python Rewrite.cpp, mlir/test/python rewrite.py

[MLIR][Python] Handle errors in dialect conversion properly (#183320)

Before this, MLIR error capture in `apply_partial_conversion` and
`apply_full_conversion` wasn’t handled, which meant any `emitError`
would crash the entire program. This PR adds the handling.
DeltaFile
+19-0mlir/test/python/rewrite.py
+4-2mlir/lib/Bindings/Python/Rewrite.cpp
+23-22 files

LLVM/project b2cc0a7llvm/lib/Target/AMDGPU AMDGPURegBankCombiner.cpp, llvm/test/CodeGen/AMDGPU fminimum.ll fmaximum.ll

Add initial cost heuristic
DeltaFile
+150-141llvm/test/CodeGen/AMDGPU/GlobalISel/regbankcombiner-copy-scc-vcc-select.ll
+126-8llvm/lib/Target/AMDGPU/AMDGPURegBankCombiner.cpp
+16-37llvm/test/CodeGen/AMDGPU/fminimum.ll
+16-37llvm/test/CodeGen/AMDGPU/fmaximum.ll
+12-20llvm/test/CodeGen/AMDGPU/GlobalISel/regbankcombiner-fmed3-minmax-const.mir
+17-15llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-copy-scc-vcc.ll
+337-2582 files not shown
+343-2658 files

LLVM/project a703a91llvm/utils/lit/lit display.py

[utils] update type hint for python 3.8-3.9 compatibility (#183427)

Type hints before 3.10 require importing, and are spelled with a leading
capital.
DeltaFile
+2-2llvm/utils/lit/lit/display.py
+2-21 files

LLVM/project 150f852mlir/include/mlir/Dialect/GPU/IR GPUOps.td, mlir/include/mlir/Dialect/NVGPU/IR NVGPUOps.td

Move promissed interfaces from docs to comments per reviewers
DeltaFile
+6-12mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
+2-4mlir/include/mlir/Dialect/GPU/IR/GPUOps.td
+2-2mlir/include/mlir/Dialect/NVGPU/IR/NVGPUOps.td
+10-183 files

LLVM/project 901700amlir/lib/Dialect/MemRef/Transforms FoldMemRefAliasOps.cpp, mlir/test/Dialect/MemRef fold-memref-alias-ops.mlir

[mlir][MemRef] Make fold-memref-alias-ops use memref interfaces

This replaces the large switch-cases and operation-specific patterns
in FoldMemRefAliashops with patterns that use the new
IndexedAccessOpInterface and IndexedMemCopyOpInterface, which will
allow us to remove the memref transforms' dependency on the NVGPU
dialect.

This does also resolve some bugs and potential unsoundnesses:
1. We will no longer fold in expand_shape into vector.load or
vector.transfer_read in cases where that would alter the strides
between dimensions in multi-dimensional loads. For example, if we have
a `vector.load %e[%i, %j, %k] : memref<8x8x9xf32>, vector<2x3xf32>`
where %e is
`expand_shape %m [[0], [1], [2. 3]] : memref<8x8x3x3xf32> to 8x8x9xf32,
we will no longer fold in that shape, since that would change which
value would be read (the previous patterns tried to account for this
but failed).
2. Subviews that have non-unit strides in positions that aren't being

    [15 lines not shown]
DeltaFile
+425-440mlir/lib/Dialect/MemRef/Transforms/FoldMemRefAliasOps.cpp
+294-3mlir/test/Dialect/MemRef/fold-memref-alias-ops.mlir
+719-4432 files

LLVM/project ed737c9mlir/include/mlir/Interfaces VectorInterfaces.td VectorInterfaces.h

[mlir] Add [may]updateStartingPosition to VectorTransferOpInterface

This commit adds methods to VectorTransferOpInterface that allow
transfer operations to be queried for whether their base memref (or
tensor) and permutation map can be updated in some particular way and
then for performing this update. This is part of a series of changes
designed to make passes like fold-memref-alias-ops more generic,
allowing downstream operations, like IREE's transfer_gather, to
participate in them without needing to duplicate patterns.
DeltaFile
+67-1mlir/include/mlir/Interfaces/VectorInterfaces.td
+1-0mlir/include/mlir/Interfaces/VectorInterfaces.h
+68-12 files

LLVM/project 0d6e75fllvm/include/llvm/Frontend/OpenMP OMPIRBuilder.h, llvm/lib/Frontend/OpenMP OMPIRBuilder.cpp

Refactor and support multiple affinity register for a task

- Support multiple affinity register for a task
- Move iterator loop generate logic to OMPIRBuilder
- Extract iterator loop body convertion logic
- Refactor buildAffinityData by hoisting the creation of affinity_list
- IteratorsOp -> IteratorOp
- Add mlir to llvmir test
DeltaFile
+143-123mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+68-16llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+34-1llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
+245-1403 files

LLVM/project 564f433lldb/packages/Python/lldbsuite/test lldbtest.py, lldb/test/API/lang/objc/failing-description TestObjCFailingDescription.py

[lldb/test] Use filecheck_log to read log files from the host platform (#183422)

Some tests were using `self.filecheck` with `platform shell cat {log}`
to validate test behavior through log inspection.

This doesn't work when running the testsuite against a remote platform
since the logs are saved on the host's filesystem.

This patch refactors those call sites to use the new `filecheck_log`
helper, which ensures the log file is always read from the host
platform.

Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>
DeltaFile
+10-0lldb/packages/Python/lldbsuite/test/lldbtest.py
+2-6lldb/test/API/lang/objc/failing-description/TestObjCFailingDescription.py
+2-4lldb/test/API/lang/objc/struct-description/TestObjCStructDescription.py
+14-103 files

LLVM/project dc2dad6llvm/test/Transforms/IROutliner illegal-typeid-for.ll

[NFC][IROutliner] Add test showing llvm.typeid.for not Outlined (#183406)

This intrinsic is not valid to outline because it relies on
function-local information about types and landing pads during
lowering/codegen. The code is currently correct because the IROutliner
uses the CodeExtractor, which will not extract this intrinsic.

See llvm/llvm-project#38893 (aka llvm.org/PR39545)
DeltaFile
+127-0llvm/test/Transforms/IROutliner/illegal-typeid-for.ll
+127-01 files

LLVM/project c573529llvm/include/llvm/MC MCAsmInfo.h, llvm/lib/MC MCAsmInfo.cpp

[MC] Use inline field initializers in MCAsmInfo. NFC (#183407)

Followup to #183343.
DeltaFile
+19-20llvm/include/llvm/MC/MCAsmInfo.h
+0-17llvm/lib/MC/MCAsmInfo.cpp
+19-372 files

LLVM/project 2f5b352clang/include/clang/AST TypeBase.h, clang/lib/CodeGen CGExprConstant.cpp

Add helper functions to ConstantMatrixType for flattened index calculations
DeltaFile
+39-0clang/include/clang/AST/TypeBase.h
+1-2clang/lib/CodeGen/CGExprConstant.cpp
+40-22 files

LLVM/project 0d476b1llvm/include/llvm/ADT StringRef.h

[NFC][ADT] Remove indentation of StringRef class (#183317)

Apply https://llvm.org/docs/CodingStandards.html#namespace-indentation
rule to StringRef class.
DeltaFile
+913-920llvm/include/llvm/ADT/StringRef.h
+913-9201 files

LLVM/project 358b1d5llvm/utils/lit/lit display.py TestRunner.py, llvm/utils/lit/tests diff-test-update-retry-failed-or-flaky.py diff-test-update-retry.py

[utils] update how auto-updated tests are displayed when the test is retried (#181097)

This changes how test updater output is displayed to make it less
confusing for tests with ALLOW_RETRIES. Previously it was merged into
the output string for the test result, but that hides it in many less
verbose modes, so now it's displayed separately. The FIXED status is
added, which is the same as FLAKYPASS except it highlights that a test
was auto-updated before it passed.

From PR https://github.com/llvm/llvm-project/pull/181097
DeltaFile
+67-0llvm/utils/lit/tests/diff-test-update-retry-failed-or-flaky.py
+63-0llvm/utils/lit/tests/diff-test-update-retry.py
+49-11llvm/utils/lit/lit/display.py
+59-0llvm/utils/lit/tests/diff-test-update-retry-default-verbosity.py
+43-0llvm/utils/lit/tests/diff-test-update-retry-quiet.py
+24-14llvm/utils/lit/lit/TestRunner.py
+305-2518 files not shown
+490-4924 files

LLVM/project 2f46255lldb/test/API/lang/objc/failing-description TestObjCFailingDescription.py, lldb/test/API/lang/objc/struct-description TestObjCStructDescription.py

Revert "[lldb/test] Fix tests reading log from remote platform instead of host" (#183419)

Reverts llvm/llvm-project#183413 because this is still fragile.
DeltaFile
+2-4lldb/test/API/lang/objc/failing-description/TestObjCFailingDescription.py
+2-4lldb/test/API/lang/objc/struct-description/TestObjCStructDescription.py
+4-82 files

LLVM/project ae80f34lldb/source/Plugins/Process/FreeBSD-Kernel-Core ThreadFreeBSDKernelCore.h

[lldb][Process/FreeBSDKernelCore] Reorder ThreadFreeBSDKernelCore members (#183414)

Signed-off-by: Minsoo Choo <minsoochoo0122 at proton.me>
DeltaFile
+2-2lldb/source/Plugins/Process/FreeBSD-Kernel-Core/ThreadFreeBSDKernelCore.h
+2-21 files

LLVM/project bf388fallvm/utils/gn/secondary/clang/lib/Analysis/Scalable BUILD.gn, llvm/utils/gn/secondary/clang/lib/Driver BUILD.gn

[gn build] Port commits (#183420)

$ llvm/utils/gn/build/sync_source_lists_from_cmake.py --write

84764dfc2ad3
8bdef33e6ae9
a8989c08a87e
de3034b1c14d
DeltaFile
+5-0llvm/utils/gn/secondary/clang/lib/Analysis/Scalable/BUILD.gn
+4-1llvm/utils/gn/secondary/clang/unittests/Analysis/Scalable/BUILD.gn
+1-0llvm/utils/gn/secondary/clang/lib/Driver/BUILD.gn
+10-13 files