LLVM/project 3ca85e7lldb/source/Plugins/ScriptInterpreter/Python PythonDataObjects.cpp, lldb/source/Plugins/ScriptInterpreter/Python/Interfaces ScriptedPythonInterface.h

[lldb] Handle staticmethod/classmethod descriptors in ScriptedPythonInterface (#170188)

Extract `__func__` attribute from staticmethod/classmethod descriptors
before treating them as callables. Python's `@staticmethod` and
`@classmethod` decorators wrap methods in descriptor objects that are
not directly usable as PythonCallable, when calling PyCallable_Check.

The actual callable function is stored in the `__func__` attribute of
these descriptors, so we need to unwrap them to properly validate and
invoke the decorated methods in scripted interfaces.

Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>
DeltaFile
+11-0lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
+2-1lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h
+13-12 files

LLVM/project 637a230llvm/include/llvm/ADT MapVector.h, llvm/unittests/ADT MapVectorTest.cpp

[MapVector] Introduce {keys,values} iterators (#169675)

Similar to DenseMap::{keys,values}, introduce MapVector::{keys,values}.
DeltaFile
+18-0llvm/unittests/ADT/MapVectorTest.cpp
+5-0llvm/include/llvm/ADT/MapVector.h
+23-02 files

LLVM/project da9e8d5lldb/source/Expression DWARFExpression.cpp, lldb/unittests/Expression DWARFExpressionTest.cpp

[lldb] Unify DW_OP_deref and DW_OP_deref_size implementations (#169587)

This commit unifies the code in the dwarf expression evaluator that
handles these two deref operations. Previously we had similar, but not
identical code for handling them.

The implementation was taken from the DW_OP_deref_size code path since
that handles the general case. We put that code into an
Evaluate_DW_OP_deref_size function and call it with the address size
when evaluating DW_OP_deref.

There were initially two test failures when I made the change. The
`DW_op_deref_no_ptr_fixing` unittest failed because we were not
correctly setting the address size when we created the DataExtractor.
The `DW_OP_deref test` failed because previously the expression
`DW_OP_lit4, DW_OP_deref` would evaluate to a LoadAddress, but the code
for deref_size was evaluating it to a scalar.

The difference was in how it handled a deref of a scalar value type. In

    [12 lines not shown]
DeltaFile
+136-194lldb/source/Expression/DWARFExpression.cpp
+3-2lldb/unittests/Expression/DWARFExpressionTest.cpp
+139-1962 files

LLVM/project 5d4c441llvm/lib/Transforms/Instrumentation RealtimeSanitizer.cpp, llvm/test/Instrumentation/RealtimeSanitizer rtsan_attrib_declare.ll

[rtsan] Handle attributed IR function declarations (#169577)

Addresses https://github.com/llvm/llvm-project/issues/169377.

Previously, the RealtimeSanitizer pass only handled attributed function
_definitions_ in IR, and we have recently found that attributed function
_declarations_ caused it to crash. To fix the issue, we must check
whether the IR function is empty before attempting to do any
manipulation of its instructions.

This PR:

- Adds checks for whether IR `Function`s are `empty()` ~~in each
relevant~~ at the top-level RTSan pass routine
- ~~Removes the utility function `rtsanPreservedCFGAnalyses` from the
pass, whose result was unused and which would otherwise have complicated
the fix~~
DeltaFile
+11-0llvm/test/Instrumentation/RealtimeSanitizer/rtsan_attrib_declare.ll
+3-0llvm/lib/Transforms/Instrumentation/RealtimeSanitizer.cpp
+14-02 files

LLVM/project af2e246mlir/lib/Dialect/Linalg/Transforms ElementwiseOpFusion.cpp, mlir/test/Dialect/Linalg fuse-with-reshape-by-collapsing.mlir reshape_fusion.mlir

[mlir] Add missing pad reshape propagation patterns (#168888)

The existing `FoldPadWithProducerReshapeOpByExpansion` and
`FoldPadWithProducerReshapeOpByCollapsing` patterns did not cover all
reshape propagation cases, because they only consider cases where the
pad op is the consumer operation. This PR adds 2 new patterns to cover
the cases where the pad op is the producer operation, which completes
the propagation pattern set for pad op with expand_shape and
collapse_shape.

Note for integration: This PR also removes the single user restriction
for the `FoldPadWithProducerReshapeOpByExpansion` and
`FoldPadWithProducerReshapeOpByCollapsing` patterns, which leaves more
control to the users of the pattern. If this constraint is needed, then
it should be added to the control function for these patterns.

---------

Signed-off-by: Max Dawkins <max.dawkins at gmail.com>
DeltaFile
+251-56mlir/lib/Dialect/Linalg/Transforms/ElementwiseOpFusion.cpp
+75-0mlir/test/Dialect/Linalg/fuse-with-reshape-by-collapsing.mlir
+75-0mlir/test/Dialect/Linalg/reshape_fusion.mlir
+401-563 files

LLVM/project 7b2ee46clang/include/clang/CIR/Dialect/IR CIRTypeConstraints.td

[CIR] Add boolean to the Complex type constraints msg (#170192)

Update the type constraints error message to also mention the boolean
type
DeltaFile
+1-1clang/include/clang/CIR/Dialect/IR/CIRTypeConstraints.td
+1-11 files

LLVM/project d7b5469clang/lib/Analysis Consumed.cpp, clang/test/SemaCXX no-warn-consumed-analysis.cpp

[clang] Handle null dtor decl during consumed analysis (#170180)

See similar PR #169593.

This is another case where null was not handled when returned from
`getDestructorDecl`.
DeltaFile
+5-4clang/lib/Analysis/Consumed.cpp
+9-0clang/test/SemaCXX/no-warn-consumed-analysis.cpp
+14-42 files

LLVM/project a712a81clang/include/clang/Basic DiagnosticSemaKinds.td, clang/include/clang/Options Options.td

[Clang] [C++26] Expansion Statements (Part 10)
DeltaFile
+68-0clang/test/SemaCXX/cxx2c-expansion-stmts-limit.cpp
+18-0clang/lib/Sema/SemaExpand.cpp
+9-0clang/test/SemaCXX/cxx2c-fexpansion-statements.cpp
+4-0clang/include/clang/Basic/DiagnosticSemaKinds.td
+4-0clang/include/clang/Options/Options.td
+1-0clang/lib/Driver/ToolChains/Clang.cpp
+104-01 files not shown
+105-07 files

LLVM/project 05b6beeclang/lib/CodeGen CGStmt.cpp, clang/test/CodeGenCXX cxx2c-enumerating-expansion-statements.cpp cxx2c-iterating-expansion-stmt.cpp

[Clang] [C++26] Expansion Statements (Part 8)
DeltaFile
+1,518-0clang/test/CodeGenCXX/cxx2c-enumerating-expansion-statements.cpp
+474-0clang/test/CodeGenCXX/cxx2c-iterating-expansion-stmt.cpp
+471-0clang/test/CodeGenCXX/cxx2c-destructuring-expansion-stmt.cpp
+429-0clang/test/CodeGenCXX/cxx2c-expansion-stmts-control-flow.cpp
+208-0clang/test/CodeGenCXX/cxx2c-expansion-stmts-templates.cpp
+40-1clang/lib/CodeGen/CGStmt.cpp
+3,140-11 files not shown
+3,143-17 files

LLVM/project a48ef4cclang/lib/CodeGen CGDecl.cpp

Move CGDecl implementation here
DeltaFile
+6-2clang/lib/CodeGen/CGDecl.cpp
+6-21 files

LLVM/project f2ee95dclang/include/clang/Basic DiagnosticSemaKinds.td, clang/include/clang/Sema ScopeInfo.h

[Clang] [C++26] Expansion Statements (Part 9)
DeltaFile
+117-0clang/test/SemaCXX/cxx2c-expansion-stmts-control-flow.cpp
+38-9clang/lib/Sema/SemaLookup.cpp
+28-2clang/lib/Sema/SemaStmt.cpp
+9-2clang/lib/Parse/ParseStmt.cpp
+6-0clang/include/clang/Basic/DiagnosticSemaKinds.td
+5-1clang/include/clang/Sema/ScopeInfo.h
+203-141 files not shown
+205-157 files

LLVM/project 15cb447clang/docs ReleaseNotes.rst, clang/include/clang/Basic DiagnosticCommonKinds.td

[Clang] [C++26] Expansion Statements (Part 11)
DeltaFile
+104-0clang/test/AST/ast-print-expansion-stmts.cpp
+49-0clang/test/AST/ast-dump-expansion-stmt.cpp
+0-4clang/include/clang/Basic/DiagnosticCommonKinds.td
+1-1clang/www/cxx_status.html
+2-0clang/docs/ReleaseNotes.rst
+156-55 files

LLVM/project 548eadbclang/include/clang/Basic DiagnosticSemaKinds.td, clang/include/clang/Sema Sema.h

[Clang] [C++26] Expansion Statements (Part 5)
DeltaFile
+243-3clang/lib/Sema/SemaExpand.cpp
+48-2clang/lib/Sema/TreeTransform.h
+12-1clang/lib/Sema/SemaStmt.cpp
+7-0clang/include/clang/Basic/DiagnosticSemaKinds.td
+6-0clang/include/clang/Sema/Sema.h
+316-65 files

LLVM/project 2766c87clang/lib/AST ExprConstant.cpp, clang/lib/Sema SemaDeclCXX.cpp

[Clang] [C++26] Expansion Statements (Part 7)
DeltaFile
+1,042-0clang/test/SemaCXX/cxx2c-expansion-stmts.cpp
+40-0clang/lib/AST/ExprConstant.cpp
+3-0clang/lib/Sema/SemaDeclCXX.cpp
+1,085-03 files

LLVM/project 8a3ae34clang/lib/Sema SemaStmt.cpp

Remove most expansion-statement-specific code
DeltaFile
+1-12clang/lib/Sema/SemaStmt.cpp
+1-121 files

LLVM/project 576f888clang/include/clang/Basic DiagnosticSemaKinds.td, clang/lib/Sema SemaExpand.cpp

Reject incomplete types and vlas
DeltaFile
+11-0clang/lib/Sema/SemaExpand.cpp
+4-0clang/include/clang/Basic/DiagnosticSemaKinds.td
+15-02 files

LLVM/project 2db2d6dclang/include/clang/Basic DiagnosticSemaKinds.td, clang/include/clang/Sema Sema.h

[Clang] [C++26] Expansion Statements (Part 6)
DeltaFile
+96-5clang/lib/Sema/SemaExpand.cpp
+52-11clang/lib/Sema/TreeTransform.h
+3-0clang/include/clang/Sema/Sema.h
+2-0clang/include/clang/Basic/DiagnosticSemaKinds.td
+153-164 files

LLVM/project d0c4da5clang/include/clang/Sema Sema.h, clang/lib/Sema SemaStmt.cpp

[Clang] [C++26] Expansion Statements (Part 4)
DeltaFile
+279-224clang/lib/Sema/SemaStmt.cpp
+34-0clang/include/clang/Sema/Sema.h
+313-2242 files

LLVM/project 56ad658clang/include/clang/Sema Sema.h, clang/lib/Sema SemaExpand.cpp TreeTransform.h

[Clang] [C++26] Expansion Statements (Part 3)
DeltaFile
+151-0clang/lib/Sema/SemaExpand.cpp
+105-5clang/lib/Sema/TreeTransform.h
+40-40clang/test/Parser/cxx2c-expansion-statements.cpp
+37-1clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+26-3clang/lib/Sema/SemaTemplateInstantiate.cpp
+22-0clang/include/clang/Sema/Sema.h
+381-493 files not shown
+391-519 files

LLVM/project 6fcfc03clang/test/SemaCXX cxx2c-expansion-stmts.cpp

Add incomplete type and vla tests
DeltaFile
+42-2clang/test/SemaCXX/cxx2c-expansion-stmts.cpp
+42-21 files

LLVM/project f92568aclang/lib/Sema SemaExpand.cpp

Do not create a template parameter list for the index
DeltaFile
+1-4clang/lib/Sema/SemaExpand.cpp
+1-41 files

LLVM/project 55b399fclang/lib/Sema SemaExpand.cpp, clang/test/Parser cxx2c-expansion-statements.cpp cxx2c-expansion-statements-not-backported.cpp

Add parser tests
DeltaFile
+63-0clang/test/Parser/cxx2c-expansion-statements.cpp
+5-0clang/test/Parser/cxx2c-expansion-statements-not-backported.cpp
+2-3clang/lib/Sema/SemaExpand.cpp
+70-33 files

LLVM/project afa5054clang/include/clang/Basic DiagnosticCommonKinds.td, clang/lib/Sema SemaExpand.cpp

Add Sema for CXXExpansionStmtDecl
DeltaFile
+29-4clang/lib/Sema/SemaExpand.cpp
+4-0clang/include/clang/Basic/DiagnosticCommonKinds.td
+33-42 files

LLVM/project afb3486clang/include/clang/Parse Parser.h, clang/include/clang/Sema Sema.h

[Clang] [C++26] Expansion Statements (Part 2)
DeltaFile
+127-14clang/lib/Parse/ParseStmt.cpp
+57-0clang/lib/Sema/SemaExpand.cpp
+37-4clang/include/clang/Parse/Parser.h
+6-31clang/lib/Parse/ParseDecl.cpp
+32-1clang/include/clang/Sema/Sema.h
+20-0clang/lib/Parse/ParseInit.cpp
+279-505 files not shown
+309-6011 files

LLVM/project b02fea2clang/include/clang/Basic DiagnosticParseKinds.td, clang/include/clang/Parse Parser.h

Some parsing improvements
DeltaFile
+33-4clang/lib/Parse/ParseStmt.cpp
+7-6clang/lib/Parse/ParseExpr.cpp
+3-2clang/include/clang/Parse/Parser.h
+3-1clang/test/Parser/cxx2c-expansion-statements.cpp
+4-0clang/include/clang/Basic/DiagnosticParseKinds.td
+1-2clang/lib/Parse/ParseInit.cpp
+51-156 files

LLVM/project 4415e4dclang/include/clang/AST DeclTemplate.h, clang/lib/AST DeclTemplate.cpp ASTImporter.cpp

Do not create a template parameter list for the index
DeltaFile
+6-7clang/lib/AST/DeclTemplate.cpp
+6-6clang/include/clang/AST/DeclTemplate.h
+2-2clang/lib/AST/ASTImporter.cpp
+1-1clang/lib/Serialization/ASTReaderDecl.cpp
+1-1clang/lib/Serialization/ASTWriterDecl.cpp
+16-175 files

LLVM/project c6418bcclang/test/CodeGen/arm-mve-intrinsics ternary.c, llvm/test/CodeGen/AArch64 fixed-length-bf16-arith.ll

rebase

Created using spr 1.3.8-beta.1
DeltaFile
+4,725-0llvm/test/tools/llvm-mca/RISCV/SpacemitX60/vlseg-vsseg.s
+3,019-0llvm/test/Transforms/AggressiveInstCombine/umulh_carry4.ll
+692-320clang/test/CodeGen/arm-mve-intrinsics/ternary.c
+936-0llvm/test/CodeGen/AArch64/fixed-length-bf16-arith.ll
+757-111llvm/test/Transforms/LoopVectorize/first-order-recurrence-tail-folding.ll
+858-0llvm/test/Transforms/AggressiveInstCombine/umulh_ladder.ll
+10,987-4311,383 files not shown
+62,407-17,9541,389 files

LLVM/project a68cea5clang/test/CodeGen/arm-mve-intrinsics ternary.c, llvm/test/CodeGen/AArch64 fixed-length-bf16-arith.ll

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.8-beta.1

[skip ci]
DeltaFile
+4,725-0llvm/test/tools/llvm-mca/RISCV/SpacemitX60/vlseg-vsseg.s
+3,019-0llvm/test/Transforms/AggressiveInstCombine/umulh_carry4.ll
+692-320clang/test/CodeGen/arm-mve-intrinsics/ternary.c
+936-0llvm/test/CodeGen/AArch64/fixed-length-bf16-arith.ll
+757-111llvm/test/Transforms/LoopVectorize/first-order-recurrence-tail-folding.ll
+858-0llvm/test/Transforms/AggressiveInstCombine/umulh_ladder.ll
+10,987-4311,383 files not shown
+62,407-17,9541,389 files

LLVM/project 71f3848clang/test/CodeGen/arm-mve-intrinsics ternary.c, llvm/test/CodeGen/AArch64 fixed-length-bf16-arith.ll

rebase

Created using spr 1.3.8-beta.1
DeltaFile
+4,725-0llvm/test/tools/llvm-mca/RISCV/SpacemitX60/vlseg-vsseg.s
+3,019-0llvm/test/Transforms/AggressiveInstCombine/umulh_carry4.ll
+692-320clang/test/CodeGen/arm-mve-intrinsics/ternary.c
+936-0llvm/test/CodeGen/AArch64/fixed-length-bf16-arith.ll
+757-111llvm/test/Transforms/LoopVectorize/first-order-recurrence-tail-folding.ll
+858-0llvm/test/Transforms/AggressiveInstCombine/umulh_ladder.ll
+10,987-4311,383 files not shown
+62,407-17,9541,389 files

LLVM/project 258cb46mlir/include/mlir/Dialect/OpenACC/Transforms Passes.td, mlir/lib/Dialect/OpenACC/Transforms ACCLegalizeSerial.cpp CMakeLists.txt

[mlir][acc] Add acc serial to acc parallel conversion (#170189)

This patch introduces a new transformation pass that converts
`acc.serial` constructs into `acc.parallel` constructs with
num_gangs(1), num_workers(1), and vector_length(1).

The transformation is semantically equivalent since an OpenACC serial
region executes sequentially, which is identical to a parallel region
with a single gang, worker, and vector. This unification simplifies
processing of acc regions by enabling code reuse in later compilation
stages.

Co-authored-by: Vijay Kandiah <vkandiah at nvidia.com>
DeltaFile
+164-0mlir/test/Dialect/OpenACC/legalize-serial.mlir
+117-0mlir/lib/Dialect/OpenACC/Transforms/ACCLegalizeSerial.cpp
+16-0mlir/include/mlir/Dialect/OpenACC/Transforms/Passes.td
+1-0mlir/lib/Dialect/OpenACC/Transforms/CMakeLists.txt
+298-04 files