[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...);
```
[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.
[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]
[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.
[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.
[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.
[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.
[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
[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.
[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.
[lldb/ScriptInterpreter] Fix typo in GetScriptedModulePath (NFC)
This fixes a typo in `ScriptedPythonInterface::GetScriptedModulePath`.
Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>