< prev index next >
src/share/vm/opto/graphKit.cpp
Print this page
*** 4196,4207 ****
Node* adr,
uint alias_idx,
Node* val,
BasicType bt,
bool use_precise) {
! // If we are writing a NULL then we need no post barrier
if (val != NULL && val->is_Con() && val->bottom_type() == TypePtr::NULL_PTR) {
// Must be NULL
const Type* t = val->bottom_type();
assert(t == Type::TOP || t == TypePtr::NULL_PTR, "must be NULL");
// No post barrier if writing NULLx
--- 4196,4215 ----
Node* adr,
uint alias_idx,
Node* val,
BasicType bt,
bool use_precise) {
! if (val == NULL) {
! // The Object.clone() intrinsic uses this path if !ReduceInitialCardMarks.
! // We don't need a barrier here because the destination is a newly allocated object
! // in Eden. Otherwise, GC verification breaks because we assume that cards in Eden
! // are set to 'g1_young_gen' (see G1SATBCardTableModRefBS::verify_g1_young_region()).
! assert(!use_ReduceInitialCardMarks(), "can only happen with card marking");
! return;
! }
+ // If we are writing a NULL then we need no post barrier
if (val != NULL && val->is_Con() && val->bottom_type() == TypePtr::NULL_PTR) {
// Must be NULL
const Type* t = val->bottom_type();
assert(t == Type::TOP || t == TypePtr::NULL_PTR, "must be NULL");
// No post barrier if writing NULLx
*** 4272,4284 ****
// Combine card table base and card offset
Node* card_adr = __ AddP(no_base, byte_map_base_node(), card_offset );
// If we know the value being stored does it cross regions?
- if (val != NULL) {
- // Does the store cause us to cross regions?
-
// Should be able to do an unsigned compare of region_size instead of
// and extra shift. Do we have an unsigned compare??
// Node* region_size = __ ConI(1 << HeapRegion::LogOfHRGrainBytes);
Node* xor_res = __ URShiftX ( __ XorX( cast, __ CastPX(__ ctrl(), val)), __ ConI(HeapRegion::LogOfHRGrainBytes));
--- 4280,4289 ----
*** 4303,4316 ****
g1_mark_card(ideal, card_adr, oop_store, alias_idx, index, index_adr, buffer, tf);
} __ end_if();
} __ end_if();
} __ end_if();
} __ end_if();
- } else {
- // Object.clone() instrinsic uses this path.
- g1_mark_card(ideal, card_adr, oop_store, alias_idx, index, index_adr, buffer, tf);
- }
// Final sync IdealKit and GraphKit.
final_sync(ideal);
}
#undef __
--- 4308,4317 ----
< prev index next >