Skip to content

Create OMR::Node::storeToAddressField() helper - #7531

Merged
hzongaro merged 1 commit into
eclipse-omr:masterfrom
gita-omr:store_to_address_field
Nov 12, 2024
Merged

Create OMR::Node::storeToAddressField() helper#7531
hzongaro merged 1 commit into
eclipse-omr:masterfrom
gita-omr:store_to_address_field

Conversation

@gita-omr

@gita-omr gita-omr commented Nov 6, 2024

Copy link
Copy Markdown
Contributor
  • create a helper for a common but not trivial code sequence

@gita-omr

gita-omr commented Nov 6, 2024

Copy link
Copy Markdown
Contributor Author

Removed unnecessary change.

@gita-omr
gita-omr force-pushed the store_to_address_field branch from 9e206ce to 01ebad9 Compare November 6, 2024 21:46
@gita-omr

gita-omr commented Nov 6, 2024

Copy link
Copy Markdown
Contributor Author

Removed unnecessary change.

@gita-omr

gita-omr commented Nov 7, 2024

Copy link
Copy Markdown
Contributor Author

@hzongaro kindly agreed to review.

@hzongaro
hzongaro requested review from hzongaro and removed request for vijaysun-omr November 7, 2024 20:29

@hzongaro hzongaro left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I had a couple of minor comments. My only real concern about this is proposal is whether adding this as a method in OMR::Node is appropriate. It feels like a handy utility method that should be added elsewhere.

I'd like to ask @0xdaryl for his thoughts about it.

Comment thread compiler/il/OMRNode.hpp
Comment thread compiler/il/OMRNode.cpp
@gita-omr

gita-omr commented Nov 8, 2024

Copy link
Copy Markdown
Contributor Author

I had a couple of minor comments. My only real concern about this is proposal is whether adding this as a method in OMR::Node is appropriate. It feels like a handy utility method that should be added elsewhere.

I'd like to ask @0xdaryl for his thoughts about it.

We considered adding it to J9::TransformUtil but since it just returns a node it seemed more appropriate for it to be one the static factory functions in TR::Node.

@0xdaryl

0xdaryl commented Nov 11, 2024

Copy link
Copy Markdown
Contributor

While there may not be a lot of application of this API within OMR itself, downstream projects might benefit from it. I think it is OK to have this function in the Node class because it is using the right APIs for determining write barrier usage and it is properly documented.

My main concern is the use of TR::comp() in this code. I realize that pretty much every other static TR::Node function uses TR::comp(), but they shouldn't. Instead, they should accept the compilation object as a parameter (see #4106). While you are probably justified in using it for symmetry until the other functions are modified, you are leaving a bit of compile-time performance on the table in exchange and I would re-consider your use.

@gita-omr

Copy link
Copy Markdown
Contributor Author

Added TR::Compilation *comp parameter.

@hzongaro hzongaro left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good. May I ask you to squash the two commits, and add a sentence to the commit message describing the motivation for the addition? Thanks!

- create a helper for a common but not trivial code sequence
@gita-omr
gita-omr force-pushed the store_to_address_field branch from c295b01 to 4ddc881 Compare November 12, 2024 15:41
@gita-omr

Copy link
Copy Markdown
Contributor Author

Squashed and added a description.

@hzongaro

Copy link
Copy Markdown
Contributor

Jenkins build all

@hzongaro

Copy link
Copy Markdown
Contributor

A number of .exe files appear to be missing from the Windows build, but it's not clear why. It doesn't look like they could be related to this change. Rerunning. . . .

Jenkins build win

@hzongaro
hzongaro merged commit 6eaf992 into eclipse-omr:master Nov 12, 2024
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.

4 participants