equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
323 // TODO: Remove when support completed for mask context with LONG. |
323 // TODO: Remove when support completed for mask context with LONG. |
324 // Support needs to be augmented for logical qword operations, currently we map to dword |
324 // Support needs to be augmented for logical qword operations, currently we map to dword |
325 // buckets for vectors on logicals as these were legacy. |
325 // buckets for vectors on logicals as these were legacy. |
326 small_basic_type = true; |
326 small_basic_type = true; |
327 break; |
327 break; |
|
328 |
|
329 default: |
|
330 break; |
328 } |
331 } |
329 } |
332 } |
330 } |
333 } |
331 |
334 |
332 if (is_java_primitive(bt) == false) continue; |
335 if (is_java_primitive(bt) == false) continue; |
750 MemNode* s = memops.at(j)->as_Mem(); |
753 MemNode* s = memops.at(j)->as_Mem(); |
751 if (s->is_Store()) { |
754 if (s->is_Store()) { |
752 int vw = vector_width_in_bytes(s); |
755 int vw = vector_width_in_bytes(s); |
753 assert(vw > 1, "sanity"); |
756 assert(vw > 1, "sanity"); |
754 SWPointer p(s, this, NULL, false); |
757 SWPointer p(s, this, NULL, false); |
755 if (cmp_ct.at(j) > max_ct || |
758 if ( cmp_ct.at(j) > max_ct || |
756 cmp_ct.at(j) == max_ct && |
759 (cmp_ct.at(j) == max_ct && |
757 (vw > max_vw || |
760 ( vw > max_vw || |
758 vw == max_vw && |
761 (vw == max_vw && |
759 (data_size(s) < min_size || |
762 ( data_size(s) < min_size || |
760 data_size(s) == min_size && |
763 (data_size(s) == min_size && |
761 (p.offset_in_bytes() < min_iv_offset)))) { |
764 p.offset_in_bytes() < min_iv_offset)))))) { |
762 max_ct = cmp_ct.at(j); |
765 max_ct = cmp_ct.at(j); |
763 max_vw = vw; |
766 max_vw = vw; |
764 max_idx = j; |
767 max_idx = j; |
765 min_size = data_size(s); |
768 min_size = data_size(s); |
766 min_iv_offset = p.offset_in_bytes(); |
769 min_iv_offset = p.offset_in_bytes(); |
773 MemNode* s = memops.at(j)->as_Mem(); |
776 MemNode* s = memops.at(j)->as_Mem(); |
774 if (s->is_Load()) { |
777 if (s->is_Load()) { |
775 int vw = vector_width_in_bytes(s); |
778 int vw = vector_width_in_bytes(s); |
776 assert(vw > 1, "sanity"); |
779 assert(vw > 1, "sanity"); |
777 SWPointer p(s, this, NULL, false); |
780 SWPointer p(s, this, NULL, false); |
778 if (cmp_ct.at(j) > max_ct || |
781 if ( cmp_ct.at(j) > max_ct || |
779 cmp_ct.at(j) == max_ct && |
782 (cmp_ct.at(j) == max_ct && |
780 (vw > max_vw || |
783 ( vw > max_vw || |
781 vw == max_vw && |
784 (vw == max_vw && |
782 (data_size(s) < min_size || |
785 ( data_size(s) < min_size || |
783 data_size(s) == min_size && |
786 (data_size(s) == min_size && |
784 (p.offset_in_bytes() < min_iv_offset)))) { |
787 p.offset_in_bytes() < min_iv_offset)))))) { |
785 max_ct = cmp_ct.at(j); |
788 max_ct = cmp_ct.at(j); |
786 max_vw = vw; |
789 max_vw = vw; |
787 max_idx = j; |
790 max_idx = j; |
788 min_size = data_size(s); |
791 min_size = data_size(s); |
789 min_iv_offset = p.offset_in_bytes(); |
792 min_iv_offset = p.offset_in_bytes(); |
923 void SuperWord::dependence_graph() { |
926 void SuperWord::dependence_graph() { |
924 CountedLoopNode *cl = lpt()->_head->as_CountedLoop(); |
927 CountedLoopNode *cl = lpt()->_head->as_CountedLoop(); |
925 // First, assign a dependence node to each memory node |
928 // First, assign a dependence node to each memory node |
926 for (int i = 0; i < _block.length(); i++ ) { |
929 for (int i = 0; i < _block.length(); i++ ) { |
927 Node *n = _block.at(i); |
930 Node *n = _block.at(i); |
928 if (n->is_Mem() || n->is_Phi() && n->bottom_type() == Type::MEMORY) { |
931 if (n->is_Mem() || (n->is_Phi() && n->bottom_type() == Type::MEMORY)) { |
929 _dg.make_node(n); |
932 _dg.make_node(n); |
930 } |
933 } |
931 } |
934 } |
932 |
935 |
933 // For each memory slice, create the dependences |
936 // For each memory slice, create the dependences |
1743 Node* in1 = cmpd0->in(1); |
1746 Node* in1 = cmpd0->in(1); |
1744 Node* in2 = cmpd0->in(2); |
1747 Node* in2 = cmpd0->in(2); |
1745 Node_List* in1_pk = _sw->my_pack(in1); |
1748 Node_List* in1_pk = _sw->my_pack(in1); |
1746 Node_List* in2_pk = _sw->my_pack(in2); |
1749 Node_List* in2_pk = _sw->my_pack(in2); |
1747 |
1750 |
1748 if (in1_pk != NULL && in1_pk->size() != cmpd_pk->size() |
1751 if ( (in1_pk != NULL && in1_pk->size() != cmpd_pk->size()) |
1749 || in2_pk != NULL && in2_pk->size() != cmpd_pk->size() ) { |
1752 || (in2_pk != NULL && in2_pk->size() != cmpd_pk->size()) ) { |
1750 return false; |
1753 return false; |
1751 } |
1754 } |
1752 |
1755 |
1753 // test if "all" in1 are in the same pack or the same node |
1756 // test if "all" in1 are in the same pack or the same node |
1754 if (in1_pk == NULL) { |
1757 if (in1_pk == NULL) { |
4036 _done = false; |
4039 _done = false; |
4037 if (_n->is_Load()) { |
4040 if (_n->is_Load()) { |
4038 _next_idx = 0; |
4041 _next_idx = 0; |
4039 _end_idx = _n->outcnt(); |
4042 _end_idx = _n->outcnt(); |
4040 _dep_next = dg.dep(_n)->out_head(); |
4043 _dep_next = dg.dep(_n)->out_head(); |
4041 } else if (_n->is_Mem() || _n->is_Phi() && _n->bottom_type() == Type::MEMORY) { |
4044 } else if (_n->is_Mem() || (_n->is_Phi() && _n->bottom_type() == Type::MEMORY)) { |
4042 _next_idx = 0; |
4045 _next_idx = 0; |
4043 _end_idx = 0; |
4046 _end_idx = 0; |
4044 _dep_next = dg.dep(_n)->out_head(); |
4047 _dep_next = dg.dep(_n)->out_head(); |
4045 } else { |
4048 } else { |
4046 _next_idx = 0; |
4049 _next_idx = 0; |