Skip to content

Conversation

@lhames
Copy link
Contributor

@lhames lhames commented Dec 3, 2025

These utilities simplify making typed async calls via ExecutorProcessControl::callWrapperAsync.

CallViaEPC.h provides utilities for making typed async calls using a given Serializer to serialize arguments and deserialize results.

callViaEPC takes a result handler function object (accepting Expected), an EPC reference, a Serializer, a target function address, and arguments. The return type T is inferred from the handler's argument type using CallableTraitsHelper.

EPCCaller wraps an ExecutorProcessControl& and Serializer, simplifying repeated calls with the same serialization.

EPCCall wraps an EPCCaller and target function address, simplifying repeated calls to a specific wrapper function.

CallSPSViaEPC.h provides utilities for using CallViaEPC with SPS serialization.

SPSCallSerializer is a CallViaEPC-compatible serializer using SPS.

SPSEPCCaller takes an SPS function signature as its template argument and applies SPS serialization to arguments and return values.

SPSEPCCall wraps an SPSCaller and a target function address, simplifying repeated calls to a specific SPS wrapper function.

These utilities simplify making typed async calls via
ExecutorProcessControl::callWrapperAsync.

CallViaEPC.h provides utilities for making typed async calls using a given
Serializer to serialize arguments and deserialize results.

callViaEPC takes a result handler function object (accepting Expected<T>), an
EPC reference, a Serializer, a target function address, and arguments. The
return type T is inferred from the handler's argument type using
CallableTraitsHelper.

EPCCaller wraps an ExecutorProcessControl& and Serializer, simplifying
repeated calls with the same serialization.

EPCCall wraps an EPCCaller and target function address, simplifying repeated
calls to a specific wrapper function.

CallSPSViaEPC.h provides utilities for using CallViaEPC with SPS serialization.

SPSCallSerializer is a CallViaEPC-compatible serializer using SPS.

SPSEPCCaller takes an SPS function signature as its template argument and
applies SPS serialization to arguments and return values.

SPSEPCCall wraps an SPSCaller and a target function address, simplifying
repeated calls to a specific SPS wrapper function.
@lhames lhames merged commit 1a09ac5 into llvm:main Dec 4, 2025
11 checks passed
@lhames lhames deleted the orc-callviaepc branch December 4, 2025 00:17
@llvm-ci
Copy link
Collaborator

llvm-ci commented Dec 4, 2025

LLVM Buildbot has detected a new failure on builder ppc64le-flang-rhel-clang running on ppc64le-flang-rhel-test while building llvm at step 3 "clean-build-dir".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/157/builds/42727

Here is the relevant piece of the build log for the reference
Step 3 (clean-build-dir) failure: Delete failed. (failure) (timed out)
Step 4 (cmake-configure) failure: cmake (failure) (timed out)
command timed out: 1200 seconds without output running [b'cmake', b'-DLLVM_TARGETS_TO_BUILD=PowerPC', b'-DLLVM_INSTALL_UTILS=ON', b'-DCMAKE_CXX_STANDARD=17', b'-DLLVM_LIT_ARGS=-vj 256', b'-DFLANG_ENABLE_WERROR=ON', b'-DLLVM_ENABLE_ASSERTIONS=ON', b'-DCMAKE_C_COMPILER_LAUNCHER=ccache', b'-DCMAKE_CXX_COMPILER_LAUNCHER=ccache', b'-DLLVM_ENABLE_PROJECTS=flang;llvm;mlir;clang', b'-DLLVM_ENABLE_RUNTIMES=flang-rt;openmp', b'-DCMAKE_BUILD_TYPE=Release', b'-GNinja', b'../llvm-project/llvm'], attempting to kill
process killed by signal 9
program finished with exit code -1
elapsedTime=1200.445931

@llvm-ci
Copy link
Collaborator

llvm-ci commented Dec 4, 2025

LLVM Buildbot has detected a new failure on builder reverse-iteration running on hexagon-build-03 while building llvm at step 6 "check_all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/110/builds/6629

Here is the relevant piece of the build log for the reference
Step 6 (check_all) failure: test (failure)
******************** TEST 'Clang :: Interpreter/dynamic-library.cpp' FAILED ********************
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 17
cat /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.src/clang/test/Interpreter/dynamic-library.cpp | env LD_LIBRARY_PATH=/local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.src/clang/test/Interpreter/Inputs:$LD_LIBRARY_PATH /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/bin/clang-repl | /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/bin/FileCheck /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.src/clang/test/Interpreter/dynamic-library.cpp
# executed command: cat /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.src/clang/test/Interpreter/dynamic-library.cpp
# .---command stdout------------
# | // REQUIRES: host-supports-jit, x86_64-linux
# | 
# | // To generate libdynamic-library-test.so :
# | // clang -xc++ -o libdynamic-library-test.so -fPIC -shared
# | //
# | // extern "C" {
# | //
# | // int ultimate_answer = 0;
# | // 
# | // int calculate_answer() {
# | //   ultimate_answer = 42;
# | //   return 5;
# | // }
# | //
# | // }
# | 
# | // RUN: cat %s | env LD_LIBRARY_PATH=%S/Inputs:$LD_LIBRARY_PATH clang-repl | FileCheck %s
# | 
# | extern "C" int printf(const char* format, ...);
# | 
# | extern "C" int ultimate_answer;
# | extern "C" int calculate_answer();
# | 
# | %lib libdynamic-library-test.so
# | 
# | printf("Return value: %d\n", calculate_answer());
# | // CHECK: Return value: 5
# | 
# | printf("Variable: %d\n", ultimate_answer);
# | // CHECK-NEXT: Variable: 42
# | 
# | %quit
# `-----------------------------
# executed command: env 'LD_LIBRARY_PATH=/local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.src/clang/test/Interpreter/Inputs:$LD_LIBRARY_PATH' /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/bin/clang-repl
# .---command stderr------------
# | /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/bin/clang-repl: error while loading shared libraries: libc++.so.1: cannot open shared object file: No such file or directory
# `-----------------------------
# error: command failed with exit status: 127
# executed command: /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/bin/FileCheck /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.src/clang/test/Interpreter/dynamic-library.cpp
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
...

kcloudy0717 pushed a commit to kcloudy0717/llvm-project that referenced this pull request Dec 4, 2025
These utilities simplify making typed async calls via
ExecutorProcessControl::callWrapperAsync.

CallViaEPC.h provides utilities for making typed async calls using a
given Serializer to serialize arguments and deserialize results.

callViaEPC takes a result handler function object (accepting
Expected<T>), an EPC reference, a Serializer, a target function address,
and arguments. The return type T is inferred from the handler's argument
type using CallableTraitsHelper.

EPCCaller wraps an ExecutorProcessControl& and Serializer, simplifying
repeated calls with the same serialization.

EPCCall wraps an EPCCaller and target function address, simplifying
repeated calls to a specific wrapper function.

CallSPSViaEPC.h provides utilities for using CallViaEPC with SPS
serialization.

SPSCallSerializer is a CallViaEPC-compatible serializer using SPS.

SPSEPCCaller takes an SPS function signature as its template argument
and applies SPS serialization to arguments and return values.

SPSEPCCall wraps an SPSCaller and a target function address, simplifying
repeated calls to a specific SPS wrapper function.
@llvm-ci
Copy link
Collaborator

llvm-ci commented Dec 4, 2025

LLVM Buildbot has detected a new failure on builder clang-ppc64le-linux-test-suite running on ppc64le-clang-test-suite while building llvm at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/95/builds/19318

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: 1200 seconds without output running [b'ninja', b'check-all'], attempting to kill
...
PASS: lit :: shtest-shell.py (104405 of 104420)
PASS: lit :: shtest-define.py (104406 of 104420)
PASS: LLVM :: CodeGen/RISCV/attributes.ll (104407 of 104420)
PASS: ThreadSanitizer-powerpc64le :: restore_stack.cpp (104408 of 104420)
PASS: SanitizerCommon-lsan-powerpc64le-Linux :: Linux/signal_segv_handler.cpp (104409 of 104420)
PASS: SanitizerCommon-asan-powerpc64le-Linux :: Linux/signal_segv_handler.cpp (104410 of 104420)
PASS: SanitizerCommon-msan-powerpc64le-Linux :: Linux/signal_segv_handler.cpp (104411 of 104420)
PASS: mlgo-utils :: corpus/extract_ir_script.test (104412 of 104420)
PASS: SanitizerCommon-tsan-powerpc64le-Linux :: Linux/signal_segv_handler.cpp (104413 of 104420)
PASS: SanitizerCommon-ubsan-powerpc64le-Linux :: Linux/signal_segv_handler.cpp (104414 of 104420)
command timed out: 1200 seconds without output running [b'ninja', b'check-all'], attempting to kill
process killed by signal 9
program finished with exit code -1
elapsedTime=5882.262956

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants