LLVM/project bb1b82aclang/lib/AST TypePrinter.cpp, clang/test/ASTMerge/struct test.c

[clang][TypePrinter] Replace AppendScope with printNestedNameSpecifier (#168534)

In debug-info we soon have the need to print names using the full scope
of the entity (see discussion in
https://github.com/llvm/llvm-project/pull/159592). Particularly, when a
structure is scoped inside a function, we'd like to emit the name as
`func()::foo`. `CGDebugInfo` uses the `TypePrinter` to print type names
into debug-info. However, `TypePrinter` stops (and ignores)
`DeclContext`s that are functions. I.e., it would just print `foo`.
Ideally it would behave the same way `printNestedNameSpecifier` does.
The FIXME in
https://github.com/llvm/llvm-project/blob/47c1aa4cef638c97b74f3afb7bed60e92bba1f90/clang/lib/AST/TypePrinter.cpp#L1520-L1521
motivated this patch.

See https://github.com/llvm/llvm-project/pull/168533 for how this will
be used by `CGDebugInfo`. The plan is to introduce a new
`PrintingPolicy` that prints anonymous entities using their full scope
(including function/anonymous scopes) and the mangling number.
DeltaFile
+6-61clang/lib/AST/TypePrinter.cpp
+46-0clang/unittests/AST/TypePrinterTest.cpp
+4-4clang/test/SemaObjCXX/arc-0x.mm
+2-2clang/test/Layout/ms-x86-alias-avoidance-padding.cpp
+2-2clang/test/ASTMerge/struct/test.c
+2-1clang/test/Modules/compare-record.c
+62-703 files not shown
+67-729 files

LLVM/project f2cb5d7

[DAGCombiner] Strip outer match in visitBITREVERSE (NFC) (#169020)

DeltaFile
+0-00 files

LLVM/project 316dbb4clang-tools-extra/clang-tidy .clang-format, clang-tools-extra/clang-tidy/bugprone SuspiciousMemsetUsageCheck.cpp OptionalValueConversionCheck.cpp

[clang-tidy][NFC] Reformat code and set 'KeepEmptyLines' to false (#168131)

Currently, default `clang-format` LLVM style is configured like this:
```
KeepEmptyLines:
  AtEndOfFile:     false
  AtStartOfBlock:  true
  AtStartOfFile:   true
```
This PR sets `AtStartOfBlock` and `AtStartOfFile` to false.
I think this is the general style pattern we tend to follow, in
particular Eugene made comments about empty newlines at start of
functions.
DeltaFile
+3-7clang-tools-extra/clang-tidy/bugprone/SuspiciousMemsetUsageCheck.cpp
+6-2clang-tools-extra/clang-tidy/.clang-format
+2-4clang-tools-extra/clang-tidy/bugprone/OptionalValueConversionCheck.cpp
+1-4clang-tools-extra/clang-tidy/bugprone/SpuriouslyWakeUpFunctionsCheck.cpp
+0-4clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp
+0-3clang-tools-extra/clang-tidy/modernize/AvoidBindCheck.cpp
+12-2445 files not shown
+12-8051 files

LLVM/project 011550bclang/lib/Sema SemaExpr.cpp

[Review] Drop the caller is device condition
DeltaFile
+2-5clang/lib/Sema/SemaExpr.cpp
+2-51 files

LLVM/project af098e0clang/lib/CodeGen CGExpr.cpp, compiler-rt/lib/ubsan_minimal ubsan_minimal_handlers.cpp

Revert "[ubsan_minimal] Allow UBSan handler from Minimal runtime to accept arguments (#152192)" (#168812)

This partially reverts #152192, keeping updated tests and
some code reordering in clang/lib/CodeGen/CGExpr.cpp.

compiler-rt/lib/ubsan_minimal/ubsan_minimal_handlers.cpp is exact revert
(with followup #152419)

We don't have a good use case for that, so revert it before we are stuck
maintaining this API.

21.x does not have this patch.

This reverts commit a1209d868632b8aea10450cd2323848ab0b6776a.
DeltaFile
+13-39compiler-rt/lib/ubsan_minimal/ubsan_minimal_handlers.cpp
+2-12clang/lib/CodeGen/CGExpr.cpp
+1-1compiler-rt/test/ubsan_minimal/TestCases/misalignment.cpp
+1-1compiler-rt/test/ubsan_minimal/TestCases/null.cpp
+17-534 files

LLVM/project 8b7c495llvm/test/tools/llvm-ir2vec triplets.mir entities.mir, llvm/test/tools/llvm-ir2vec/output reference_x86_entities.txt reference_triplets.txt

[IR2VEC] Rewrite triples.mir and entities.mir. NFC (#168574)

These test change and need updating every time a new instruction is
added, including generic G_ global isel instructions. The opcodes of all
instructions change force a manual update of the file, which makes it
very high cost for what it is testing.

I have rewritten it to use regexes for the triplets.mir test and just
test a couple of opcodes in the entities.mir file.
DeltaFile
+0-7,157llvm/test/tools/llvm-ir2vec/output/reference_x86_entities.txt
+38-3llvm/test/tools/llvm-ir2vec/triplets.mir
+0-33llvm/test/tools/llvm-ir2vec/output/reference_triplets.txt
+5-3llvm/test/tools/llvm-ir2vec/entities.mir
+43-7,1964 files

LLVM/project 4479e24clang/lib/Sema SemaExpr.cpp, clang/test/SemaHIP amdgpu-gfx950-load-to-lds.hip

[HIP] Perform implicit pointer cast when compiling device code, not when -fcuda-is-device

When compiling HIP device code, we add implicit casts for the pointer
arguments being passed to builtin calls.

When compiling for the host, apply the same casts for __device__ or __kernel__ functions,
since the device side of the source should still pass type checks.

This patch changes the condition depending on -fcuda-is-device to depend
on if the builtin's caller is marked as __device__ or __kernel__.

stack-info: PR: https://github.com/llvm/llvm-project/pull/165387, branch: users/jmmartinez/fix/load_lds_typesignature/1
DeltaFile
+13-13clang/test/SemaHIP/amdgpu-gfx950-load-to-lds.hip
+4-2clang/lib/Sema/SemaExpr.cpp
+17-152 files

LLVM/project 299ea95llvm/test/Transforms/LoopVectorize induction.ll induction-wrapflags.ll, llvm/test/Transforms/LoopVectorize/AArch64 optsize_minsize.ll

[VPlan] Drop poison-generating flags on induction trunc (#168922)

After truncating an integer-induction, neither nuw nor nsw hold.

Fixes #168902.

Co-authored-by: Florian Hahn <flo at fhahn.com>
DeltaFile
+24-24llvm/test/Transforms/LoopVectorize/RISCV/tail-folding-cond-reduction.ll
+23-23llvm/test/Transforms/LoopVectorize/induction.ll
+42-0llvm/test/Transforms/LoopVectorize/induction-wrapflags.ll
+10-10llvm/test/Transforms/LoopVectorize/AArch64/optsize_minsize.ll
+8-8llvm/test/Transforms/LoopVectorize/iv-select-cmp-trunc.ll
+6-6llvm/test/Transforms/LoopVectorize/optimal-epilog-vectorization.ll
+113-7115 files not shown
+144-10021 files

LLVM/project e9fc393mlir/include/mlir/Dialect/XeGPU/TransformOps XeGPUTransformOps.td, mlir/lib/Dialect/XeGPU/TransformOps XeGPUTransformOps.cpp

[MLIR][XeGPU][TransformOps] Add slice_dims argument to set_op_layout_attr and set_desc_layout (#168929)

`set_op_layout_attr` and `set_desc_layout` transform ops wrap
`xegpu.layout` in an `xegpu.slice` attribute if `slice_dims` argument is
set.
DeltaFile
+48-1mlir/test/python/dialects/transform_xegpu_ext.py
+38-0mlir/test/Dialect/XeGPU/transform-ops.mlir
+28-7mlir/lib/Dialect/XeGPU/TransformOps/XeGPUTransformOps.cpp
+17-7mlir/include/mlir/Dialect/XeGPU/TransformOps/XeGPUTransformOps.td
+8-0mlir/python/mlir/dialects/transform/xegpu.py
+139-155 files

LLVM/project 75b0e12llvm/test/CodeGen/AMDGPU whole-wave-functions.ll llvm.amdgcn.raw.buffer.store.ll

[AMDGPU] Enable multi-group xnack replay in hardware (GFX1250)

This patch enables the multi-group xnack replay mode by
configuring the hardware MODE register at kernel entry.
This aligns the hardware behavior with the compiler's
existing multi-group s_wait_xcnt insertion logic.
DeltaFile
+282-281llvm/test/CodeGen/AMDGPU/whole-wave-functions.ll
+377-12llvm/test/CodeGen/AMDGPU/llvm.amdgcn.raw.buffer.store.ll
+230-106llvm/test/CodeGen/AMDGPU/llvm.amdgcn.raw.buffer.load.tfe.ll
+230-106llvm/test/CodeGen/AMDGPU/llvm.amdgcn.struct.buffer.load.tfe.ll
+213-49llvm/test/CodeGen/AMDGPU/llvm.prefetch.ll
+246-0llvm/test/CodeGen/AMDGPU/llvm.amdgcn.wmma.gfx1250.w32.ll
+1,578-554143 files not shown
+7,119-715149 files

LLVM/project 4c81b92.github CODEOWNERS

[MLIR][CODEOWNERS] Add XeGPU transform ops code owners (#168940)

Add charithaintc, Jianhui-Li and tkarna as code owners of XeGPU/TransformOps directories.
DeltaFile
+2-0.github/CODEOWNERS
+2-01 files

LLVM/project 31127b9mlir/include/mlir/Target/LLVMIR ModuleImport.h, mlir/lib/Target/LLVMIR ModuleImport.cpp ConvertFromLLVMIR.cpp

[mlir][llvm] Handle debug record import edge cases (#168774)

This commit enables the direct import of debug records by default and
fixes issues with two edge cases:
- Detect early on if the address operand is an argument list (calling
getAddress() for argument lists asserts)
- Use getAddress() to check if the address operand is null, which means
the address operand is an empty metadata node, which currently is not
supported.
- Add support for debug label records.

This is a follow-up to:
https://github.com/llvm/llvm-project/pull/167812
DeltaFile
+84-44mlir/lib/Target/LLVMIR/ModuleImport.cpp
+7-6mlir/include/mlir/Target/LLVMIR/ModuleImport.h
+5-7mlir/test/Target/LLVMIR/Import/import-failure.ll
+1-1mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp
+97-584 files

LLVM/project a967cb6llvm/lib/Target/LoongArch LoongArchISelLowering.cpp, llvm/test/CodeGen/LoongArch/lasx/ir-instruction shuffle-as-xvpermi.ll shuffle-as-xvshuf.ll

fix
DeltaFile
+6-3llvm/test/CodeGen/LoongArch/lsx/widen-shuffle-mask.ll
+4-4llvm/test/CodeGen/LoongArch/lsx/ir-instruction/shuffle-as-vpermi.ll
+4-4llvm/test/CodeGen/LoongArch/lasx/ir-instruction/shuffle-as-xvpermi.ll
+4-2llvm/test/CodeGen/LoongArch/lsx/ir-instruction/shuffle-as-vshuf.ll
+3-3llvm/test/CodeGen/LoongArch/lasx/ir-instruction/shuffle-as-xvshuf.ll
+2-2llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
+23-186 files

LLVM/project f38bb55llvm/lib/Target/LoongArch LoongArchISelLowering.cpp LoongArchLSXInstrInfo.td, llvm/test/CodeGen/LoongArch/lasx/ir-instruction shuffle-as-xvpermi.ll shuffle-as-xvshuf.ll

[LoongArch] Custom legalize vector_shuffle to `[x]vpermi.w`
DeltaFile
+118-14llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
+3-7llvm/test/CodeGen/LoongArch/lsx/ir-instruction/shuffle-as-vpermi.ll
+2-8llvm/test/CodeGen/LoongArch/lsx/ir-instruction/shuffle-as-vshuf.ll
+3-7llvm/test/CodeGen/LoongArch/lasx/ir-instruction/shuffle-as-xvpermi.ll
+3-6llvm/test/CodeGen/LoongArch/lasx/ir-instruction/shuffle-as-xvshuf.ll
+7-0llvm/lib/Target/LoongArch/LoongArchLSXInstrInfo.td
+136-422 files not shown
+144-468 files

LLVM/project cbc59b5llvm/test/CodeGen/LoongArch/lasx/ir-instruction shuffle-as-xvpermi.ll, llvm/test/CodeGen/LoongArch/lsx/ir-instruction shuffle-as-vpermi.ll

[LoongArch][NFC] Pre-commit tests for `[x]vpermi.w`
DeltaFile
+41-0llvm/test/CodeGen/LoongArch/lasx/ir-instruction/shuffle-as-xvpermi.ll
+41-0llvm/test/CodeGen/LoongArch/lsx/ir-instruction/shuffle-as-vpermi.ll
+82-02 files

LLVM/project ea9ec7corc-rt/include/orc-rt WrapperFunction.h SimpleNativeMemoryMap.h, orc-rt/include/orc-rt-c WrapperFunction.h

[orc-rt] Rename 'Session' variables to avoid ambiguity with type. NFCI. (#168999)

Re-using Session as a variable name risks confusion with the Session
type.
DeltaFile
+24-27orc-rt/include/orc-rt/WrapperFunction.h
+20-26orc-rt/unittests/SPSWrapperFunctionTest.cpp
+8-12orc-rt/lib/executor/SimpleNativeMemoryMap.cpp
+8-10orc-rt/unittests/DirectCaller.h
+8-8orc-rt/include/orc-rt/SimpleNativeMemoryMap.h
+2-3orc-rt/include/orc-rt-c/WrapperFunction.h
+70-861 files not shown
+72-887 files

LLVM/project e4a4bb0llvm/lib/Target/PowerPC PPCISelLowering.cpp, llvm/test/CodeGen/PowerPC addition-vector-all-ones.ll vec_add_sub_doubleword.ll

[PowerPC] Replace vspltisw+vadduwm instructions with xxleqv+vsubuwm for adding the vector {1, 1, 1, 1} (#160882)

This patch optimizes vector addition operations involving **`all-ones`**
vectors by leveraging the generation of vectors of -1s(using `xxleqv`,
which is cheaper than generating vectors of 1s(`vspltisw`). These are
the respective vector types.
`v2i64`: **`A + vector {1, 1}`**
`v4i32`: **`A + vector {1, 1, 1, 1}`**
`v8i16`: **`A + vector {1, 1, 1, 1, 1, 1, 1, 1}`**
`v16i8`: **`A + vector {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1}`**

The optimized version replaces `vspltisw (4 cycles)` with `xxleqv (2
cycles)` using the following identity:
`A - (-1) = A + 1`.

---------

Co-authored-by: himadhith <himadhith.v at ibm.com>
Co-authored-by: Tony Varghese <tonypalampalliyil at gmail.com>
DeltaFile
+45-0llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+9-10llvm/test/CodeGen/PowerPC/addition-vector-all-ones.ll
+2-3llvm/test/CodeGen/PowerPC/vec_add_sub_doubleword.ll
+56-133 files

LLVM/project afb9692llvm/lib/Target/LoongArch LoongArchISelLowering.cpp

rebase after vshuf4i_d was defined
DeltaFile
+1-1llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
+1-11 files

LLVM/project 332f981llvm/lib/Target/LoongArch LoongArchISelLowering.cpp, llvm/test/CodeGen/LoongArch/lasx vec-shuffle-byte-rotate.ll

[LoongArch] Custom legalize vector_shuffle to `xvshuf4i.d`
DeltaFile
+28-4llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
+3-7llvm/test/CodeGen/LoongArch/lasx/vec-shuffle-byte-rotate.ll
+2-7llvm/test/CodeGen/LoongArch/lasx/ir-instruction/shuffle-as-xvshuf4i.ll
+33-183 files

LLVM/project 636d1dellvm/lib/Target/LoongArch LoongArchISelLowering.cpp

fix typo
DeltaFile
+1-1llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
+1-11 files

LLVM/project 31e5b93llvm/lib/Target/LoongArch LoongArchISelLowering.cpp LoongArchISelLowering.h, llvm/test/CodeGen/LoongArch/lasx vselect.ll

[LoongArch] Custom legalize vselect to vector_shuffle for most constant condition cases
DeltaFile
+48-36llvm/test/CodeGen/LoongArch/lasx/vselect.ll
+44-34llvm/test/CodeGen/LoongArch/lsx/vselect.ll
+49-2llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
+1-0llvm/lib/Target/LoongArch/LoongArchISelLowering.h
+142-724 files

LLVM/project cc5185bclang/lib/Sema SemaModule.cpp, clang/test/Modules reference-tu-local-var.cppm

[C++20] [Modules] Check TULocal entity within exported entities

See the attached test for example.
DeltaFile
+20-1clang/lib/Sema/SemaModule.cpp
+9-0clang/test/Modules/reference-tu-local-var.cppm
+29-12 files

LLVM/project b4a0d7ellvm/lib/Target/NVPTX NVPTXIntrinsics.td NVPTXSubtarget.h

[NVPTX] Fix PTX and SM conditions for narrow FP conversions (#168680)

This change fixes the PTX and SM conditions for narrow FP
conversion intrinsics and adds support for family-conditionals.
DeltaFile
+27-25llvm/lib/Target/NVPTX/NVPTXIntrinsics.td
+21-0llvm/lib/Target/NVPTX/NVPTXSubtarget.h
+48-252 files

LLVM/project 5b60734llvm/lib/Target/AMDGPU SIShrinkInstructions.cpp

clang-format
DeltaFile
+5-3llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp
+5-31 files

LLVM/project e1a745bllvm/lib/Target/AMDGPU SIShrinkInstructions.cpp

[AMDGPU] Make SIShrinkInstructions pass return valid changed state
DeltaFile
+60-35llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp
+60-351 files

LLVM/project 5c5c83dllvm/lib/Target/PowerPC PPCISelLowering.cpp

[PowerPC] Fix Wparentheses warning

PPCISelLowering.cpp:15567:27: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
15567 |          CC == ISD::SETEQ && "CC mus be ISD::SETNE or ISD::SETEQ");
      |          ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DeltaFile
+2-2llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+2-21 files

LLVM/project cc6b9efllvm/lib/Target/AMDGPU SIISelLowering.cpp

Using `memcpy` for bit pattern
DeltaFile
+4-6llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+4-61 files

LLVM/project b9cb447llvm/test/CodeGen/AMDGPU constant-address-space-32bit.ll llvm.amdgcn.reduce.min.ll, llvm/test/CodeGen/X86 ldexp-avx512.ll

clear min runtime args

Created using spr 1.3.7
DeltaFile
+2,069-0llvm/test/tools/dsymutil/AArch64/stmt-seq-macho.test
+0-2,069llvm/test/tools/dsymutil/ARM/stmt-seq-macho.test
+200-1,637llvm/test/CodeGen/X86/ldexp-avx512.ll
+1,156-0mlir/test/Interfaces/TilingInterface/tile-and-fuse-consumer-using-slices.mlir
+824-144llvm/test/CodeGen/AMDGPU/constant-address-space-32bit.ll
+911-0llvm/test/CodeGen/AMDGPU/llvm.amdgcn.reduce.min.ll
+5,160-3,850431 files not shown
+18,353-11,390437 files

LLVM/project 0a231c9clang/lib/Sema SemaOpenMP.cpp, clang/test/OpenMP parallel_default_variableCategory_codegen.cpp

[Clang][OpenMP] Bug fix Default clause variable category (#168846)

Same changes as in fix for
https://github.com/llvm/llvm-project/pull/165276 except for changes in
test case :
  1)   remove unnecessary include in test to restore Ubuntu build.
This is not needed as allocatable modifier is not applicable to the
default clause in C/C++.
2) Changes in CHECK statements to accommodate testing failure on
toolchain
builders at Google, Reported by Prabhu Rajasekaran.

---------

Co-authored-by: Sunil Kuravinakop <kuravina at pe31.hpc.amslabs.hpecorp.net>
DeltaFile
+86-0clang/test/OpenMP/parallel_default_variableCategory_codegen.cpp
+3-3clang/lib/Sema/SemaOpenMP.cpp
+89-32 files

LLVM/project 645e0dcllvm/lib/Target/RISCV RISCVZilsdOptimizer.cpp RISCVLoadStoreOptimizer.cpp, llvm/test/CodeGen/RISCV zilsd-ldst-opt-prera.mir zilsd-ldst-opt-postra.mir

[llvm][RISCV] Implement Zilsd load/store pair optimization (#158640)

This commit implements a complete load/store optimization pass for the
RISC-V Zilsd extension, which combines pairs of 32-bit load/store
instructions into single 64-bit LD/SD instructions when possible.
Default alignment is 8, it also provide zilsd-4byte-align feature for
looser condition.

Related work: https://reviews.llvm.org/D144002

---------

Co-authored-by: Copilot <175728472+Copilot at users.noreply.github.com>
DeltaFile
+1,242-0llvm/test/CodeGen/RISCV/zilsd-ldst-opt-prera.mir
+529-0llvm/lib/Target/RISCV/RISCVZilsdOptimizer.cpp
+219-11llvm/lib/Target/RISCV/RISCVLoadStoreOptimizer.cpp
+216-0llvm/test/CodeGen/RISCV/zilsd-ldst-opt-postra.mir
+83-0llvm/test/CodeGen/RISCV/zilsd-regalloc-hints.mir
+69-0llvm/lib/Target/RISCV/RISCVRegisterInfo.cpp
+2,358-118 files not shown
+2,398-1114 files