Skip to content

Commit

Permalink
Add API to determine relo type for method to be inlined
Browse files Browse the repository at this point in the history
The default in OMR is TR_NoRelocation as AOT is not yet suppoted.

Signed-off-by: Irwin D'Souza <dsouzai.gh@gmail.com>
  • Loading branch information
dsouzai committed Jan 4, 2021
1 parent 9784906 commit 56148c7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions compiler/compile/OMRCompilation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1301,6 +1301,7 @@ bool OMR::Compilation::incInlineDepth(TR::ResolvedMethodSymbol * method, TR::Nod
aotMethodInfo->cpIndex = cpIndex;
aotMethodInfo->receiver = receiverClass;
aotMethodInfo->callSymRef = callSymRef;
aotMethodInfo->reloKind = self()->getReloTypeForMethodToBeInlined(guard, callNode, receiverClass);

return self()->incInlineDepth(reinterpret_cast<TR_OpaqueMethodBlock *>(aotMethodInfo), method, bcInfo, callSymRef, directCall, argInfo);
}
Expand Down
2 changes: 2 additions & 0 deletions compiler/compile/OMRCompilation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,8 @@ class OMR_EXTENSIBLE Compilation
int32_t getInlinedCalls() { return _inlinedCalls; }
void incInlinedCalls() { _inlinedCalls++; }

TR_ExternalRelocationTargetKind getReloTypeForMethodToBeInlined(TR_VirtualGuardSelection *guard, TR::Node *callNode, TR_OpaqueClassBlock *receiverClass) { return TR_NoRelocation; }

class TR_InlinedCallSiteInfo
{
TR_InlinedCallSite _site;
Expand Down

0 comments on commit 56148c7

Please sign in to comment.