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
8264897: [lworld] C2: Use BarrierSetC2::obj_allocate to buffer inline type in PhaseMacroExpand::expand_mh_intrinsic_return #385
Conversation
|
@kelthuzadx This change now passes all automated pre-integration checks. After integration, the commit message for the final commit will be:
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 7 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@TobiHartmann) but any other Committer may sponsor as well.
|
Webrevs
|
Nice cleanup! I've added some minor comments, otherwise looks good to me.
break; | ||
case Node::Class_FlatArrayCheck: | ||
expand_flatarraycheck_node(n->as_FlatArrayCheck()); | ||
assert(C->macro_count() == (old_macro_count - 1), "expansion must have deleted one node from macro list"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you delete these asserts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems the checking happens nevertheless right after switch:
valhalla/src/hotspot/share/opto/macro.cpp
Lines 3220 to 3227 in 5e88e8a
break; | |
case Node::Class_FlatArrayCheck: | |
expand_flatarraycheck_node(n->as_FlatArrayCheck()); | |
break; | |
default: | |
assert(false, "unknown node type in macro list"); | |
} | |
assert(C->macro_count() == (old_macro_count - 1), "expansion must have deleted one node from macro list"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, good catch!
src/hotspot/share/opto/macro.cpp
Outdated
old_top = new LoadPNode(ctl, mem, top_adr, TypeRawPtr::BOTTOM, TypeRawPtr::BOTTOM, MemNode::unordered); | ||
transform_later(old_top); | ||
// Try to allocate a new buffered inline instance either from TLAB or eden space | ||
Node* needgc_ctrl; // needgc means slowcase, i.e. allocation failed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be initialized to NULL
.
src/hotspot/share/opto/macro.cpp
Outdated
|
||
Node* r = new RegionNode(4); | ||
Node* r = new RegionNode(alloc_in_place ? 4: 3); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whitespace missing, should be ? 4 : 3
src/hotspot/share/opto/macro.cpp
Outdated
transform_later(slowpath_false_mem); | ||
Node* fast_ctl; | ||
Node* fast_res; | ||
MergeMemNode* fast_mem; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be initialized to NULL
.
src/hotspot/share/opto/macro.cpp
Outdated
// We don't know how many values are returned. This assumes the | ||
// worst case, that all available registers are used. | ||
for (uint i = TypeFunc::Parms+1; i < domain->cnt(); i++) { | ||
if (domain->field_at(i) == Type::HALF) { | ||
slow_call->init_req(i, top()); | ||
handler_call->init_req(i+1, top()); | ||
if (alloc_in_place) handler_call->init_req(i+1, top()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use parentheses for the if body. Same below.
Thank you Tobias! Sorry for so many nits, I will check them more carefully in later PRs. Best Regards, |
/integrate |
@kelthuzadx |
/sponsor |
@TobiHartmann @kelthuzadx Since your change was applied there have been 7 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit feedec1. |
Try to reuse existing BarrierSetC2::obj_allocate functionality for PhaseMacroExpand::expand_mh_intrinsic_return.
Testing: x86_64 + linux+ slowdebug/release
[x] test/hotspot/jtreg/runtime/valhalla
[x] test/hotspot/jtreg/compiler/valhalla
Thanks,
Yang
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/valhalla pull/385/head:pull/385
$ git checkout pull/385
Update a local copy of the PR:
$ git checkout pull/385
$ git pull https://git.openjdk.java.net/valhalla pull/385/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 385
View PR using the GUI difftool:
$ git pr show -t 385
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/valhalla/pull/385.diff