1.1 --- a/src/share/vm/adlc/output_h.cpp Wed Aug 10 14:06:57 2011 -0700 1.2 +++ b/src/share/vm/adlc/output_h.cpp Thu Aug 11 12:08:11 2011 -0700 1.3 @@ -1536,12 +1536,16 @@ 1.4 // Each instruction attribute results in a virtual call of same name. 1.5 // The ins_cost is not handled here. 1.6 Attribute *attr = instr->_attribs; 1.7 + bool avoid_back_to_back = false; 1.8 while (attr != NULL) { 1.9 if (strcmp(attr->_ident,"ins_cost") && 1.10 strcmp(attr->_ident,"ins_short_branch")) { 1.11 fprintf(fp," int %s() const { return %s; }\n", 1.12 attr->_ident, attr->_val); 1.13 } 1.14 + // Check value for ins_avoid_back_to_back, and if it is true (1), set the flag 1.15 + if (!strcmp(attr->_ident,"ins_avoid_back_to_back") && attr->int_val(*this) != 0) 1.16 + avoid_back_to_back = true; 1.17 attr = (Attribute *)attr->_next; 1.18 } 1.19 1.20 @@ -1704,6 +1708,16 @@ 1.21 } 1.22 } 1.23 1.24 + // flag: if this instruction should not be generated back to back. 1.25 + if ( avoid_back_to_back ) { 1.26 + if ( node_flags_set ) { 1.27 + fprintf(fp," | Flag_avoid_back_to_back"); 1.28 + } else { 1.29 + fprintf(fp,"init_flags(Flag_avoid_back_to_back"); 1.30 + node_flags_set = true; 1.31 + } 1.32 + } 1.33 + 1.34 // Check if machine instructions that USE memory, but do not DEF memory, 1.35 // depend upon a node that defines memory in machine-independent graph. 1.36 if ( instr->needs_anti_dependence_check(_globalNames) ) {