mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 19:44:41 +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
|
@ -485,7 +485,8 @@ Node *AndINode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
|||
Node *ldus = new (phase->C) LoadUSNode(load->in(MemNode::Control),
|
||||
load->in(MemNode::Memory),
|
||||
load->in(MemNode::Address),
|
||||
load->adr_type());
|
||||
load->adr_type(),
|
||||
TypeInt::CHAR, MemNode::unordered);
|
||||
ldus = phase->transform(ldus);
|
||||
return new (phase->C) AndINode(ldus, phase->intcon(mask & 0xFFFF));
|
||||
}
|
||||
|
@ -496,7 +497,8 @@ Node *AndINode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
|||
Node* ldub = new (phase->C) LoadUBNode(load->in(MemNode::Control),
|
||||
load->in(MemNode::Memory),
|
||||
load->in(MemNode::Address),
|
||||
load->adr_type());
|
||||
load->adr_type(),
|
||||
TypeInt::UBYTE, MemNode::unordered);
|
||||
ldub = phase->transform(ldub);
|
||||
return new (phase->C) AndINode(ldub, phase->intcon(mask));
|
||||
}
|
||||
|
@ -931,9 +933,10 @@ Node *RShiftINode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
|||
ld->outcnt() == 1 && ld->unique_out() == shl)
|
||||
// Replace zero-extension-load with sign-extension-load
|
||||
return new (phase->C) LoadSNode( ld->in(MemNode::Control),
|
||||
ld->in(MemNode::Memory),
|
||||
ld->in(MemNode::Address),
|
||||
ld->adr_type());
|
||||
ld->in(MemNode::Memory),
|
||||
ld->in(MemNode::Address),
|
||||
ld->adr_type(), TypeInt::SHORT,
|
||||
MemNode::unordered);
|
||||
}
|
||||
|
||||
// Check for "(byte[i] <<24)>>24" which simply sign-extends
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue