Skip to content

Use new factory functions on x86 JIT for code readability#23940

Open
0xdaryl wants to merge 4 commits into
eclipse-openj9:masterfrom
0xdaryl:xgenerate
Open

Use new factory functions on x86 JIT for code readability#23940
0xdaryl wants to merge 4 commits into
eclipse-openj9:masterfrom
0xdaryl:xgenerate

Conversation

@0xdaryl
Copy link
Copy Markdown
Contributor

@0xdaryl 0xdaryl commented May 20, 2026

  • Use Inst_XXX family of functions instead of generateXXXInstruction
  • Use RegDeps in place of generateRegisterDependencyConditions
  • Use MRef_ family of functions in place of generateX86MemoryReference
  • Use OP:: typedef instead of TR::InstOpCode::

0xdaryl added 4 commits May 20, 2026 12:16
Signed-off-by: Daryl Maier <maier@ca.ibm.com>
Signed-off-by: Daryl Maier <maier@ca.ibm.com>
Signed-off-by: Daryl Maier <maier@ca.ibm.com>
Signed-off-by: Daryl Maier <maier@ca.ibm.com>
@0xdaryl
Copy link
Copy Markdown
Contributor Author

0xdaryl commented May 20, 2026

Jenkins test sanity xlinux,win,osx jdk21

@0xdaryl
Copy link
Copy Markdown
Contributor Author

0xdaryl commented May 21, 2026

Jenkins test sanity.functional xlinux,win jdk21

@0xdaryl
Copy link
Copy Markdown
Contributor Author

0xdaryl commented May 21, 2026

Jenkins test sanity.functional xlinux jdk21

@0xdaryl
Copy link
Copy Markdown
Contributor Author

0xdaryl commented May 22, 2026

Jenkins test sanity.functional xlinux,osx,win jdk21

@0xdaryl
Copy link
Copy Markdown
Contributor Author

0xdaryl commented May 22, 2026

Jenkins test sanity.functional win jdk21

@0xdaryl
Copy link
Copy Markdown
Contributor Author

0xdaryl commented May 26, 2026

Windows failures are variants of #22758.

@hzongaro : would you mind reviewing/merging please?

@hzongaro hzongaro self-assigned this May 26, 2026
@hzongaro
Copy link
Copy Markdown
Member

hzongaro commented May 27, 2026

It looks like there are already merge conflicts. When you have a chance to resolve them, may I also ask you to ensure the commit comments have no more than 72 characters per line, per the Commit Guidelines? Still reviewing. . . .

Ignore that comment about the length of the commit comments. I was looking at the wrong commits.

Copy link
Copy Markdown
Member

@hzongaro hzongaro left a comment

Choose a reason for hiding this comment

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

I think this looks good. I just had a couple of questions about specific instances that weren't changed.

@@ -3442,7 +3372,7 @@ TR::Register *J9::X86::TreeEvaluator::ArrayStoreCHKEvaluator(TR::Node *node, TR:
TR::Instruction *pachable
= generateVirtualGuardNOPInstruction(node, virtualGuard->addNOPSite(), NULL, oolASCLabel, cg);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should generateVirtualGuardNOPInstruction become Inst_VirtualGuardNOPInstruction here?

@@ -1912,15 +1893,15 @@ bool J9::X86::PrivateLinkage::buildVirtualGuard(TR::X86CallSite &site, TR::Label
= generateVirtualGuardNOPInstruction(callNode, virtualGuard->addNOPSite(), NULL, revirtualizeLabel, cg());
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should generateVirtualGuardNOPInstruction become Inst_VirtualGuardNOPInstruction here?

TR_VirtualGuard *HCRGuard
= TR_VirtualGuard::createGuardedDevirtualizationGuard(TR_HCRGuard, comp(), callNode);
TR::Instruction *HCRpatchable
= generateVirtualGuardNOPInstruction(callNode, HCRGuard->addNOPSite(), NULL, revirtualizeLabel, cg());
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should generateVirtualGuardNOPInstruction become Inst_VirtualGuardNOPInstruction here?

return cursor;
}

TR::Instruction *J9::X86::AMD64::PrivateLinkage::generateFlushInstruction(TR::Instruction *prev,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should generateFlushInstruction and the references to it become Inst_FlushInstruction?

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.

2 participants