--- old/src/share/vm/opto/superword.hpp 2015-03-19 12:50:42.997349100 -0700 +++ new/src/share/vm/opto/superword.hpp 2015-03-19 12:50:42.800349100 -0700 @@ -249,6 +249,7 @@ LoopNode* _lp; // Current LoopNode Node* _bb; // Current basic block PhiNode* _iv; // Induction var + bool _race_possible; // In cases where SDMU is true // Accessors Arena* arena() { return _arena; } @@ -295,7 +296,7 @@ // memory alignment for a node int alignment(Node* n) { return _node_info.adr_at(bb_idx(n))->_alignment; } - void set_alignment(Node* n, int a) { int i = bb_idx(n); grow_node_info(i); _node_info.adr_at(i)->_alignment = a; } + void set_alignment(Node* n, int a) { int i = bb_idx(n); grow_node_info(i); _node_info.adr_at(i)->_alignment = a; n->set_attr(a); } // Max expression (DAG) depth from beginning of the block for each node int depth(Node* n) { return _node_info.adr_at(bb_idx(n))->_depth; } @@ -337,6 +338,8 @@ bool isomorphic(Node* s1, Node* s2); // Is there no data path from s1 to s2 or s2 to s1? bool independent(Node* s1, Node* s2); + // Is there a data path between s1 and s2 and both are reductions? + bool reduction(Node* s1, Node* s2); // Helper for independent bool independent_path(Node* shallow, Node* deep, uint dp=0); void set_alignment(Node* s1, Node* s2, int align); @@ -347,6 +350,8 @@ bool follow_use_defs(Node_List* p); // Extend the packset by visiting uses of nodes in pack p bool follow_def_uses(Node_List* p); + // For extended packsets, ordinally arrange uses packset by major component + void order_def_uses(Node_List* p); // Estimate the savings from executing s1 and s2 as a pack int est_savings(Node* s1, Node* s2); int adjacent_profit(Node* s1, Node* s2); @@ -379,6 +384,7 @@ // Is use->in(u_idx) a vector use? bool is_vector_use(Node* use, int u_idx); // Construct reverse postorder list of block members + bool is_reduction(Node* n); bool construct_bb(); // Initialize per node info void initialize_bb(); @@ -419,9 +425,12 @@ void print_bb(); void print_stmt(Node* s); char* blank(uint depth); + + static int packset_eval(Node_List** x, Node_List** y); }; + //------------------------------SWPointer--------------------------- // Information about an address for dependence checking and vector alignment class SWPointer VALUE_OBJ_CLASS_SPEC {