--- old/src/share/vm/opto/superword.hpp Sat Jun 2 20:04:21 2012 +++ new/src/share/vm/opto/superword.hpp Sat Jun 2 20:04:21 2012 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -264,7 +264,10 @@ _iv = lp->as_CountedLoop()->phi()->as_Phi(); } int iv_stride() { return lp()->as_CountedLoop()->stride_con(); } - int vector_width_in_bytes() { return Matcher::vector_width_in_bytes(); } + int vector_width_in_bytes(BasicType bt) { + return MIN2(ABS(iv_stride())*type2aelembytes(bt), + Matcher::vector_width_in_bytes(bt)); + } MemNode* align_to_ref() { return _align_to_ref; } void set_align_to_ref(MemNode* m) { _align_to_ref = m; } @@ -298,6 +301,7 @@ // vector element type const Type* velt_type(Node* n) { return _node_info.adr_at(bb_idx(n))->_velt_type; } + BasicType velt_basic_type(Node* n) { return velt_type(n)->array_element_basic_type(); } void set_velt_type(Node* n, const Type* t) { int i = bb_idx(n); grow_node_info(i); _node_info.adr_at(i)->_velt_type = t; } // my_pack @@ -311,7 +315,9 @@ // Find the adjacent memory references and create pack pairs for them. void find_adjacent_refs(); // Find a memory reference to align the loop induction variable to. - void find_align_to_ref(Node_List &memops); + MemNode* find_align_to_ref(Node_List &memops); + // Calculate loop's iv adjustment for this memory ops. + int get_iv_adjustment(MemNode* mem); // Can the preloop align the reference to position zero in the vector? bool ref_is_alignable(SWPointer& p); // Construct dependency graph. @@ -462,6 +468,7 @@ Node* base() { return _base; } Node* adr() { return _adr; } + MemNode* mem() { return _mem; } int scale_in_bytes() { return _scale; } Node* invar() { return _invar; } bool negate_invar() { return _negate_invar; }