This is an archive of the discontinued LLVM Phabricator instance.

[JITLink] Add public APIs for getting stub creation functions.
ClosedPublic

Authored by sunho on Jul 18 2023, 12:50 AM.

Details

Summary

Creating stubs in JITLink require creating architecture-specific edges. In order to allow user to create stubs in cross-architecture manner, this patch exposes these stub creations functions by returning "stub creators" for given triple.

Diff Detail

Event Timeline

sunho created this revision.Jul 18 2023, 12:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 18 2023, 12:50 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
lhames added a subscriber: lhames.Jul 18 2023, 8:31 PM

I'd really rather have an API that returns a function pointer to the stub creator, rather than having a function that switches each time.

sunho updated this revision to Diff 545974.Aug 1 2023, 2:23 AM

Use function getter

sunho updated this revision to Diff 545975.Aug 1 2023, 2:25 AM
  • Update
sunho retitled this revision from JITLink Stubs API to [JITLink] Add public APIs for getting stub creation functions..Aug 1 2023, 2:32 AM
sunho edited the summary of this revision. (Show Details)
sunho added reviewers: lhames, v.g.vassilev.
sunho published this revision for review.Aug 1 2023, 2:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 1 2023, 2:34 AM
lhames accepted this revision.Aug 3 2023, 5:42 PM

Looks great -- thanks @sunho!

llvm/include/llvm/ExecutionEngine/JITLink/x86_64.h
550

This is a nice improvement.

This revision is now accepted and ready to land.Aug 3 2023, 5:42 PM