2987 igvn->replace_node(proj_out(TypeFunc::Memory), in(TypeFunc::Memory));
2988 igvn->replace_node(proj_out(TypeFunc::Control), in(TypeFunc::Control));
2989 // Must return either the original node (now dead) or a new node
2990 // (Do not return a top here, since that would break the uniqueness of top.)
2991 return new ConINode(TypeInt::ZERO);
2992 }
2993 }
2994 return progress ? this : NULL;
2995 }
2996
2997 //------------------------------Value------------------------------------------
2998 const Type* MemBarNode::Value(PhaseGVN* phase) const {
2999 if( !in(0) ) return Type::TOP;
3000 if( phase->type(in(0)) == Type::TOP )
3001 return Type::TOP;
3002 return TypeTuple::MEMBAR;
3003 }
3004
3005 //------------------------------match------------------------------------------
3006 // Construct projections for memory.
3007 Node *MemBarNode::match( const ProjNode *proj, const Matcher *m ) {
3008 switch (proj->_con) {
3009 case TypeFunc::Control:
3010 case TypeFunc::Memory:
3011 return new MachProjNode(this,proj->_con,RegMask::Empty,MachProjNode::unmatched_proj);
3012 }
3013 ShouldNotReachHere();
3014 return NULL;
3015 }
3016
3017 //===========================InitializeNode====================================
3018 // SUMMARY:
3019 // This node acts as a memory barrier on raw memory, after some raw stores.
3020 // The 'cooked' oop value feeds from the Initialize, not the Allocation.
3021 // The Initialize can 'capture' suitably constrained stores as raw inits.
3022 // It can coalesce related raw stores into larger units (called 'tiles').
3023 // It can avoid zeroing new storage for memory units which have raw inits.
3024 // At macro-expansion, it is marked 'complete', and does not optimize further.
3025 //
3026 // EXAMPLE:
3027 // The object 'new short[2]' occupies 16 bytes in a 32-bit machine.
|
2987 igvn->replace_node(proj_out(TypeFunc::Memory), in(TypeFunc::Memory));
2988 igvn->replace_node(proj_out(TypeFunc::Control), in(TypeFunc::Control));
2989 // Must return either the original node (now dead) or a new node
2990 // (Do not return a top here, since that would break the uniqueness of top.)
2991 return new ConINode(TypeInt::ZERO);
2992 }
2993 }
2994 return progress ? this : NULL;
2995 }
2996
2997 //------------------------------Value------------------------------------------
2998 const Type* MemBarNode::Value(PhaseGVN* phase) const {
2999 if( !in(0) ) return Type::TOP;
3000 if( phase->type(in(0)) == Type::TOP )
3001 return Type::TOP;
3002 return TypeTuple::MEMBAR;
3003 }
3004
3005 //------------------------------match------------------------------------------
3006 // Construct projections for memory.
3007 Node *MemBarNode::match(const ProjNode *proj, const Matcher *m, const RegMask* mask) {
3008 switch (proj->_con) {
3009 case TypeFunc::Control:
3010 case TypeFunc::Memory:
3011 return new MachProjNode(this,proj->_con,RegMask::Empty,MachProjNode::unmatched_proj);
3012 }
3013 ShouldNotReachHere();
3014 return NULL;
3015 }
3016
3017 //===========================InitializeNode====================================
3018 // SUMMARY:
3019 // This node acts as a memory barrier on raw memory, after some raw stores.
3020 // The 'cooked' oop value feeds from the Initialize, not the Allocation.
3021 // The Initialize can 'capture' suitably constrained stores as raw inits.
3022 // It can coalesce related raw stores into larger units (called 'tiles').
3023 // It can avoid zeroing new storage for memory units which have raw inits.
3024 // At macro-expansion, it is marked 'complete', and does not optimize further.
3025 //
3026 // EXAMPLE:
3027 // The object 'new short[2]' occupies 16 bytes in a 32-bit machine.
|