-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Revisit advanced LLJIT examples and tests #76236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
weliveindetail
merged 4 commits into
llvm:main
from
weliveindetail:revisit-advanced-lljit-examples
Jan 3, 2024
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
5f134a7
[Orc][examples] Drop manual TargetMachineBuilder setup
weliveindetail 1477b90
[Orc][examples] Drop addDebugSupport() in favor of Orc's enableDebugg…
weliveindetail 3462b5d
[Orc][examples] Check that debug support plugins append jit_code_entry
weliveindetail 3451693
[Orc][examples] Update and reduce sample input
weliveindetail File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
define i32 @sub1(i32 %0) { | ||
%2 = add i32 %0, -1 | ||
ret i32 %2 | ||
} | ||
|
||
define i32 @main(i32 %0) { | ||
%2 = call i32 @sub1(i32 %0) | ||
ret i32 %2 | ||
} | ||
|
||
!llvm.module.flags = !{!0} | ||
!llvm.dbg.cu = !{!1} | ||
|
||
!0 = !{i32 2, !"Debug Info Version", i32 3} | ||
!1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang 18.0.0git", emissionKind: FullDebug) | ||
!2 = !DIFile(filename: "argc_sub1.c", directory: ".") |
This file was deleted.
Oops, something went wrong.
16 changes: 11 additions & 5 deletions
16
llvm/test/Examples/OrcV2Examples/lljit-with-remote-debugging.test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,21 @@ | ||
# This test makes sure that the example builds and executes as expected. | ||
# Check that the debug support plugin appends a jit_code_entry to the | ||
# jit_descriptor of the child process. | ||
|
||
# Instructions for debugging can be found in LLJITWithRemoteDebugging.cpp | ||
|
||
# REQUIRES: default_triple | ||
# UNSUPPORTED: target=powerpc64{{.*}} | ||
|
||
# RUN: LLJITWithRemoteDebugging %p/Inputs/argc_sub1_elf.ll | FileCheck --check-prefix=CHECK0 %s | ||
# CHECK0: Parsing input IR code from: {{.*}}/Inputs/argc_sub1_elf.ll | ||
# RUN: LLJITWithRemoteDebugging %p/Inputs/argc_sub1.ll 2>&1 | FileCheck --check-prefix=CHECK0 %s | ||
# CHECK0: __jit_debug_descriptor.last_entry = [[BEFORE0:0x[0-9a-f]+]] | ||
# CHECK0-NOT: __jit_debug_descriptor.last_entry = [[BEFORE0]] | ||
# CHECK0: Parsing input IR code from: {{.*}}/Inputs/argc_sub1.ll | ||
# CHECK0: Running: main() | ||
# CHECK0: Exit code: 0 | ||
|
||
# RUN: LLJITWithRemoteDebugging %p/Inputs/argc_sub1_elf.ll --args 2nd 3rd 4th | FileCheck --check-prefix=CHECK3 %s | ||
# CHECK3: Parsing input IR code from: {{.*}}/Inputs/argc_sub1_elf.ll | ||
# RUN: LLJITWithRemoteDebugging %p/Inputs/argc_sub1.ll --args 2nd 3rd 4th 2>&1 | FileCheck --check-prefix=CHECK3 %s | ||
# CHECK3: __jit_debug_descriptor.last_entry = [[BEFORE3:0x[0-9a-f]+]] | ||
# CHECK3-NOT: __jit_debug_descriptor.last_entry = [[BEFORE3]] | ||
# CHECK3: Parsing input IR code from: {{.*}}/Inputs/argc_sub1.ll | ||
# CHECK3: Running: main("2nd", "3rd", "4th") | ||
# CHECK3: Exit code: 3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.