mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +02:00
6395208: Elide autoboxing for calls to HashMap.get(int) and HashMap.get(long)
Reviewed-by: kvn, rasbold
This commit is contained in:
parent
5fa349cc42
commit
10c473e425
16 changed files with 540 additions and 67 deletions
|
@ -608,6 +608,28 @@ Node* AddPNode::Ideal_base_and_offset(Node* ptr, PhaseTransform* phase,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
//------------------------------unpack_offsets----------------------------------
|
||||
// Collect the AddP offset values into the elements array, giving up
|
||||
// if there are more than length.
|
||||
int AddPNode::unpack_offsets(Node* elements[], int length) {
|
||||
int count = 0;
|
||||
Node* addr = this;
|
||||
Node* base = addr->in(AddPNode::Base);
|
||||
while (addr->is_AddP()) {
|
||||
if (addr->in(AddPNode::Base) != base) {
|
||||
// give up
|
||||
return -1;
|
||||
}
|
||||
elements[count++] = addr->in(AddPNode::Offset);
|
||||
if (count == length) {
|
||||
// give up
|
||||
return -1;
|
||||
}
|
||||
addr = addr->in(AddPNode::Address);
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
//------------------------------match_edge-------------------------------------
|
||||
// Do we Match on this edge index or not? Do not match base pointer edge
|
||||
uint AddPNode::match_edge(uint idx) const {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue