Skip to content

Disallow insertion of a root op in a block #425

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

Open
wants to merge 13 commits into
base: code-reflection
Choose a base branch
from

Conversation

mabbay
Copy link
Member

@mabbay mabbay commented May 12, 2025

A root operation shouldn't be inserted in a block. This changes enforce this rule.


Progress

  • Change must not contain extraneous whitespace

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/babylon.git pull/425/head:pull/425
$ git checkout pull/425

Update a local copy of the PR:
$ git checkout pull/425
$ git pull https://git.openjdk.org/babylon.git pull/425/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 425

View PR using the GUI difftool:
$ git pr show -t 425

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/babylon/pull/425.diff

Using Webrev

Link to Webrev Comment

@mabbay mabbay requested review from PaulSandoz and mcimadamore May 12, 2025 21:42
@bridgekeeper
Copy link

bridgekeeper bot commented May 12, 2025

👋 Welcome back mabbay! A progress list of the required criteria for merging this PR into code-reflection will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented May 12, 2025

@mabbay This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

Disallow insertion of a root op in a block

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 3 new commits pushed to the code-reflection branch:

  • 4e21891: Validate arguments types when interpreting an operation
  • 3267179: Add SSA id dependency viewer tool + DotViewer infra
  • 20b9897: Transformation API changes

Please see this link for an up-to-date comparison between the source branch of this pull request and the code-reflection branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the code-reflection branch, type /integrate in a new comment.

@openjdk openjdk bot added ready Pull request is ready to be integrated rfr Pull request is ready for review labels May 12, 2025
@mlbridge
Copy link

mlbridge bot commented May 12, 2025

Webrevs

Copy link
Member

@PaulSandoz PaulSandoz left a comment

Choose a reason for hiding this comment

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

That was a reasonable attempt, but it will not work because a func op can be a descendant of a module op (there might be one or two tests that fail). Nor will it generalize for operations of other dialects.

We need a general solution that can be applied to any operation. By default we would apply the solution to func ops extracted from classfiles. I think we need to assign a special value to Op.result that indicates it is bound as a root but Op.parentBlock() still returns null.

@mabbay mabbay self-assigned this Jun 4, 2025
@bridgekeeper
Copy link

bridgekeeper bot commented Jun 11, 2025

@mabbay This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply issue a /touch or /keepalive command to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 9, 2025

@mabbay This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the /open pull request command.

@bridgekeeper bridgekeeper bot closed this Jul 9, 2025
@mabbay
Copy link
Member Author

mabbay commented Aug 1, 2025

/open

@openjdk openjdk bot reopened this Aug 1, 2025
@openjdk
Copy link

openjdk bot commented Aug 1, 2025

@mabbay This pull request is now open

@openjdk
Copy link

openjdk bot commented Aug 1, 2025

@mabbay this pull request can not be integrated into code-reflection due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:

git checkout root-op-insertion
git fetch https://git.openjdk.org/babylon.git code-reflection
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge code-reflection"
git push

@openjdk openjdk bot added merge-conflict Pull request has merge conflict with target branch and removed ready Pull request is ready to be integrated labels Aug 1, 2025
# Conflicts:
#	src/jdk.incubator.code/share/classes/jdk/incubator/code/Op.java
#	src/jdk.incubator.code/share/classes/jdk/incubator/code/internal/OpBuilder.java
@openjdk openjdk bot added ready Pull request is ready to be integrated and removed merge-conflict Pull request has merge conflict with target branch labels Aug 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready Pull request is ready to be integrated rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

2 participants