Skip to content

Commit 9a1f5b3

Browse files
authored
Merge pull request #19469 from nbhuiyan/intrinsic-hcr
Skip HCR guards for inlining intrinsifiable methods
2 parents 851a4eb + 499f242 commit 9a1f5b3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

runtime/compiler/optimizer/InlinerTempForJ9.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2533,6 +2533,14 @@ TR_J9InlinerPolicy::willBeInlinedInCodeGen(TR::RecognizedMethod method)
25332533
bool
25342534
TR_J9InlinerPolicy::skipHCRGuardForCallee(TR_ResolvedMethod *callee)
25352535
{
2536+
// Skip HCR guards for callees annotated with @IntrinsicCandidate, and ignore any
2537+
// later redefinition as these methods are meant to have special handling for
2538+
// performance reasons. @IntrinsicCandidate annotation is only used in the JCL.
2539+
// We would only be inlining @IntrinsicCandidate methods because we do not
2540+
// have any special handling for them yet.
2541+
if (comp()->fej9()->isIntrinsicCandidate(callee))
2542+
return true;
2543+
25362544
// TODO: This is a very hacky way of avoiding HCR guards on sensitive String Compression methods which allows idiom
25372545
// recognition to work. It also avoids unnecessary block splitting in performance sensitive methods for String
25382546
// operations that are quite common. Can we do something better?

0 commit comments

Comments
 (0)