6851742: (EA) allocation elimination doesn't work with UseG1GC

Fix eliminate_card_mark() to eliminate G1 pre/post barriers.

Reviewed-by: never
This commit is contained in:
Vladimir Kozlov 2009-07-16 14:10:42 -07:00
parent a24ea182cc
commit c3efa899b6
12 changed files with 315 additions and 232 deletions

View file

@ -300,6 +300,12 @@ const Node* MachNode::get_base_and_disp(intptr_t &offset, const TypePtr* &adr_ty
}
}
adr_type = t_disp->add_offset(offset);
} else if( base == NULL && offset != 0 && offset != Type::OffsetBot ) {
// Use ideal type if it is oop ptr.
const TypePtr *tp = oper->type()->isa_ptr();
if( tp != NULL) {
adr_type = tp;
}
}
}