equal
deleted
inserted
replaced
767 // At least one iteration is executed in pre-loop by default. As result |
767 // At least one iteration is executed in pre-loop by default. As result |
768 // several iterations are needed to align memory operations in main-loop even |
768 // several iterations are needed to align memory operations in main-loop even |
769 // if offset is 0. |
769 // if offset is 0. |
770 int iv_adjustment_in_bytes = (stride_sign * vw - (offset % vw)); |
770 int iv_adjustment_in_bytes = (stride_sign * vw - (offset % vw)); |
771 assert(((ABS(iv_adjustment_in_bytes) % elt_size) == 0), |
771 assert(((ABS(iv_adjustment_in_bytes) % elt_size) == 0), |
772 err_msg_res("(%d) should be divisible by (%d)", iv_adjustment_in_bytes, elt_size)); |
772 "(%d) should be divisible by (%d)", iv_adjustment_in_bytes, elt_size); |
773 iv_adjustment = iv_adjustment_in_bytes/elt_size; |
773 iv_adjustment = iv_adjustment_in_bytes/elt_size; |
774 } else { |
774 } else { |
775 // This memory op is not dependent on iv (scale == 0) |
775 // This memory op is not dependent on iv (scale == 0) |
776 iv_adjustment = 0; |
776 iv_adjustment = 0; |
777 } |
777 } |
912 }//for |
912 }//for |
913 if (n == stop) break; |
913 if (n == stop) break; |
914 preds.push(n); |
914 preds.push(n); |
915 NOT_PRODUCT(if (TraceSuperWord && Verbose) tty->print_cr("SuperWord::mem_slice_preds: added pred(%d)", n->_idx);) |
915 NOT_PRODUCT(if (TraceSuperWord && Verbose) tty->print_cr("SuperWord::mem_slice_preds: added pred(%d)", n->_idx);) |
916 prev = n; |
916 prev = n; |
917 assert(n->is_Mem(), err_msg_res("unexpected node %s", n->Name())); |
917 assert(n->is_Mem(), "unexpected node %s", n->Name()); |
918 n = n->in(MemNode::Memory); |
918 n = n->in(MemNode::Memory); |
919 } |
919 } |
920 } |
920 } |
921 |
921 |
922 //------------------------------stmts_can_pack--------------------------- |
922 //------------------------------stmts_can_pack--------------------------- |
2108 Node *n = lp()->fast_out(i); |
2108 Node *n = lp()->fast_out(i); |
2109 if (in_bb(n) && (n->is_Phi() && n->bottom_type() == Type::MEMORY)) { |
2109 if (in_bb(n) && (n->is_Phi() && n->bottom_type() == Type::MEMORY)) { |
2110 Node* n_tail = n->in(LoopNode::LoopBackControl); |
2110 Node* n_tail = n->in(LoopNode::LoopBackControl); |
2111 if (n_tail != n->in(LoopNode::EntryControl)) { |
2111 if (n_tail != n->in(LoopNode::EntryControl)) { |
2112 if (!n_tail->is_Mem()) { |
2112 if (!n_tail->is_Mem()) { |
2113 assert(n_tail->is_Mem(), err_msg_res("unexpected node for memory slice: %s", n_tail->Name())); |
2113 assert(n_tail->is_Mem(), "unexpected node for memory slice: %s", n_tail->Name()); |
2114 return false; // Bailout |
2114 return false; // Bailout |
2115 } |
2115 } |
2116 _mem_slice_head.push(n); |
2116 _mem_slice_head.push(n); |
2117 _mem_slice_tail.push(n_tail); |
2117 _mem_slice_tail.push(n_tail); |
2118 } |
2118 } |