src/share/vm/opto/memnode.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6877254 Sdiff src/share/vm/opto

src/share/vm/opto/memnode.cpp

Print this page




2293   if( progress != NULL ) return progress;
2294 
2295   progress = StoreNode::Ideal_sign_extended_input(phase, 16);
2296   if( progress != NULL ) return progress;
2297 
2298   // Finally check the default case
2299   return StoreNode::Ideal(phase, can_reshape);
2300 }
2301 
2302 //=============================================================================
2303 //------------------------------Identity---------------------------------------
2304 Node *StoreCMNode::Identity( PhaseTransform *phase ) {
2305   // No need to card mark when storing a null ptr
2306   Node* my_store = in(MemNode::OopStore);
2307   if (my_store->is_Store()) {
2308     const Type *t1 = phase->type( my_store->in(MemNode::ValueIn) );
2309     if( t1 == TypePtr::NULL_PTR ) {
2310       return in(MemNode::Memory);
2311     }
2312   }

2313   return this;
2314 }
2315 


















2316 //------------------------------Value-----------------------------------------
2317 const Type *StoreCMNode::Value( PhaseTransform *phase ) const {
2318   // Either input is TOP ==> the result is TOP
2319   const Type *t = phase->type( in(MemNode::Memory) );
2320   if( t == Type::TOP ) return Type::TOP;
2321   t = phase->type( in(MemNode::Address) );
2322   if( t == Type::TOP ) return Type::TOP;
2323   t = phase->type( in(MemNode::ValueIn) );
2324   if( t == Type::TOP ) return Type::TOP;
2325   // If extra input is TOP ==> the result is TOP
2326   t = phase->type( in(MemNode::OopStore) );
2327   if( t == Type::TOP ) return Type::TOP;
2328 
2329   return StoreNode::Value( phase );
2330 }
2331 
2332 
2333 //=============================================================================
2334 //----------------------------------SCMemProjNode------------------------------
2335 const Type * SCMemProjNode::Value( PhaseTransform *phase ) const




2293   if( progress != NULL ) return progress;
2294 
2295   progress = StoreNode::Ideal_sign_extended_input(phase, 16);
2296   if( progress != NULL ) return progress;
2297 
2298   // Finally check the default case
2299   return StoreNode::Ideal(phase, can_reshape);
2300 }
2301 
2302 //=============================================================================
2303 //------------------------------Identity---------------------------------------
2304 Node *StoreCMNode::Identity( PhaseTransform *phase ) {
2305   // No need to card mark when storing a null ptr
2306   Node* my_store = in(MemNode::OopStore);
2307   if (my_store->is_Store()) {
2308     const Type *t1 = phase->type( my_store->in(MemNode::ValueIn) );
2309     if( t1 == TypePtr::NULL_PTR ) {
2310       return in(MemNode::Memory);
2311     }
2312   }
2313 
2314   return this;
2315 }
2316 
2317 //=============================================================================
2318 //------------------------------Ideal---------------------------------------
2319 Node *StoreCMNode::Ideal(PhaseGVN *phase, bool can_reshape){
2320   Node* progress = StoreNode::Ideal(phase, can_reshape);
2321   if (progress != NULL) return progress;
2322 
2323   Node* my_store = in(MemNode::OopStore);
2324   if (my_store->is_MergeMem()) {
2325     Node* mem = my_store->as_MergeMem()->memory_at(oop_alias_idx());
2326     if (mem != my_store) {
2327       set_req(MemNode::OopStore, mem);
2328       return this;
2329     }
2330   }
2331 
2332   return NULL;
2333 }
2334 
2335 //------------------------------Value-----------------------------------------
2336 const Type *StoreCMNode::Value( PhaseTransform *phase ) const {
2337   // Either input is TOP ==> the result is TOP
2338   const Type *t = phase->type( in(MemNode::Memory) );
2339   if( t == Type::TOP ) return Type::TOP;
2340   t = phase->type( in(MemNode::Address) );
2341   if( t == Type::TOP ) return Type::TOP;
2342   t = phase->type( in(MemNode::ValueIn) );
2343   if( t == Type::TOP ) return Type::TOP;
2344   // If extra input is TOP ==> the result is TOP
2345   t = phase->type( in(MemNode::OopStore) );
2346   if( t == Type::TOP ) return Type::TOP;
2347 
2348   return StoreNode::Value( phase );
2349 }
2350 
2351 
2352 //=============================================================================
2353 //----------------------------------SCMemProjNode------------------------------
2354 const Type * SCMemProjNode::Value( PhaseTransform *phase ) const


src/share/vm/opto/memnode.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File