mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +02:00
8024921: PPC64 (part 113): Extend Load and Store nodes to know about memory ordering
Add a field to C2 LoadNode and StoreNode classes which indicates whether the load/store should do an acquire/release on platforms which support it. Reviewed-by: kvn
This commit is contained in:
parent
d8b9e9f681
commit
13b13f5259
17 changed files with 351 additions and 255 deletions
|
@ -106,24 +106,24 @@ Node *Parse::fetch_interpreter_state(int index,
|
|||
// Very similar to LoadNode::make, except we handle un-aligned longs and
|
||||
// doubles on Sparc. Intel can handle them just fine directly.
|
||||
Node *l;
|
||||
switch( bt ) { // Signature is flattened
|
||||
case T_INT: l = new (C) LoadINode( ctl, mem, adr, TypeRawPtr::BOTTOM ); break;
|
||||
case T_FLOAT: l = new (C) LoadFNode( ctl, mem, adr, TypeRawPtr::BOTTOM ); break;
|
||||
case T_ADDRESS: l = new (C) LoadPNode( ctl, mem, adr, TypeRawPtr::BOTTOM, TypeRawPtr::BOTTOM ); break;
|
||||
case T_OBJECT: l = new (C) LoadPNode( ctl, mem, adr, TypeRawPtr::BOTTOM, TypeInstPtr::BOTTOM ); break;
|
||||
switch (bt) { // Signature is flattened
|
||||
case T_INT: l = new (C) LoadINode(ctl, mem, adr, TypeRawPtr::BOTTOM, TypeInt::INT, MemNode::unordered); break;
|
||||
case T_FLOAT: l = new (C) LoadFNode(ctl, mem, adr, TypeRawPtr::BOTTOM, Type::FLOAT, MemNode::unordered); break;
|
||||
case T_ADDRESS: l = new (C) LoadPNode(ctl, mem, adr, TypeRawPtr::BOTTOM, TypeRawPtr::BOTTOM, MemNode::unordered); break;
|
||||
case T_OBJECT: l = new (C) LoadPNode(ctl, mem, adr, TypeRawPtr::BOTTOM, TypeInstPtr::BOTTOM, MemNode::unordered); break;
|
||||
case T_LONG:
|
||||
case T_DOUBLE: {
|
||||
// Since arguments are in reverse order, the argument address 'adr'
|
||||
// refers to the back half of the long/double. Recompute adr.
|
||||
adr = basic_plus_adr( local_addrs_base, local_addrs, -(index+1)*wordSize );
|
||||
if( Matcher::misaligned_doubles_ok ) {
|
||||
adr = basic_plus_adr(local_addrs_base, local_addrs, -(index+1)*wordSize);
|
||||
if (Matcher::misaligned_doubles_ok) {
|
||||
l = (bt == T_DOUBLE)
|
||||
? (Node*)new (C) LoadDNode( ctl, mem, adr, TypeRawPtr::BOTTOM )
|
||||
: (Node*)new (C) LoadLNode( ctl, mem, adr, TypeRawPtr::BOTTOM );
|
||||
? (Node*)new (C) LoadDNode(ctl, mem, adr, TypeRawPtr::BOTTOM, Type::DOUBLE, MemNode::unordered)
|
||||
: (Node*)new (C) LoadLNode(ctl, mem, adr, TypeRawPtr::BOTTOM, TypeLong::LONG, MemNode::unordered);
|
||||
} else {
|
||||
l = (bt == T_DOUBLE)
|
||||
? (Node*)new (C) LoadD_unalignedNode( ctl, mem, adr, TypeRawPtr::BOTTOM )
|
||||
: (Node*)new (C) LoadL_unalignedNode( ctl, mem, adr, TypeRawPtr::BOTTOM );
|
||||
? (Node*)new (C) LoadD_unalignedNode(ctl, mem, adr, TypeRawPtr::BOTTOM, MemNode::unordered)
|
||||
: (Node*)new (C) LoadL_unalignedNode(ctl, mem, adr, TypeRawPtr::BOTTOM, MemNode::unordered);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -229,7 +229,7 @@ void Parse::load_interpreter_state(Node* osr_buf) {
|
|||
Node *displaced_hdr = fetch_interpreter_state((index*2) + 1, T_ADDRESS, monitors_addr, osr_buf);
|
||||
|
||||
|
||||
store_to_memory(control(), box, displaced_hdr, T_ADDRESS, Compile::AliasIdxRaw);
|
||||
store_to_memory(control(), box, displaced_hdr, T_ADDRESS, Compile::AliasIdxRaw, MemNode::unordered);
|
||||
|
||||
// Build a bogus FastLockNode (no code will be generated) and push the
|
||||
// monitor into our debug info.
|
||||
|
@ -1931,7 +1931,7 @@ void Parse::call_register_finalizer() {
|
|||
Node* klass = _gvn.transform( LoadKlassNode::make(_gvn, immutable_memory(), klass_addr, TypeInstPtr::KLASS) );
|
||||
|
||||
Node* access_flags_addr = basic_plus_adr(klass, klass, in_bytes(Klass::access_flags_offset()));
|
||||
Node* access_flags = make_load(NULL, access_flags_addr, TypeInt::INT, T_INT);
|
||||
Node* access_flags = make_load(NULL, access_flags_addr, TypeInt::INT, T_INT, MemNode::unordered);
|
||||
|
||||
Node* mask = _gvn.transform(new (C) AndINode(access_flags, intcon(JVM_ACC_HAS_FINALIZER)));
|
||||
Node* check = _gvn.transform(new (C) CmpINode(mask, intcon(0)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue