< prev index next >

src/share/vm/opto/intrinsicnode.cpp

Print this page




  38 // control copies
  39 Node* StrIntrinsicNode::Ideal(PhaseGVN* phase, bool can_reshape) {
  40   if (remove_dead_region(phase, can_reshape)) return this;
  41   // Don't bother trying to transform a dead node
  42   if (in(0) && in(0)->is_top())  return NULL;
  43 
  44   if (can_reshape) {
  45     Node* mem = phase->transform(in(MemNode::Memory));
  46     // If transformed to a MergeMem, get the desired slice
  47     uint alias_idx = phase->C->get_alias_index(adr_type());
  48     mem = mem->is_MergeMem() ? mem->as_MergeMem()->memory_at(alias_idx) : mem;
  49     if (mem != in(MemNode::Memory)) {
  50       set_req(MemNode::Memory, mem);
  51       return this;
  52     }
  53   }
  54   return NULL;
  55 }
  56 
  57 //------------------------------Value------------------------------------------
  58 const Type* StrIntrinsicNode::Value(PhaseTransform* phase) const {
  59   if (in(0) && phase->type(in(0)) == Type::TOP) return Type::TOP;
  60   return bottom_type();
  61 }
  62 
  63 uint StrIntrinsicNode::size_of() const { return sizeof(*this); }
  64 
  65 //=============================================================================
  66 //------------------------------Ideal------------------------------------------
  67 // Return a node which is more "ideal" than the current node.  Strip out
  68 // control copies
  69 Node* StrCompressedCopyNode::Ideal(PhaseGVN* phase, bool can_reshape) {
  70   return remove_dead_region(phase, can_reshape) ? this : NULL;
  71 }
  72 
  73 //=============================================================================
  74 //------------------------------Ideal------------------------------------------
  75 // Return a node which is more "ideal" than the current node.  Strip out
  76 // control copies
  77 Node* StrInflatedCopyNode::Ideal(PhaseGVN* phase, bool can_reshape) {
  78   return remove_dead_region(phase, can_reshape) ? this : NULL;
  79 }
  80 
  81 //=============================================================================
  82 //------------------------------match_edge-------------------------------------
  83 // Do not match memory edge
  84 uint EncodeISOArrayNode::match_edge(uint idx) const {
  85   return idx == 2 || idx == 3; // EncodeISOArray src (Binary dst len)
  86 }
  87 
  88 //------------------------------Ideal------------------------------------------
  89 // Return a node which is more "ideal" than the current node.  Strip out
  90 // control copies
  91 Node* EncodeISOArrayNode::Ideal(PhaseGVN* phase, bool can_reshape) {
  92   return remove_dead_region(phase, can_reshape) ? this : NULL;
  93 }
  94 
  95 //------------------------------Value------------------------------------------
  96 const Type* EncodeISOArrayNode::Value(PhaseTransform* phase) const {
  97   if (in(0) && phase->type(in(0)) == Type::TOP) return Type::TOP;
  98   return bottom_type();
  99 }
 100 


  38 // control copies
  39 Node* StrIntrinsicNode::Ideal(PhaseGVN* phase, bool can_reshape) {
  40   if (remove_dead_region(phase, can_reshape)) return this;
  41   // Don't bother trying to transform a dead node
  42   if (in(0) && in(0)->is_top())  return NULL;
  43 
  44   if (can_reshape) {
  45     Node* mem = phase->transform(in(MemNode::Memory));
  46     // If transformed to a MergeMem, get the desired slice
  47     uint alias_idx = phase->C->get_alias_index(adr_type());
  48     mem = mem->is_MergeMem() ? mem->as_MergeMem()->memory_at(alias_idx) : mem;
  49     if (mem != in(MemNode::Memory)) {
  50       set_req(MemNode::Memory, mem);
  51       return this;
  52     }
  53   }
  54   return NULL;
  55 }
  56 
  57 //------------------------------Value------------------------------------------
  58 const Type* StrIntrinsicNode::Value(PhaseGVN* phase) const {
  59   if (in(0) && phase->type(in(0)) == Type::TOP) return Type::TOP;
  60   return bottom_type();
  61 }
  62 
  63 uint StrIntrinsicNode::size_of() const { return sizeof(*this); }
  64 
  65 //=============================================================================
  66 //------------------------------Ideal------------------------------------------
  67 // Return a node which is more "ideal" than the current node.  Strip out
  68 // control copies
  69 Node* StrCompressedCopyNode::Ideal(PhaseGVN* phase, bool can_reshape) {
  70   return remove_dead_region(phase, can_reshape) ? this : NULL;
  71 }
  72 
  73 //=============================================================================
  74 //------------------------------Ideal------------------------------------------
  75 // Return a node which is more "ideal" than the current node.  Strip out
  76 // control copies
  77 Node* StrInflatedCopyNode::Ideal(PhaseGVN* phase, bool can_reshape) {
  78   return remove_dead_region(phase, can_reshape) ? this : NULL;
  79 }
  80 
  81 //=============================================================================
  82 //------------------------------match_edge-------------------------------------
  83 // Do not match memory edge
  84 uint EncodeISOArrayNode::match_edge(uint idx) const {
  85   return idx == 2 || idx == 3; // EncodeISOArray src (Binary dst len)
  86 }
  87 
  88 //------------------------------Ideal------------------------------------------
  89 // Return a node which is more "ideal" than the current node.  Strip out
  90 // control copies
  91 Node* EncodeISOArrayNode::Ideal(PhaseGVN* phase, bool can_reshape) {
  92   return remove_dead_region(phase, can_reshape) ? this : NULL;
  93 }
  94 
  95 //------------------------------Value------------------------------------------
  96 const Type* EncodeISOArrayNode::Value(PhaseGVN* phase) const {
  97   if (in(0) && phase->type(in(0)) == Type::TOP) return Type::TOP;
  98   return bottom_type();
  99 }
 100 
< prev index next >