mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-15 18:33:41 +00:00
8029025: PPC64 (part 203): opto: Move static _in_dump_cnt to Compile object
Also introduces the compiler oracle 'option' feature for PrintAssembly. Reviewed-by: kvn
This commit is contained in:
parent
7289ee4573
commit
b4ded0bc2e
@ -619,7 +619,7 @@ nmethod* nmethod::new_nmethod(methodHandle method,
|
||||
InstanceKlass::cast(klass)->add_dependent_nmethod(nm);
|
||||
}
|
||||
NOT_PRODUCT(nmethod_stats.note_nmethod(nm));
|
||||
if (PrintAssembly) {
|
||||
if (PrintAssembly || CompilerOracle::has_option_string(method, "PrintAssembly")) {
|
||||
Disassembler::decode(nm);
|
||||
}
|
||||
}
|
||||
|
||||
@ -342,7 +342,7 @@ static void format_helper( PhaseRegAlloc *regalloc, outputStream* st, Node *n, c
|
||||
st->print(" %s%d]=#"INT32_FORMAT,msg,i,t->is_int()->get_con());
|
||||
break;
|
||||
case Type::AnyPtr:
|
||||
assert( t == TypePtr::NULL_PTR, "" );
|
||||
assert( t == TypePtr::NULL_PTR || n->in_dump(), "" );
|
||||
st->print(" %s%d]=#NULL",msg,i);
|
||||
break;
|
||||
case Type::AryPtr:
|
||||
@ -887,7 +887,7 @@ int CallStaticJavaNode::extract_uncommon_trap_request(const Node* call) {
|
||||
if (!(call->req() > TypeFunc::Parms &&
|
||||
call->in(TypeFunc::Parms) != NULL &&
|
||||
call->in(TypeFunc::Parms)->is_Con())) {
|
||||
assert(_in_dump_cnt != 0, "OK if dumping");
|
||||
assert(in_dump() != 0, "OK if dumping");
|
||||
tty->print("[bad uncommon trap]");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -647,6 +647,7 @@ Compile::Compile( ciEnv* ci_env, C2Compiler* compiler, ciMethod* target, int osr
|
||||
_dead_node_count(0),
|
||||
#ifndef PRODUCT
|
||||
_trace_opto_output(TraceOptoOutput || method()->has_option("TraceOptoOutput")),
|
||||
_in_dump_cnt(0),
|
||||
_printer(IdealGraphPrinter::printer()),
|
||||
#endif
|
||||
_congraph(NULL),
|
||||
@ -936,6 +937,7 @@ Compile::Compile( ciEnv* ci_env,
|
||||
_inner_loops(0),
|
||||
#ifndef PRODUCT
|
||||
_trace_opto_output(TraceOptoOutput),
|
||||
_in_dump_cnt(0),
|
||||
_printer(NULL),
|
||||
#endif
|
||||
_dead_node_list(comp_arena()),
|
||||
|
||||
@ -591,6 +591,7 @@ class Compile : public Phase {
|
||||
bool trace_opto_output() const { return _trace_opto_output; }
|
||||
bool parsed_irreducible_loop() const { return _parsed_irreducible_loop; }
|
||||
void set_parsed_irreducible_loop(bool z) { _parsed_irreducible_loop = z; }
|
||||
int _in_dump_cnt; // Required for dumping ir nodes.
|
||||
#endif
|
||||
|
||||
// JSR 292
|
||||
|
||||
@ -404,7 +404,7 @@ void IdealGraphPrinter::visit_node(Node *n, bool edges, VectorSet* temp_set) {
|
||||
|
||||
Node *node = n;
|
||||
#ifndef PRODUCT
|
||||
node->_in_dump_cnt++;
|
||||
Compile::current()->_in_dump_cnt++;
|
||||
print_prop(NODE_NAME_PROPERTY, (const char *)node->Name());
|
||||
const Type *t = node->bottom_type();
|
||||
print_prop("type", t->msg());
|
||||
@ -623,7 +623,7 @@ void IdealGraphPrinter::visit_node(Node *n, bool edges, VectorSet* temp_set) {
|
||||
print_prop("lrg", lrg_id);
|
||||
}
|
||||
|
||||
node->_in_dump_cnt--;
|
||||
Compile::current()->_in_dump_cnt--;
|
||||
#endif
|
||||
|
||||
tail(PROPERTIES_ELEMENT);
|
||||
|
||||
@ -1523,7 +1523,6 @@ Node* Node::find_ctrl(int idx) const {
|
||||
|
||||
|
||||
#ifndef PRODUCT
|
||||
int Node::_in_dump_cnt = 0;
|
||||
|
||||
// -----------------------------Name-------------------------------------------
|
||||
extern const char *NodeClassNames[];
|
||||
@ -1595,7 +1594,7 @@ void Node::set_debug_orig(Node* orig) {
|
||||
void Node::dump(const char* suffix, outputStream *st) const {
|
||||
Compile* C = Compile::current();
|
||||
bool is_new = C->node_arena()->contains(this);
|
||||
_in_dump_cnt++;
|
||||
C->_in_dump_cnt++;
|
||||
st->print("%c%d\t%s\t=== ", is_new ? ' ' : 'o', _idx, Name());
|
||||
|
||||
// Dump the required and precedence inputs
|
||||
@ -1610,7 +1609,7 @@ void Node::dump(const char* suffix, outputStream *st) const {
|
||||
dump_orig(debug_orig(), st);
|
||||
#endif
|
||||
st->cr();
|
||||
_in_dump_cnt--;
|
||||
C->_in_dump_cnt--;
|
||||
return; // don't process dead nodes
|
||||
}
|
||||
|
||||
@ -1662,7 +1661,7 @@ void Node::dump(const char* suffix, outputStream *st) const {
|
||||
}
|
||||
}
|
||||
if (suffix) st->print(suffix);
|
||||
_in_dump_cnt--;
|
||||
C->_in_dump_cnt--;
|
||||
}
|
||||
|
||||
//------------------------------dump_req--------------------------------------
|
||||
|
||||
@ -1033,8 +1033,7 @@ public:
|
||||
// RegMask Print Functions
|
||||
void dump_in_regmask(int idx) { in_RegMask(idx).dump(); }
|
||||
void dump_out_regmask() { out_RegMask().dump(); }
|
||||
static int _in_dump_cnt;
|
||||
static bool in_dump() { return _in_dump_cnt > 0; }
|
||||
static bool in_dump() { return Compile::current()->_in_dump_cnt > 0; }
|
||||
void fast_dump() const {
|
||||
tty->print("%4d: %-17s", _idx, Name());
|
||||
for (uint i = 0; i < len(); i++)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user