Skip to content

Conversation

@kr-2003
Copy link
Contributor

@kr-2003 kr-2003 commented Sep 20, 2025

This PR enables Out-Of-Process Interpreter for CppInterOp.

Under the hood, it uses LLVM's llvm-jitlink-executor and lib ORC RT to delegate the JIT execution to different process. The user just needs to pass --use-oop-jit flag as ClangArgs while constructing the interpreter to use this feature.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

There were too many comments to post at once. Showing the first 10 out of 16. Check the log or trigger a new build to see more.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

@mcbarton
Copy link
Collaborator

Before pushing commits to this PR please either ping me, or delete caches as they are made. This PR has caused a large number of llvm cached builds to be deleted on main, which in turn has required multiple PRs workflow runs to be stopped while the cache is rebuilt.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

@codecov
Copy link

codecov bot commented Oct 2, 2025

Codecov Report

❌ Patch coverage is 71.18644% with 34 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.04%. Comparing base (1baeb31) to head (543b605).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
lib/CppInterOp/CppInterOpInterpreter.h 68.96% 18 Missing ⚠️
lib/CppInterOp/CppInterOp.cpp 73.68% 10 Missing ⚠️
lib/CppInterOp/Compatibility.h 72.72% 6 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #717      +/-   ##
==========================================
- Coverage   79.39%   79.04%   -0.36%     
==========================================
  Files           9        9              
  Lines        3780     3879      +99     
==========================================
+ Hits         3001     3066      +65     
- Misses        779      813      +34     
Files with missing lines Coverage Δ
include/CppInterOp/CppInterOp.h 95.12% <ø> (ø)
lib/CppInterOp/Compatibility.h 87.39% <72.72%> (-3.70%) ⬇️
lib/CppInterOp/CppInterOp.cpp 87.60% <73.68%> (-0.32%) ⬇️
lib/CppInterOp/CppInterOpInterpreter.h 83.18% <68.96%> (-4.95%) ⬇️
Files with missing lines Coverage Δ
include/CppInterOp/CppInterOp.h 95.12% <ø> (ø)
lib/CppInterOp/Compatibility.h 87.39% <72.72%> (-3.70%) ⬇️
lib/CppInterOp/CppInterOp.cpp 87.60% <73.68%> (-0.32%) ⬇️
lib/CppInterOp/CppInterOpInterpreter.h 83.18% <68.96%> (-4.95%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@Vipul-Cariappa Vipul-Cariappa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please look at the comments.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

@mcbarton
Copy link
Collaborator

mcbarton commented Oct 5, 2025

Codecov Report

❌ Patch coverage is 74.33628% with 29 lines in your changes missing coverage. Please review. ✅ Project coverage is 80.45%. Comparing base (fe3de3c) to head (cfbb303).
Files with missing lines Patch % Lines
lib/CppInterOp/CppInterOpInterpreter.h 67.39% 15 Missing ⚠️
lib/CppInterOp/Compatibility.h 58.62% 12 Missing ⚠️
lib/CppInterOp/CppInterOp.cpp 94.73% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #717      +/-   ##
==========================================
- Coverage   81.03%   80.45%   -0.59%     
==========================================
  Files           9        9              
  Lines        4214     4307      +93     
==========================================
+ Hits         3415     3465      +50     
- Misses        799      842      +43     

Files with missing lines Coverage Δ
include/CppInterOp/CppInterOp.h 95.55% <ø> (ø)
lib/CppInterOp/CppInterOp.cpp 88.67% <94.73%> (-0.13%) ⬇️
lib/CppInterOp/Compatibility.h 77.53% <58.62%> (-14.50%) ⬇️
lib/CppInterOp/CppInterOpInterpreter.h 83.89% <67.39%> (-4.19%) ⬇️
Files with missing lines Coverage Δ
include/CppInterOp/CppInterOp.h 95.55% <ø> (ø)
lib/CppInterOp/CppInterOp.cpp 88.67% <94.73%> (-0.13%) ⬇️
lib/CppInterOp/Compatibility.h 77.53% <58.62%> (-14.50%) ⬇️
lib/CppInterOp/CppInterOpInterpreter.h 83.89% <67.39%> (-4.19%) ⬇️
🚀 New features to boost your workflow:

The tests are not covering over 1/4 of this patch. @kr-2003 can you improve the coverage?

Copy link
Collaborator

@Vipul-Cariappa Vipul-Cariappa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have 65 commits in this one single PR. Out of which ~15 says DO NOT MERGE. Now I am not sure if you want to merge this?
I changed this to "Draft PR" because of the "DO NOT MERGE" in the commit messages.

@mcbarton
Copy link
Collaborator

coverage

Can the coverage of this PR be increased? Over a 1/4 of it is not covered by tests.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

@kr-2003 kr-2003 marked this pull request as ready for review November 1, 2025 13:43
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

Copy link
Collaborator

@Vipul-Cariappa Vipul-Cariappa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me.
I am going ahead and merging this PR. If there are any issues that are found, we can fix it in subsequent PRs. If any refactors are required, we can open issues for them.

Copy link
Collaborator

@anutosh491 anutosh491 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the work here @kr-2003

@mcbarton
Copy link
Collaborator

mcbarton commented Nov 3, 2025

This looks good to me. I am going ahead and merging this PR. If there are any issues that are found, we can fix it in subsequent PRs. If any refactors are required, we can open issues for them.

@anutosh491 @Vipul-Cariappa I would have liked better coverage for the PR, but am fine with this being merged now, subject to into being squashed and merged, since it has 73 commits, 16 of which say do not merge in the commit message. Just wait for the ci to go green first (ignoring the coverage job which will fail due to lack of coverage)

@kr-2003 thanks for all your work getting this PR ready.

@mcbarton mcbarton dismissed their stale review November 3, 2025 11:42

Dismissing my request for changes, subject to the squash and merge mentioned in this message #717 (comment)

@mcbarton
Copy link
Collaborator

mcbarton commented Nov 3, 2025

@anutosh491 @Vipul-Cariappa before you merge this. Please ping me here or on Discord, since I will need to delete the llvm cache builds this PR makes, and delete now outdated caches on main just before it goes in.

Comment on lines +62 to +73
CLANG_VERSION="${{ matrix.clang-runtime }}"
if [[ "$CLANG_VERSION" == "20" && "${{ matrix.cling }}" == "Off" ]]; then
SUPPRESSION_FILE="../etc/clang${CLANG_VERSION}-valgrind.supp"
valgrind --show-error-list=yes --track-origins=yes --error-exitcode=1 \
--show-leak-kinds=definite,possible \
--suppressions="${SUPPRESSION_FILE}" \
unittests/CppInterOp/CppInterOpTests/unittests/bin/${{ env.BUILD_TYPE }}/CppInterOpTests
else
valgrind --show-error-list=yes --track-origins=yes --error-exitcode=1 \
--show-leak-kinds=definite,possible \
unittests/CppInterOp/CppInterOpTests/unittests/bin/${{ env.BUILD_TYPE }}/CppInterOpTests
fi
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kr-2003 I believe this Valgrind command change will need to be done in the cppyy repos ci to stop them failing once this is in. Can you open up a PR in the CPyCppyy, cppyy-backend and cppyy repos with this once this PR is in?

@Vipul-Cariappa Vipul-Cariappa merged commit 2df83a9 into compiler-research:main Nov 3, 2025
35 of 37 checks passed
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.

6 participants