Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop special-casing unevaluated aconst in Power and ARM linkage #7101

Merged
merged 1 commit into from
Aug 29, 2023

Conversation

jdmpapin
Copy link
Contributor

@jdmpapin jdmpapin commented Aug 29, 2023

Instead, simply evaluate it like we do for other arguments.

These were the only two places where a TR_RamMethodSequence relocation could be generated for a method other than the outermost method, which is not expected. All remaining uses of TR_RamMethodSequence are for compiledMethodSymbol, which always represents the outermost method.

Fixes eclipse-openj9/openj9#17889

Instead, simply evaluate it like we do for other arguments.

These were the only two places where a TR_RamMethodSequence relocation
could be generated for a method other than the outermost method, which
is not expected. All remaining uses of TR_RamMethodSequence are for
compiledMethodSymbol, which always represents the outermost method.
@0xdaryl
Copy link
Contributor

0xdaryl commented Aug 29, 2023

@zl-wang : This seems reasonable to me. Are you ok with the Power changes?

@dsouzai
Copy link
Contributor

dsouzai commented Aug 29, 2023

Is it worth only preventing special-casing for relocatable compilations?

@jdmpapin
Copy link
Contributor Author

I didn't see any changes in the generated code outside of AOT, so I don't think we need to preserve the special case there

OTOH, in AOT I did see some changes to the (PPC64) sequence generated for aconst nodes in this position

  • aconst NULL is improved: li <reg>, 0 instead of a 5-instruction sequence
  • for other aconst nodes we load from a data snippet, resulting in a slightly worse sequence

I don't think we should be concerned about the use of the data snippet as it pertains to this PR. This change appears to affect only AOT, and it's highly unusual for non-null aconst nodes to occur as a call argument

We might still want to try to improve the sequence generated for aconst in AOT, but mainly for other reasons. By far the main use of non-null aconst is for profiled guards, which are not changing in this PR

@dsouzai dsouzai self-assigned this Aug 29, 2023
@dsouzai
Copy link
Contributor

dsouzai commented Aug 29, 2023

jenkins build aix,plinux,arm

@dsouzai
Copy link
Contributor

dsouzai commented Aug 29, 2023

Jenkins build aix,plinux,arm

Copy link
Contributor

@zl-wang zl-wang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cmdLineTester_jvmtitests emex001 crash vmState=0x00000000 in jvmtiHookMethodExit
4 participants