Define trivialInliningOnly() in TR_InlinerBase and OMR_InlinerPolicy - #7702
Conversation
Some targets are meant to be handled by tryToInlineTrivialMethod() and cannot be inlined by generating IL in the usual way. So far the implementation of tryToInlineTrivialMethod() has been required to return true for such targets even in cases where the call is not transformed. This new method provides a way to tell the inliner that a given target should have been handled by tryToInlineTrivialMethod() and that IL generation should not be attempted. If the inliner is informed in this way, then it will be possible for tryToInlineTrivialMethod() to return false when it fails.
|
@vijaysun-omr, could you please review? |
|
Just so I understand, is this change being made because there was a specific issue with |
|
Jenkins build all |
Yes, see eclipse-openj9/openj9#21501. OpenJ9's override of |
|
Okay so you wanted to change the return value to false, and in that case, it led to an issue (that I can see). Returning false when we did not transform in all cases is cleaner, and so I was okay with the change, but I was asking about whether something was going wrong by returning true for such cases where we did not transform. |
|
Oh, no, I haven't seen any actual problem caused by returning true without transforming. We do unnecessarily leave the target in the inlining table because it looks like inlining succeeded, but that should be harmless. The intention here is just to do a bit of cleanup. |
|
Looks safe to me. Thanks for clarifying. |
Some targets are meant to be handled by
tryToInlineTrivialMethod()and cannot be inlined by generating IL in the usual way. So far the implementation oftryToInlineTrivialMethod()has been required to return true for such targets even in cases where the call is not transformed.This new method provides a way to tell the inliner that a given target should have been handled by
tryToInlineTrivialMethod()and that IL generation should not be attempted. If the inliner is informed in this way, then it will be possible fortryToInlineTrivialMethod()to return false when it fails.