Mercurial > hg > graal-jvmci-8
diff src/share/vm/adlc/output_h.cpp @ 3851:95134e034042
7063629: use cbcond in C2 generated code on T4
Summary: Use new short branch instruction in C2 generated code.
Reviewed-by: never
author | kvn |
---|---|
date | Thu, 11 Aug 2011 12:08:11 -0700 |
parents | c7b60b601eb4 |
children | 11211f7cb5a0 |
line wrap: on
line diff
--- a/src/share/vm/adlc/output_h.cpp Wed Aug 10 14:06:57 2011 -0700 +++ b/src/share/vm/adlc/output_h.cpp Thu Aug 11 12:08:11 2011 -0700 @@ -1536,12 +1536,16 @@ // Each instruction attribute results in a virtual call of same name. // The ins_cost is not handled here. Attribute *attr = instr->_attribs; + bool avoid_back_to_back = false; while (attr != NULL) { if (strcmp(attr->_ident,"ins_cost") && strcmp(attr->_ident,"ins_short_branch")) { fprintf(fp," int %s() const { return %s; }\n", attr->_ident, attr->_val); } + // Check value for ins_avoid_back_to_back, and if it is true (1), set the flag + if (!strcmp(attr->_ident,"ins_avoid_back_to_back") && attr->int_val(*this) != 0) + avoid_back_to_back = true; attr = (Attribute *)attr->_next; } @@ -1704,6 +1708,16 @@ } } + // flag: if this instruction should not be generated back to back. + if ( avoid_back_to_back ) { + if ( node_flags_set ) { + fprintf(fp," | Flag_avoid_back_to_back"); + } else { + fprintf(fp,"init_flags(Flag_avoid_back_to_back"); + node_flags_set = true; + } + } + // Check if machine instructions that USE memory, but do not DEF memory, // depend upon a node that defines memory in machine-independent graph. if ( instr->needs_anti_dependence_check(_globalNames) ) {