aboutsummaryrefslogtreecommitdiff
path: root/src/share/vm/opto/graphKit.cpp
diff options
context:
space:
mode:
authorkvn <none@none>2009-02-17 14:30:24 -0800
committerkvn <none@none>2009-02-17 14:30:24 -0800
commit8da4273c9b8ec76af80c9bb4d1a249be6768e509 (patch)
tree28dc5e207c9f2aba79694a5ad2dbc68c28c3f48d /src/share/vm/opto/graphKit.cpp
parent17042c6027dc88d6ff8864791b2a071073a93d9d (diff)
parentb26d3c99696d81ebab222addb9e1849c456cb62a (diff)
downloadjdk8u_hotspot-8da4273c9b8ec76af80c9bb4d1a249be6768e509.tar.gz
Merge
Diffstat (limited to 'src/share/vm/opto/graphKit.cpp')
-rw-r--r--src/share/vm/opto/graphKit.cpp43
1 files changed, 10 insertions, 33 deletions
diff --git a/src/share/vm/opto/graphKit.cpp b/src/share/vm/opto/graphKit.cpp
index d3144df2e..c0cb4ba01 100644
--- a/src/share/vm/opto/graphKit.cpp
+++ b/src/share/vm/opto/graphKit.cpp
@@ -1836,10 +1836,7 @@ void GraphKit::write_barrier_post(Node* oop_store, Node* obj, Node* adr,
(CardTableModRefBS*)(Universe::heap()->barrier_set());
Node *b = _gvn.transform(new (C, 3) URShiftXNode( cast, _gvn.intcon(CardTableModRefBS::card_shift) ));
// We store into a byte array, so do not bother to left-shift by zero
- // Get base of card map
- assert(sizeof(*ct->byte_map_base) == sizeof(jbyte),
- "adjust this code");
- Node *c = makecon(TypeRawPtr::make((address)ct->byte_map_base));
+ Node *c = byte_map_base_node();
// Combine
Node *sb_ctl = control();
Node *sb_adr = _gvn.transform(new (C, 4) AddPNode( top()/*no base ptr*/, c, b ));
@@ -2945,16 +2942,10 @@ Node* GraphKit::new_instance(Node* klass_node,
// Now generate allocation code
- // With escape analysis, the entire memory state is needed to be able to
- // eliminate the allocation. If the allocations cannot be eliminated, this
- // will be optimized to the raw slice when the allocation is expanded.
- Node *mem;
- if (C->do_escape_analysis()) {
- mem = reset_memory();
- set_all_memory(mem);
- } else {
- mem = memory(Compile::AliasIdxRaw);
- }
+ // The entire memory state is needed for slow path of the allocation
+ // since GC and deoptimization can happened.
+ Node *mem = reset_memory();
+ set_all_memory(mem); // Create new memory state
AllocateNode* alloc
= new (C, AllocateNode::ParmLimit)
@@ -3091,16 +3082,10 @@ Node* GraphKit::new_array(Node* klass_node, // array klass (maybe variable)
// Now generate allocation code
- // With escape analysis, the entire memory state is needed to be able to
- // eliminate the allocation. If the allocations cannot be eliminated, this
- // will be optimized to the raw slice when the allocation is expanded.
- Node *mem;
- if (C->do_escape_analysis()) {
- mem = reset_memory();
- set_all_memory(mem);
- } else {
- mem = memory(Compile::AliasIdxRaw);
- }
+ // The entire memory state is needed for slow path of the allocation
+ // since GC and deoptimization can happened.
+ Node *mem = reset_memory();
+ set_all_memory(mem); // Create new memory state
// Create the AllocateArrayNode and its result projections
AllocateArrayNode* alloc
@@ -3365,14 +3350,6 @@ void GraphKit::g1_write_barrier_post(Node* store,
const TypeFunc *tf = OptoRuntime::g1_wb_post_Type();
- // Get the address of the card table
- CardTableModRefBS* ct =
- (CardTableModRefBS*)(Universe::heap()->barrier_set());
- Node *card_table = __ makecon(TypeRawPtr::make((address)ct->byte_map_base));
- // Get base of card map
- assert(sizeof(*ct->byte_map_base) == sizeof(jbyte), "adjust this code");
-
-
// Offsets into the thread
const int index_offset = in_bytes(JavaThread::dirty_card_queue_offset() +
PtrQueue::byte_offset_of_index());
@@ -3402,7 +3379,7 @@ void GraphKit::g1_write_barrier_post(Node* store,
Node* card_offset = __ URShiftX( cast, __ ConI(CardTableModRefBS::card_shift) );
// Combine card table base and card offset
- Node *card_adr = __ AddP(no_base, card_table, 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?