Skip to content

Commit

Permalink
Merge pull request #19469 from nbhuiyan/intrinsic-hcr
Browse files Browse the repository at this point in the history
Skip HCR guards for inlining intrinsifiable methods
  • Loading branch information
hzongaro authored May 10, 2024
2 parents 851a4eb + 499f242 commit 9a1f5b3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions runtime/compiler/optimizer/InlinerTempForJ9.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2533,6 +2533,14 @@ TR_J9InlinerPolicy::willBeInlinedInCodeGen(TR::RecognizedMethod method)
bool
TR_J9InlinerPolicy::skipHCRGuardForCallee(TR_ResolvedMethod *callee)
{
// Skip HCR guards for callees annotated with @IntrinsicCandidate, and ignore any
// later redefinition as these methods are meant to have special handling for
// performance reasons. @IntrinsicCandidate annotation is only used in the JCL.
// We would only be inlining @IntrinsicCandidate methods because we do not
// have any special handling for them yet.
if (comp()->fej9()->isIntrinsicCandidate(callee))
return true;

// TODO: This is a very hacky way of avoiding HCR guards on sensitive String Compression methods which allows idiom
// recognition to work. It also avoids unnecessary block splitting in performance sensitive methods for String
// operations that are quite common. Can we do something better?
Expand Down

0 comments on commit 9a1f5b3

Please sign in to comment.