LLVM/project 5ca53a2llvm/include/llvm/ExecutionEngine/Orc CallViaEPC.h, llvm/unittests/ExecutionEngine/Orc CallSPSViaEPCTest.cpp

[ORC] Add synchronous helper APIs to CallViaEPC.h (#170743)

This commit adds synchronous variants of callViaEPC and associated APIs
( EPCCaller, EPCCall), that take a promise as their first argument and
block on the resulting future, returning a result. The promise object is
passed to the asynchronous variant of callViaEPC to make the call.

The type of the promise argument is a template parameter, so types other
than std::promise may be used. The promise type must provide a
`get_future` operation to get a future for the result, and the future
type must provide a `get` operation to wait on the result (compatible
with std::promise / std::future).

The value type of the promise must be Expected<T> or Error, and
determines the return type of the synchronous call. E.g.

```
Expected<int32_t> Result =
    callViaEPC(std::promise<Expected<int32_t>>(), EPC, Serializer, Args...);
```
DeltaFile
+47-14llvm/include/llvm/ExecutionEngine/Orc/CallViaEPC.h
+59-2llvm/unittests/ExecutionEngine/Orc/CallSPSViaEPCTest.cpp
+106-162 files

LLVM/project 4f50948clang/test/CodeGen lifetime-invoke-c.c

Fix test checks
DeltaFile
+2-2clang/test/CodeGen/lifetime-invoke-c.c
+2-21 files

LLVM/project eb19707clang/lib/CodeGen CGCall.cpp

git clang-format
DeltaFile
+2-1clang/lib/CodeGen/CGCall.cpp
+2-11 files

LLVM/project 7856030clang/lib/CodeGen CGCall.cpp

Update comment to be more accurate
DeltaFile
+3-5clang/lib/CodeGen/CGCall.cpp
+3-51 files

LLVM/project c2d60aeclang/test/CodeGenCXX aggregate-lifetime-invoke.cpp

Update invoke test for tighter lifetimes
DeltaFile
+12-14clang/test/CodeGenCXX/aggregate-lifetime-invoke.cpp
+12-141 files

LLVM/project 1f7a5a3clang/lib/CodeGen CGCall.cpp

Avoid checking NoLifetimeMarkersForTemporaries
DeltaFile
+5-4clang/lib/CodeGen/CGCall.cpp
+5-41 files

LLVM/project 9dc7e8dclang/lib/CodeGen CGCall.cpp, clang/test/CodeGen lifetime-invoke-c.c

Add cleanups for the error path and add more tests
DeltaFile
+12-13clang/test/CodeGenCXX/aggregate-lifetime-invoke.cpp
+5-7clang/test/CodeGen/lifetime-invoke-c.c
+4-1clang/lib/CodeGen/CGCall.cpp
+21-213 files

LLVM/project b235854clang/lib/CodeGen CGCall.h CGCall.cpp, clang/test/CodeGen stack-usage-lifetimes.c

[clang] Use tighter lifetime bounds for C temporary arguments

In C, consecutive statements in the same scope are under
CompoundStmt/CallExpr, while in C++ they typically fall under
CompoundStmt/ExprWithCleanup. This leads to different behavior with
respect to where pushFullExprCleanUp inserts the lifetime end markers
(e.g., at the end of scope).

For these cases, we can track and insert the lifetime end markers right
after the call completes. Allowing the stack space to be reused
immediately. This partially addresses #109204 and #43598 for improving
stack usage.
DeltaFile
+19-0clang/lib/CodeGen/CGCall.h
+14-4clang/lib/CodeGen/CGCall.cpp
+6-6clang/test/CodeGen/stack-usage-lifetimes.c
+1-1clang/test/CodeGenCXX/stack-reuse-miscompile.cpp
+40-114 files

LLVM/project 17a82ceclang/test/CodeGen lifetime-invoke-c.c, clang/test/CodeGenCXX aggregate-lifetime-invoke.cpp

Use triple in RUN line
DeltaFile
+1-1clang/test/CodeGen/lifetime-invoke-c.c
+1-1clang/test/CodeGenCXX/aggregate-lifetime-invoke.cpp
+2-22 files

LLVM/project 0c900dbclang/test/CodeGen lifetime-invoke-c.c

Fix test checks
DeltaFile
+2-2clang/test/CodeGen/lifetime-invoke-c.c
+2-21 files

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

[mlir][AMDGPU] Rename gfx1250 packed extension ops, change firstScaleLane (#170718)

The current name of scaled_ext_packed816 was, in retrospect, bothering
me, since it just has a bunch of numbers on the end and doesn't really
reflect the wave-wide nature of the operation.

On top of that, the fact that firstScaleLane was 0 or 1, which might be
read as the first lane being 1 (and not what it actually was, 16), also
seemed weird.

Therefore, before this op sees any use,

1. Renaem it to scaled_ext_packed_matrix
2. Change the semantics of firstScaleLane to actually point at the lane
where the scales start (valid options currently are 0 or 16, the two
halves of a wave32 wave).

(Disclaimer: the mechanical updates were done via AI.)


    [2 lines not shown]
DeltaFile
+53-50mlir/lib/Conversion/AMDGPUToROCDL/AMDGPUToROCDL.cpp
+43-43mlir/test/Conversion/AMDGPUToROCDL/gfx1250.mlir
+40-40mlir/test/Dialect/AMDGPU/ops.mlir
+16-17mlir/include/mlir/Dialect/AMDGPU/IR/AMDGPU.td
+4-4mlir/lib/Dialect/AMDGPU/IR/AMDGPUDialect.cpp
+156-1545 files

LLVM/project 19ff557clang/lib/CodeGen CGCall.cpp

git clang-format
DeltaFile
+2-1clang/lib/CodeGen/CGCall.cpp
+2-11 files

LLVM/project a95abeaclang/lib/CodeGen CGCall.cpp

Avoid checking NoLifetimeMarkersForTemporaries
DeltaFile
+5-4clang/lib/CodeGen/CGCall.cpp
+5-41 files

LLVM/project 9f06302clang/lib/CodeGen CGCall.cpp, clang/test/CodeGen lifetime-invoke-c.c

Add cleanups for the error path and add more tests
DeltaFile
+12-13clang/test/CodeGenCXX/aggregate-lifetime-invoke.cpp
+5-7clang/test/CodeGen/lifetime-invoke-c.c
+4-1clang/lib/CodeGen/CGCall.cpp
+21-213 files

LLVM/project c2d9ba3clang/lib/CodeGen CGCall.cpp

Update comment to be more accurate
DeltaFile
+3-5clang/lib/CodeGen/CGCall.cpp
+3-51 files

LLVM/project 570f886clang/lib/CodeGen CGCall.h CGCall.cpp, clang/test/CodeGen stack-usage-lifetimes.c

[clang] Use tighter lifetime bounds for C temporary arguments

In C, consecutive statements in the same scope are under
CompoundStmt/CallExpr, while in C++ they typically fall under
CompoundStmt/ExprWithCleanup. This leads to different behavior with
respect to where pushFullExprCleanUp inserts the lifetime end markers
(e.g., at the end of scope).

For these cases, we can track and insert the lifetime end markers right
after the call completes. Allowing the stack space to be reused
immediately. This partially addresses #109204 and #43598 for improving
stack usage.
DeltaFile
+19-0clang/lib/CodeGen/CGCall.h
+14-4clang/lib/CodeGen/CGCall.cpp
+6-6clang/test/CodeGen/stack-usage-lifetimes.c
+1-1clang/test/CodeGenCXX/stack-reuse-miscompile.cpp
+40-114 files

LLVM/project ca09916clang/test/CodeGenCXX aggregate-lifetime-invoke.cpp

Update invoke test for tighter lifetimes
DeltaFile
+12-14clang/test/CodeGenCXX/aggregate-lifetime-invoke.cpp
+12-141 files

LLVM/project 6969ac8llvm/lib/Target/RISCV RISCVInstrInfo.cpp RISCVInstrInfo.td, llvm/lib/Target/RISCV/MCTargetDesc RISCVBaseInfo.h

[RISCV] Make RISCVInstrInfo::verifyInstruction stricter for immediate-only operands (#170736)

Most of the immediate operands can only be an immediate, but we were
allowing any non-register operand.

Split the immediate-only from the immediate or non-register operands.
The non-register cases could be made even stricter, but I'll leave that
as a TODO.
DeltaFile
+209-183llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
+9-3llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h
+7-0llvm/tools/llvm-exegesis/lib/RISCV/Target.cpp
+3-0llvm/lib/Target/RISCV/RISCVInstrInfo.td
+228-1864 files

LLVM/project 224f837clang/test/CodeGen lifetime-invoke-c.c

Fix over specific attribute checks in test
DeltaFile
+3-3clang/test/CodeGen/lifetime-invoke-c.c
+3-31 files

LLVM/project 5c38b64llvm/utils/TableGen/Common CodeGenInstAlias.cpp CodeGenTarget.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.8-beta.1
DeltaFile
+3-9llvm/utils/TableGen/Common/CodeGenInstAlias.cpp
+6-4llvm/utils/TableGen/Common/CodeGenTarget.cpp
+1-0llvm/utils/TableGen/Common/CodeGenTarget.h
+10-133 files

LLVM/project 47de55fbolt/lib/Core BinaryFunction.cpp

[BOLT] Minor code refactoring. NFC (#170746)

DeltaFile
+1-3bolt/lib/Core/BinaryFunction.cpp
+1-31 files

LLVM/project 9c273dcllvm/lib/Target/RISCV RISCVInstrInfo.cpp

[RISCV] Correct the register class for the VL op check in RISCVInstrInfo::verifyInstruction. (#170751)

The VL operand cannot be X0. We represent VLMAX with -1.
DeltaFile
+1-1llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
+1-11 files

LLVM/project 4b54836mlir/include/mlir/Tools/PDLL/AST Types.h, mlir/lib/Tools/PDLL/AST TypeDetail.h Context.cpp

[PDLL] Collapse TypeDetail.h into Types.h (#170341)

This allows this code to be compiled with `MLIR_USE_FALLBACK_TYPE_IDS=1`
which is used to solve TypeID issues across different DSOs. This Types.h
is only included in a few tools so the impact of this header being
larger should be limited.
DeltaFile
+0-141mlir/lib/Tools/PDLL/AST/TypeDetail.h
+121-11mlir/include/mlir/Tools/PDLL/AST/Types.h
+1-6utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+1-1mlir/lib/Tools/PDLL/AST/Context.cpp
+0-1mlir/lib/Tools/PDLL/AST/Types.cpp
+123-1605 files

LLVM/project e079fdfutils/bazel configure.bzl

[bazel][NFC] Avoid set for older bazel versions (#170758)

The `set` type is only available on Bazel 8.1, which is newer than some
projects. This gives some time for downstream users of LLVM to migrate
to Bazel 8.1 or newer.

e.g.
https://github.com/openxla/xla/actions/runs/19943322161/job/57186478292
DeltaFile
+5-4utils/bazel/configure.bzl
+5-41 files

LLVM/project b4194f0libcxx/utils/libcxx/test modules.py

[libc++] Fix module_std_compat.sh.cpp with new versions of clang-tidy (#170446)

clang-tidy doesn't run checks anymore in system headers by default in
new versions to reduce runtime. In this case it's problematic, since we
want to check system headers.
DeltaFile
+2-1libcxx/utils/libcxx/test/modules.py
+2-11 files

LLVM/project f9c2117mlir/include/mlir/Dialect/OpenACC OpenACCOps.td, mlir/lib/Dialect/OpenACC/IR OpenACC.cpp

[acc] Add an API to make private recipes out of firstprivate recipes  (#170588)

In cases of optimizations promoting firstprivate to private, this API
would be useful.
DeltaFile
+38-0mlir/test/Dialect/OpenACC/recipe-populate-private-from-firstprivate.mlir
+23-0mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp
+23-0mlir/test/lib/Dialect/OpenACC/TestRecipePopulate.cpp
+13-0mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td
+97-04 files

LLVM/project 48751a3llvm/lib/Transforms/IPO LowerTypeTests.cpp, llvm/test/Transforms/LowerTypeTests import.ll

[LTT] Add `unknown` branch weights when lowering type tests with conditional
DeltaFile
+14-7llvm/test/Transforms/LowerTypeTests/import.ll
+3-0llvm/lib/Transforms/IPO/LowerTypeTests.cpp
+0-2llvm/utils/profcheck-xfail.txt
+17-93 files

LLVM/project c5d04ecllvm/lib/Transforms/Utils BasicBlockUtils.cpp, llvm/test/Transforms/UnifyLoopExits basic.ll

[AMDGPU][UnifyLoopExits] Fix duplicate succesor handling

Fixes https://github.com/llvm/llvm-project/issues/170730
DeltaFile
+35-8llvm/test/Transforms/UnifyLoopExits/basic.ll
+5-3llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
+40-112 files

LLVM/project 0e0c0b7lldb/source/Plugins/ScriptInterpreter/Python/Interfaces ScriptedPythonInterface.h

[lldb/ScriptInterpreter] Fix typo in GetScriptedModulePath (NFC)

This fixes a typo in `ScriptedPythonInterface::GetScriptedModulePath`.

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

LLVM/project a8b26efclang/lib/CodeGen CGCall.cpp

Remove unnecessary include
DeltaFile
+0-1clang/lib/CodeGen/CGCall.cpp
+0-11 files