8067338: compiler/debug/TraceIterativeGVN.java segfaults

Reviewed-by: kvn
This commit is contained in:
Vladimir Ivanov 2014-12-19 16:42:40 -08:00
parent 5494b45a7a
commit 5fd1e54fc1
4 changed files with 16 additions and 7 deletions

View File

@ -658,7 +658,7 @@ void CallNode::dump_req(outputStream *st) const {
void CallNode::dump_spec(outputStream *st) const {
st->print(" ");
tf()->dump_on(st);
if (tf() != NULL) tf()->dump_on(st);
if (_cnt != COUNT_UNKNOWN) st->print(" C=%f",_cnt);
if (jvms() != NULL) jvms()->dump_spec(st);
}

View File

@ -1147,7 +1147,7 @@ const TypeInt* PhaseIdealLoop::filtered_type_from_dominators( Node* val, Node *u
// Dump special per-node info
#ifndef PRODUCT
void CountedLoopEndNode::dump_spec(outputStream *st) const {
if( in(TestValue)->is_Bool() ) {
if( in(TestValue) != NULL && in(TestValue)->is_Bool() ) {
BoolTest bt( test_trip()); // Added this for g++.
st->print("[");

View File

@ -473,8 +473,13 @@ bool MachNode::rematerialize() const {
// Print any per-operand special info
void MachNode::dump_spec(outputStream *st) const {
uint cnt = num_opnds();
for( uint i=0; i<cnt; i++ )
_opnds[i]->dump_spec(st);
for( uint i=0; i<cnt; i++ ) {
if (_opnds[i] != NULL) {
_opnds[i]->dump_spec(st);
} else {
st->print(" _");
}
}
const TypePtr *t = adr_type();
if( t ) {
Compile* C = Compile::current();
@ -493,7 +498,11 @@ void MachNode::dump_format(PhaseRegAlloc *ra, outputStream *st) const {
//=============================================================================
#ifndef PRODUCT
void MachTypeNode::dump_spec(outputStream *st) const {
_bottom_type->dump_on(st);
if (_bottom_type != NULL) {
_bottom_type->dump_on(st);
} else {
st->print(" NULL");
}
}
#endif
@ -635,7 +644,7 @@ const Type *MachCallNode::Value(PhaseTransform *phase) const { return tf()->rang
#ifndef PRODUCT
void MachCallNode::dump_spec(outputStream *st) const {
st->print("# ");
tf()->dump_on(st);
if (tf() != NULL) tf()->dump_on(st);
if (_cnt != COUNT_UNKNOWN) st->print(" C=%f",_cnt);
if (jvms() != NULL) jvms()->dump_spec(st);
}

View File

@ -4370,7 +4370,7 @@ void MergeMemNode::dump_spec(outputStream *st) const {
st->print(" {");
Node* base_mem = base_memory();
for( uint i = Compile::AliasIdxRaw; i < req(); i++ ) {
Node* mem = memory_at(i);
Node* mem = (in(i) != NULL) ? memory_at(i) : base_mem;
if (mem == base_mem) { st->print(" -"); continue; }
st->print( " N%d:", mem->_idx );
Compile::current()->get_adr_type(i)->dump_on(st);