diff options
author | amurillo <none@none> | 2011-12-16 12:38:00 -0800 |
---|---|---|
committer | amurillo <none@none> | 2011-12-16 12:38:00 -0800 |
commit | 5088c573717a507452745449e2744e5964a9e2ef (patch) | |
tree | 49204f40f4e98f158ec21bbe6939643d04f4f438 /src/share/vm/opto/memnode.cpp | |
parent | 0949cfa75a7558f3329225d32f12fd825285e99f (diff) | |
parent | 1b38a580c71fa8e2ecc97cb06122bc9c4a4c254f (diff) |
Mergehs23-b08
Diffstat (limited to 'src/share/vm/opto/memnode.cpp')
-rw-r--r-- | src/share/vm/opto/memnode.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/share/vm/opto/memnode.cpp b/src/share/vm/opto/memnode.cpp index 5d4afb0e4..722935a3f 100644 --- a/src/share/vm/opto/memnode.cpp +++ b/src/share/vm/opto/memnode.cpp @@ -265,6 +265,13 @@ Node *MemNode::Ideal_common(PhaseGVN *phase, bool can_reshape) { if( phase->type( mem ) == Type::TOP ) return NodeSentinel; // caller will return NULL assert( mem != this, "dead loop in MemNode::Ideal" ); + if (can_reshape && igvn != NULL && igvn->_worklist.member(mem)) { + // This memory slice may be dead. + // Delay this mem node transformation until the memory is processed. + phase->is_IterGVN()->_worklist.push(this); + return NodeSentinel; // caller will return NULL + } + Node *address = in(MemNode::Address); const Type *t_adr = phase->type( address ); if( t_adr == Type::TOP ) return NodeSentinel; // caller will return NULL @@ -2661,6 +2668,8 @@ uint StrIntrinsicNode::match_edge(uint idx) const { // control copies Node *StrIntrinsicNode::Ideal(PhaseGVN *phase, bool can_reshape) { if (remove_dead_region(phase, can_reshape)) return this; + // Don't bother trying to transform a dead node + if (in(0) && in(0)->is_top()) return NULL; if (can_reshape) { Node* mem = phase->transform(in(MemNode::Memory)); @@ -2675,6 +2684,12 @@ Node *StrIntrinsicNode::Ideal(PhaseGVN *phase, bool can_reshape) { return NULL; } +//------------------------------Value------------------------------------------ +const Type *StrIntrinsicNode::Value( PhaseTransform *phase ) const { + if (in(0) && phase->type(in(0)) == Type::TOP) return Type::TOP; + return bottom_type(); +} + //============================================================================= MemBarNode::MemBarNode(Compile* C, int alias_idx, Node* precedent) : MultiNode(TypeFunc::Parms + (precedent == NULL? 0: 1)), @@ -2715,6 +2730,8 @@ MemBarNode* MemBarNode::make(Compile* C, int opcode, int atp, Node* pn) { // control copies Node *MemBarNode::Ideal(PhaseGVN *phase, bool can_reshape) { if (remove_dead_region(phase, can_reshape)) return this; + // Don't bother trying to transform a dead node + if (in(0) && in(0)->is_top()) return NULL; // Eliminate volatile MemBars for scalar replaced objects. if (can_reshape && req() == (Precedent+1) && |