Mercurial > hg > truffle
comparison src/share/vm/opto/library_call.cpp @ 4778:35acf8f0a2e4
7128352: assert(obj_node == obj) failed
Summary: Compare uncasted object nodes.
Reviewed-by: never
author | kvn |
---|---|
date | Tue, 10 Jan 2012 18:05:38 -0800 |
parents | 22cee0ee8927 |
children | b9bc6cae88f2 a79cb7c55012 |
comparison
equal
deleted
inserted
replaced
4777:e9a5e0a812c8 | 4778:35acf8f0a2e4 |
---|---|
817 Node* array_length, | 817 Node* array_length, |
818 RegionNode* region) { | 818 RegionNode* region) { |
819 if (stopped()) | 819 if (stopped()) |
820 return NULL; // already stopped | 820 return NULL; // already stopped |
821 bool zero_offset = _gvn.type(offset) == TypeInt::ZERO; | 821 bool zero_offset = _gvn.type(offset) == TypeInt::ZERO; |
822 if (zero_offset && _gvn.eqv_uncast(subseq_length, array_length)) | 822 if (zero_offset && subseq_length->eqv_uncast(array_length)) |
823 return NULL; // common case of whole-array copy | 823 return NULL; // common case of whole-array copy |
824 Node* last = subseq_length; | 824 Node* last = subseq_length; |
825 if (!zero_offset) // last += offset | 825 if (!zero_offset) // last += offset |
826 last = _gvn.transform( new (C, 3) AddINode(last, offset)); | 826 last = _gvn.transform( new (C, 3) AddINode(last, offset)); |
827 Node* cmp_lt = _gvn.transform( new (C, 3) CmpUNode(array_length, last) ); | 827 Node* cmp_lt = _gvn.transform( new (C, 3) CmpUNode(array_length, last) ); |
4665 // out-edges of the dest, we need to avoid making derived pointers | 4665 // out-edges of the dest, we need to avoid making derived pointers |
4666 // from it until we have checked its uses.) | 4666 // from it until we have checked its uses.) |
4667 if (ReduceBulkZeroing | 4667 if (ReduceBulkZeroing |
4668 && !ZeroTLAB // pointless if already zeroed | 4668 && !ZeroTLAB // pointless if already zeroed |
4669 && basic_elem_type != T_CONFLICT // avoid corner case | 4669 && basic_elem_type != T_CONFLICT // avoid corner case |
4670 && !_gvn.eqv_uncast(src, dest) | 4670 && !src->eqv_uncast(dest) |
4671 && ((alloc = tightly_coupled_allocation(dest, slow_region)) | 4671 && ((alloc = tightly_coupled_allocation(dest, slow_region)) |
4672 != NULL) | 4672 != NULL) |
4673 && _gvn.find_int_con(alloc->in(AllocateNode::ALength), 1) > 0 | 4673 && _gvn.find_int_con(alloc->in(AllocateNode::ALength), 1) > 0 |
4674 && alloc->maybe_set_complete(&_gvn)) { | 4674 && alloc->maybe_set_complete(&_gvn)) { |
4675 // "You break it, you buy it." | 4675 // "You break it, you buy it." |
4743 } | 4743 } |
4744 | 4744 |
4745 // copy_length is 0. | 4745 // copy_length is 0. |
4746 if (!stopped() && dest_uninitialized) { | 4746 if (!stopped() && dest_uninitialized) { |
4747 Node* dest_length = alloc->in(AllocateNode::ALength); | 4747 Node* dest_length = alloc->in(AllocateNode::ALength); |
4748 if (_gvn.eqv_uncast(copy_length, dest_length) | 4748 if (copy_length->eqv_uncast(dest_length) |
4749 || _gvn.find_int_con(dest_length, 1) <= 0) { | 4749 || _gvn.find_int_con(dest_length, 1) <= 0) { |
4750 // There is no zeroing to do. No need for a secondary raw memory barrier. | 4750 // There is no zeroing to do. No need for a secondary raw memory barrier. |
4751 } else { | 4751 } else { |
4752 // Clear the whole thing since there are no source elements to copy. | 4752 // Clear the whole thing since there are no source elements to copy. |
4753 generate_clear_array(adr_type, dest, basic_elem_type, | 4753 generate_clear_array(adr_type, dest, basic_elem_type, |
4789 // It is often zero, and we can win big if we prove this. | 4789 // It is often zero, and we can win big if we prove this. |
4790 // There are two wins: Avoid generating the ClearArray | 4790 // There are two wins: Avoid generating the ClearArray |
4791 // with its attendant messy index arithmetic, and upgrade | 4791 // with its attendant messy index arithmetic, and upgrade |
4792 // the copy to a more hardware-friendly word size of 64 bits. | 4792 // the copy to a more hardware-friendly word size of 64 bits. |
4793 Node* tail_ctl = NULL; | 4793 Node* tail_ctl = NULL; |
4794 if (!stopped() && !_gvn.eqv_uncast(dest_tail, dest_length)) { | 4794 if (!stopped() && !dest_tail->eqv_uncast(dest_length)) { |
4795 Node* cmp_lt = _gvn.transform( new(C,3) CmpINode(dest_tail, dest_length) ); | 4795 Node* cmp_lt = _gvn.transform( new(C,3) CmpINode(dest_tail, dest_length) ); |
4796 Node* bol_lt = _gvn.transform( new(C,2) BoolNode(cmp_lt, BoolTest::lt) ); | 4796 Node* bol_lt = _gvn.transform( new(C,2) BoolNode(cmp_lt, BoolTest::lt) ); |
4797 tail_ctl = generate_slow_guard(bol_lt, NULL); | 4797 tail_ctl = generate_slow_guard(bol_lt, NULL); |
4798 assert(tail_ctl != NULL || !stopped(), "must be an outcome"); | 4798 assert(tail_ctl != NULL || !stopped(), "must be an outcome"); |
4799 } | 4799 } |