8009472: Print additional information for 8004640 failure

Dump nodes and types in 8004640 case.

Reviewed-by: roland
This commit is contained in:
Vladimir Kozlov 2013-03-06 12:25:57 -08:00
parent 748083843a
commit 010f640069
2 changed files with 29 additions and 8 deletions

View file

@ -678,6 +678,7 @@ class Compile : public Phase {
void record_dead_node(uint idx) { if (_dead_node_list.test_set(idx)) return;
_dead_node_count++;
}
bool is_dead_node(uint idx) { return _dead_node_list.test(idx) != 0; }
uint dead_node_count() { return _dead_node_count; }
void reset_dead_node_list() { _dead_node_list.Reset();
_dead_node_count = 0;

View file

@ -278,7 +278,7 @@ Node *MemNode::Ideal_common(PhaseGVN *phase, bool can_reshape) {
if (can_reshape && igvn != NULL &&
(igvn->_worklist.member(address) ||
igvn->_worklist.size() > 0 && (phase->type(address) != adr_type())) ) {
igvn->_worklist.size() > 0 && (t_adr != adr_type())) ) {
// The address's base and type may change when the address is processed.
// Delay this mem node transformation until the address is processed.
phase->is_IterGVN()->_worklist.push(this);
@ -296,6 +296,26 @@ Node *MemNode::Ideal_common(PhaseGVN *phase, bool can_reshape) {
Node* base = NULL;
if (address->is_AddP())
base = address->in(AddPNode::Base);
if (base != NULL && phase->type(base)->higher_equal(TypePtr::NULL_PTR) &&
!t_adr->isa_rawptr()) {
// Note: raw address has TOP base and top->higher_equal(TypePtr::NULL_PTR) is true.
Compile* C = phase->C;
tty->cr();
tty->print_cr("===== NULL+offs not RAW address =====");
if (C->is_dead_node(this->_idx)) tty->print_cr("'this' is dead");
if ((ctl != NULL) && C->is_dead_node(ctl->_idx)) tty->print_cr("'ctl' is dead");
if (C->is_dead_node(mem->_idx)) tty->print_cr("'mem' is dead");
if (C->is_dead_node(address->_idx)) tty->print_cr("'address' is dead");
if (C->is_dead_node(base->_idx)) tty->print_cr("'base' is dead");
tty->cr();
base->dump(1);
tty->cr();
this->dump(2);
tty->print("this->adr_type(): "); adr_type()->dump(); tty->cr();
tty->print("phase->type(address): "); t_adr->dump(); tty->cr();
tty->print("phase->type(base): "); phase->type(address)->dump(); tty->cr();
tty->cr();
}
assert(base == NULL || t_adr->isa_rawptr() ||
!phase->type(base)->higher_equal(TypePtr::NULL_PTR), "NULL+offs not RAW address?");
#endif