This is an archive of the discontinued LLVM Phabricator instance.

[llvm-jitlink] Add target override option to cli
AcceptedPublic

Authored by Eymay on Aug 16 2023, 6:05 AM.

Details

Reviewers
sgraenitz
lhames
Summary

Triple override option is added to finely control target-specific operations like disassembling in tests.

Diff Detail

Unit TestsFailed

Event Timeline

Eymay created this revision.Aug 16 2023, 6:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 16 2023, 6:05 AM
Eymay requested review of this revision.Aug 16 2023, 6:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 16 2023, 6:05 AM
Eymay updated this revision to Diff 550718.Aug 16 2023, 6:12 AM

avoided redefinition of TT

Eymay retitled this revision from [JITLink][AArch32] Add target override option to cli to [llvm-jitlink] Add target override option to cli.Aug 16 2023, 6:17 AM
Eymay updated this revision to Diff 550722.Aug 16 2023, 6:20 AM

correct title tag

Eymay added a comment.Aug 16 2023, 6:30 AM

Triple override is necessary for targets that do not have a clear architecture signature in their object files. Here you can see the issue on Thumb disassembly.

@Eymay and I discussed this on discord and he's going to look at extending RuntimeDyldChecker to support mixed arm / thumb code -- if that works this will not be necessary, but we can leave it open as a fallback option.

sgraenitz accepted this revision.Aug 17 2023, 7:34 AM

Thanks! LGTM. Yes let's keep this on hold for now and attempt the RuntimeDyldChecker change first.

llvm/tools/llvm-jitlink/llvm-jitlink.cpp
2005

The comment is easy to misunderstand. Can we swap the phrase like this?

Infer the target and override TT if triple is given by user
2007

Please run this through a git clang-format HEAD^? :)

This revision is now accepted and ready to land.Aug 17 2023, 7:34 AM
Eymay marked 2 inline comments as done.Aug 18 2023, 7:48 AM

Addressed feedback

Eymay updated this revision to Diff 551511.Aug 18 2023, 7:49 AM

reword comment and reformat code