Skip to content
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

[lli] Revisit Orc debug output tests #76822

Merged
merged 2 commits into from
Jan 22, 2024

Conversation

weliveindetail
Copy link
Contributor

Integrate in-memory debug-info dumps into the --orc-lazy-debug command-line option instead of exposing built-in functions to be called from JITed code. This reduces overall amount of code (removing ExecutionUtils.cpp) and seems cleaner anyway.

All existing items of OrcDumpKind work on IR level and run in the IR-transform step of the JIT. The newly added DumpDebugDescriptor and DumpDebugObjects must run after debug-registration and thus are deferred to the Object-transform step of the JIT. This separation is the major side-effect of the patch.

@weliveindetail weliveindetail changed the title [Orc] Revisit lli debug output tests [lli] Revisit Orc debug output tests Jan 5, 2024
Copy link
Contributor Author

@weliveindetail weliveindetail left a comment

Choose a reason for hiding this comment

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

Following up from #76244, this patch re-enables one of the OrcLazy debug tests on macOS. Previously these tests were forcing in-memory objects to ELF format. Now they use the native format. As noted inline, the debug-objects.ll test doesn't work for Mach-O yet. @aeubanks Once this lands, please let me know if this causes issues on your bots.

; CHECK: -: file format elf64-x86-64
; TODO: Synthesized Mach-O objects error out with:
; truncated or malformed object (offset field of section 8 in
; LC_SEGMENT_64 command 0 extends past the end of the file)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@lhames I guess this could be fixed in the Mach-O debugger support plugin? Then we can re-enable this test as well.

@weliveindetail
Copy link
Contributor Author

Failed tests were all in MLIR and unrelated. The review was up for 2 weeks and didn't get feedback. This cleanup seems worth having in the upcoming release. I am happy to discuss potential questions post-commit.

@weliveindetail weliveindetail merged commit 263efb0 into llvm:main Jan 22, 2024
3 of 4 checks passed
@weliveindetail weliveindetail deleted the revisit-orclazy-debug-tests branch January 22, 2024 20:25
joker-eph added a commit that referenced this pull request Jan 22, 2024
Reverts #76822

This fails to build with gcc 7.5:
```
llvm/tools/lli/lli.cpp:1087:16: error: could not convert ‘Obj’ from ‘std::unique_ptr<llvm::MemoryBuffer>’ to ‘llvm::Expected<std::unique_ptr<llvm::MemoryBuffer> >’
         return Obj;
                ^~~
```
@joker-eph
Copy link
Collaborator

Hey @weliveindetail : this broke the gcc 7.5 bot, I reverted in #79055 ; feel free to reland with a fix!

@weliveindetail
Copy link
Contributor Author

Thanks for reverting. I will have look.

@weliveindetail weliveindetail restored the revisit-orclazy-debug-tests branch January 22, 2024 20:57
@weliveindetail
Copy link
Contributor Author

GCC-7 was right, that there was a missing std::move() for the std::unique_ptr. I guess it wasn't showing up for me due to NRVO. Relanded with cd6ed95

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.

None yet

2 participants