Skip to content

Commit

Permalink
Merge pull request #4216 from hzongaro/inliner-osr-calling-method-unc…
Browse files Browse the repository at this point in the history
…onditional

Enable change to determine calling method for OSR code unconditionally
  • Loading branch information
andrewcraik authored Aug 22, 2019
2 parents ad64863 + 11cdf89 commit e4f76da
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
9 changes: 0 additions & 9 deletions compiler/optimizer/Inliner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2012,17 +2012,8 @@ TR_InlinerBase::addGuardForVirtual(
TR::ResolvedMethodSymbol *callingMethod = callNode->getByteCodeInfo().getCallerIndex() == -1 ?
comp()->getMethodSymbol() : comp()->getInlinedResolvedMethodSymbol(callNode->getByteCodeInfo().getCallerIndex());

// TODO: Need to coordinate change between OMR's inliner and downstream
// implementations of inliner. They must access the calling method
// for OSR in the same way, guarded by INLINER_OSR_CALLING_METHOD,
// until INLINER_OSR_CALLING_METHOD is ultimately defined in OMR.
#if defined(INLINER_OSR_CALLING_METHOD)
if ((comp()->getHCRMode() != TR::osr || guard->_kind != TR_HCRGuard)
&& callingMethod->supportsInduceOSR(callNode->getByteCodeInfo(), block1, comp(), false))
#else /* !defined(INLINER_OSR_CALLING_METHOD) */
if ((comp()->getHCRMode() != TR::osr || guard->_kind != TR_HCRGuard)
&& callNode->getSymbolReference()->getOwningMethodSymbol(comp())->supportsInduceOSR(callNode->getByteCodeInfo(), block1, comp(), false))
#endif /* defined(INLINER_OSR_CALLING_METHOD) */
{
bool shouldUseOSR = heuristicForUsingOSR(callNode, calleeSymbol, callerSymbol, createdHCRAndVirtualGuard);

Expand Down
7 changes: 0 additions & 7 deletions compiler/optimizer/Inliner.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,6 @@
#ifndef INLINER_INCL
#define INLINER_INCL

// TODO: This macro enables a change to the way the calling method is found
// for OSR-related code in the Inliner. Once downstream components
// have had their changes enabled unconditionalloy, corresponding
// changes in OMR that are guarded by this macro can be made
// unconditional, and this definition can be removed.
#define INLINER_OSR_CALLING_METHOD

#include "optimizer/CallInfo.hpp"

#include <stddef.h>
Expand Down

0 comments on commit e4f76da

Please sign in to comment.