< prev index next >
src/share/vm/opto/escape.cpp
Print this page
*** 32,41 ****
--- 32,44 ----
#include "opto/cfgnode.hpp"
#include "opto/compile.hpp"
#include "opto/escape.hpp"
#include "opto/phaseX.hpp"
#include "opto/rootnode.hpp"
+ #if INCLUDE_ALL_GCS
+ #include "gc_implementation/shenandoah/c2/shenandoahSupport.hpp"
+ #endif
ConnectionGraph::ConnectionGraph(Compile * C, PhaseIterGVN *igvn) :
_nodes(C->comp_arena(), C->unique(), C->unique(), NULL),
_in_worklist(C->comp_arena()),
_next_pidx(0),
*** 521,531 ****
// Stored value escapes in unsafe access.
if ((opcode == Op_StoreP) && (adr_type == TypeRawPtr::BOTTOM)) {
// Pointer stores in G1 barriers looks like unsafe access.
// Ignore such stores to be able scalar replace non-escaping
// allocations.
! if (UseG1GC && adr->is_AddP()) {
Node* base = get_addp_base(adr);
if (base->Opcode() == Op_LoadP &&
base->in(MemNode::Address)->is_AddP()) {
adr = base->in(MemNode::Address);
Node* tls = get_addp_base(adr);
--- 524,534 ----
// Stored value escapes in unsafe access.
if ((opcode == Op_StoreP) && (adr_type == TypeRawPtr::BOTTOM)) {
// Pointer stores in G1 barriers looks like unsafe access.
// Ignore such stores to be able scalar replace non-escaping
// allocations.
! if ((UseG1GC || UseShenandoahGC) && adr->is_AddP()) {
Node* base = get_addp_base(adr);
if (base->Opcode() == Op_LoadP &&
base->in(MemNode::Address)->is_AddP()) {
adr = base->in(MemNode::Address);
Node* tls = get_addp_base(adr);
*** 563,572 ****
--- 566,580 ----
}
case Op_ThreadLocal: {
add_java_object(n, PointsToNode::ArgEscape);
break;
}
+ #if INCLUDE_ALL_GCS
+ case Op_ShenandoahLoadReferenceBarrier:
+ add_local_var_and_edge(n, PointsToNode::NoEscape, n->in(ShenandoahLoadReferenceBarrierNode::ValueIn), delayed_worklist);
+ break;
+ #endif
default:
; // Do nothing for nodes not related to EA.
}
return;
}
*** 757,767 ****
add_edge(n_ptn, ptn);
}
}
break;
}
! default: {
// This method should be called only for EA specific nodes which may
// miss some edges when they were created.
#ifdef ASSERT
n->dump(1);
#endif
--- 765,780 ----
add_edge(n_ptn, ptn);
}
}
break;
}
! #if INCLUDE_ALL_GCS
! case Op_ShenandoahLoadReferenceBarrier:
! add_local_var_and_edge(n, PointsToNode::NoEscape, n->in(ShenandoahLoadReferenceBarrierNode::ValueIn), NULL);
! break;
! #endif
! default: {
// This method should be called only for EA specific nodes which may
// miss some edges when they were created.
#ifdef ASSERT
n->dump(1);
#endif
*** 945,954 ****
--- 958,969 ----
#ifdef ASSERT
if (!(is_arraycopy ||
(call->as_CallLeaf()->_name != NULL &&
(strcmp(call->as_CallLeaf()->_name, "g1_wb_pre") == 0 ||
strcmp(call->as_CallLeaf()->_name, "g1_wb_post") == 0 ||
+ strcmp(call->as_CallLeaf()->_name, "shenandoah_clone_barrier") == 0 ||
+ strcmp(call->as_CallLeaf()->_name, "shenandoah_cas_obj") == 0 ||
strcmp(call->as_CallLeaf()->_name, "updateBytesCRC32") == 0 ||
strcmp(call->as_CallLeaf()->_name, "aescrypt_encryptBlock") == 0 ||
strcmp(call->as_CallLeaf()->_name, "aescrypt_decryptBlock") == 0 ||
strcmp(call->as_CallLeaf()->_name, "cipherBlockChaining_encryptAESCrypt") == 0 ||
strcmp(call->as_CallLeaf()->_name, "cipherBlockChaining_decryptAESCrypt") == 0 ||
*** 2277,2287 ****
Node* uncast_base = base->uncast();
int opcode = uncast_base->Opcode();
assert(opcode == Op_ConP || opcode == Op_ThreadLocal ||
opcode == Op_CastX2P || uncast_base->is_DecodeNarrowPtr() ||
(uncast_base->is_Mem() && (uncast_base->bottom_type()->isa_rawptr() != NULL)) ||
! (uncast_base->is_Proj() && uncast_base->in(0)->is_Allocate()), "sanity");
}
return base;
}
Node* ConnectionGraph::find_second_addp(Node* addp, Node* n) {
--- 2292,2304 ----
Node* uncast_base = base->uncast();
int opcode = uncast_base->Opcode();
assert(opcode == Op_ConP || opcode == Op_ThreadLocal ||
opcode == Op_CastX2P || uncast_base->is_DecodeNarrowPtr() ||
(uncast_base->is_Mem() && (uncast_base->bottom_type()->isa_rawptr() != NULL)) ||
! (uncast_base->is_Proj() && uncast_base->in(0)->is_Allocate()) ||
! (uncast_base->is_Phi() && (uncast_base->bottom_type()->isa_rawptr() != NULL)) ||
! uncast_base->Opcode() == Op_ShenandoahLoadReferenceBarrier, "sanity");
}
return base;
}
Node* ConnectionGraph::find_second_addp(Node* addp, Node* n) {
< prev index next >