< prev index next >

src/hotspot/share/opto/arraycopynode.hpp

Print this page




  71     fields[DestPos]   = TypeInt::INT;
  72     fields[Length]    = TypeInt::INT;
  73     fields[SrcLen]    = TypeInt::INT;
  74     fields[DestLen]   = TypeInt::INT;
  75     fields[SrcKlass]  = TypeKlassPtr::BOTTOM;
  76     fields[DestKlass] = TypeKlassPtr::BOTTOM;
  77     const TypeTuple *domain = TypeTuple::make(ParmLimit, fields);
  78 
  79     // create result type (range)
  80     fields = TypeTuple::fields(0);
  81 
  82     const TypeTuple *range = TypeTuple::make(TypeFunc::Parms+0, fields);
  83 
  84     return TypeFunc::make(domain, range);
  85   }
  86 
  87   ArrayCopyNode(Compile* C, bool alloc_tightly_coupled, bool has_negative_length_guard);
  88 
  89   intptr_t get_length_if_constant(PhaseGVN *phase) const;
  90   int get_count(PhaseGVN *phase) const;
  91   static const TypePtr* get_address_type(PhaseGVN *phase, Node* n);
  92 
  93   Node* try_clone_instance(PhaseGVN *phase, bool can_reshape, int count);
  94   bool prepare_array_copy(PhaseGVN *phase, bool can_reshape,
  95                           Node*& adr_src, Node*& base_src, Node*& adr_dest, Node*& base_dest,
  96                           BasicType& copy_type, const Type*& value_type, bool& disjoint_bases);
  97   void array_copy_test_overlap(PhaseGVN *phase, bool can_reshape,
  98                                bool disjoint_bases, int count,
  99                                Node*& forward_ctl, Node*& backward_ctl);
 100   Node* array_copy_forward(PhaseGVN *phase, bool can_reshape, Node*& ctl,
 101                            MergeMemNode* mm,
 102                            const TypePtr* atp_src, const TypePtr* atp_dest,
 103                            Node* adr_src, Node* base_src, Node* adr_dest, Node* base_dest,
 104                            BasicType copy_type, const Type* value_type, int count);
 105   Node* array_copy_backward(PhaseGVN *phase, bool can_reshape, Node*& ctl,
 106                             MergeMemNode* mm,
 107                             const TypePtr* atp_src, const TypePtr* atp_dest,
 108                             Node* adr_src, Node* base_src, Node* adr_dest, Node* base_dest,
 109                             BasicType copy_type, const Type* value_type, int count);
 110   bool finish_transform(PhaseGVN *phase, bool can_reshape,
 111                         Node* ctl, Node *mem);




 112   static bool may_modify_helper(const TypeOopPtr *t_oop, Node* n, PhaseTransform *phase, CallNode*& call);
 113 
 114   static Node* load(BarrierSetC2* bs, PhaseGVN *phase, Node*& ctl, MergeMemNode* mem, Node* addr, const TypePtr* adr_type, const Type *type, BasicType bt);
 115   void store(BarrierSetC2* bs, PhaseGVN *phase, Node*& ctl, MergeMemNode* mem, Node* addr, const TypePtr* adr_type, Node* val, const Type *type, BasicType bt);
 116 
 117 public:
 118 
 119   enum {
 120     Src   = TypeFunc::Parms,
 121     SrcPos,
 122     Dest,
 123     DestPos,
 124     Length,
 125     SrcLen,
 126     DestLen,
 127     SrcKlass,
 128     DestKlass,
 129     ParmLimit
 130   };
 131 




  71     fields[DestPos]   = TypeInt::INT;
  72     fields[Length]    = TypeInt::INT;
  73     fields[SrcLen]    = TypeInt::INT;
  74     fields[DestLen]   = TypeInt::INT;
  75     fields[SrcKlass]  = TypeKlassPtr::BOTTOM;
  76     fields[DestKlass] = TypeKlassPtr::BOTTOM;
  77     const TypeTuple *domain = TypeTuple::make(ParmLimit, fields);
  78 
  79     // create result type (range)
  80     fields = TypeTuple::fields(0);
  81 
  82     const TypeTuple *range = TypeTuple::make(TypeFunc::Parms+0, fields);
  83 
  84     return TypeFunc::make(domain, range);
  85   }
  86 
  87   ArrayCopyNode(Compile* C, bool alloc_tightly_coupled, bool has_negative_length_guard);
  88 
  89   intptr_t get_length_if_constant(PhaseGVN *phase) const;
  90   int get_count(PhaseGVN *phase) const;
  91   static const TypeAryPtr* get_address_type(PhaseGVN *phase, Node* n);
  92 
  93   Node* try_clone_instance(PhaseGVN *phase, bool can_reshape, int count);
  94   bool prepare_array_copy(PhaseGVN *phase, bool can_reshape,
  95                           Node*& adr_src, Node*& base_src, Node*& adr_dest, Node*& base_dest,
  96                           BasicType& copy_type, const Type*& value_type, bool& disjoint_bases);
  97   void array_copy_test_overlap(GraphKit& kit,
  98                                bool disjoint_bases, int count,
  99                                Node*& backward_ctl);
 100   void array_copy_forward(GraphKit& kit, bool can_reshape,
 101                           const TypeAryPtr* atp_src, const TypeAryPtr* atp_dest,

 102                           Node* adr_src, Node* base_src, Node* adr_dest, Node* base_dest,
 103                           BasicType copy_type, const Type* value_type, int count);
 104   void array_copy_backward(GraphKit& kit, bool can_reshape,
 105                            const TypeAryPtr* atp_src, const TypeAryPtr* atp_dest,

 106                            Node* adr_src, Node* base_src, Node* adr_dest, Node* base_dest,
 107                            BasicType copy_type, const Type* value_type, int count);
 108   bool finish_transform(PhaseGVN *phase, bool can_reshape,
 109                         Node* ctl, Node *mem);
 110   void copy(GraphKit& kit, const TypeAryPtr* atp_src, const TypeAryPtr* atp_dest, int i,
 111             Node* base_src, Node* base_dest, Node* adr_src, Node* adr_dest,
 112             BasicType copy_type, const Type* value_type);
 113 
 114   static bool may_modify_helper(const TypeOopPtr *t_oop, Node* n, PhaseTransform *phase, CallNode*& call);
 115 
 116   static Node* load(BarrierSetC2* bs, PhaseGVN *phase, Node*& ctl, MergeMemNode* mem, Node* addr, const TypePtr* adr_type, const Type *type, BasicType bt);
 117   void store(BarrierSetC2* bs, PhaseGVN *phase, Node*& ctl, MergeMemNode* mem, Node* addr, const TypePtr* adr_type, Node* val, const Type *type, BasicType bt);
 118 
 119 public:
 120 
 121   enum {
 122     Src   = TypeFunc::Parms,
 123     SrcPos,
 124     Dest,
 125     DestPos,
 126     Length,
 127     SrcLen,
 128     DestLen,
 129     SrcKlass,
 130     DestKlass,
 131     ParmLimit
 132   };
 133 


< prev index next >