< prev index next >

src/hotspot/share/opto/arraycopynode.hpp

Print this page

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



115                            Node* adr_src, Node* base_src, Node* adr_dest, Node* base_dest,
116                            BasicType copy_type, const Type* value_type, int count);
117   Node* array_copy_backward(PhaseGVN *phase, bool can_reshape, Node*& ctl,
118                             Node* mem,
119                             const TypePtr* atp_src, const TypePtr* atp_dest,
120                             Node* adr_src, Node* base_src, Node* adr_dest, Node* base_dest,
121                             BasicType copy_type, const Type* value_type, int count);
122   bool finish_transform(PhaseGVN *phase, bool can_reshape,
123                         Node* ctl, Node *mem);




124   static bool may_modify_helper(const TypeOopPtr* t_oop, Node* n, PhaseValues* phase, CallNode*& call);
125 public:
126   static Node* load(BarrierSetC2* bs, PhaseGVN *phase, Node*& ctl, MergeMemNode* mem, Node* addr, const TypePtr* adr_type, const Type *type, BasicType bt);
127 private:
128   void store(BarrierSetC2* bs, PhaseGVN *phase, Node*& ctl, MergeMemNode* mem, Node* addr, const TypePtr* adr_type, Node* val, const Type *type, BasicType bt);
129 
130 public:
131 
132   enum {
133     Src   = TypeFunc::Parms,
134     SrcPos,
135     Dest,
136     DestPos,
137     Length,
138     SrcLen,
139     DestLen,
140     SrcKlass,
141     DestKlass,
142     ParmLimit
143   };

 83     fields[Length]    = TypeInt::INT;
 84     fields[SrcLen]    = TypeInt::INT;
 85     fields[DestLen]   = TypeInt::INT;
 86     fields[SrcKlass]  = TypeKlassPtr::BOTTOM;
 87     fields[DestKlass] = TypeKlassPtr::BOTTOM;
 88     const TypeTuple *domain = TypeTuple::make(ParmLimit, fields);
 89 
 90     // create result type (range)
 91     fields = TypeTuple::fields(0);
 92 
 93     const TypeTuple *range = TypeTuple::make(TypeFunc::Parms+0, fields);
 94 
 95     _arraycopy_type_Type =  TypeFunc::make(domain, range);
 96   }
 97 
 98 private:
 99   ArrayCopyNode(Compile* C, bool alloc_tightly_coupled, bool has_negative_length_guard);
100 
101   intptr_t get_length_if_constant(PhaseGVN *phase) const;
102   int get_count(PhaseGVN *phase) const;
103   static const TypeAryPtr* get_address_type(PhaseGVN* phase, const TypePtr* atp, Node* n);
104 
105   Node* try_clone_instance(PhaseGVN *phase, bool can_reshape, int count);
106   bool prepare_array_copy(PhaseGVN *phase, bool can_reshape,
107                           Node*& adr_src, Node*& base_src, Node*& adr_dest, Node*& base_dest,
108                           BasicType& copy_type, const Type*& value_type, bool& disjoint_bases);
109   void array_copy_test_overlap(GraphKit& kit,
110                                bool disjoint_bases, int count,
111                                Node*& backward_ctl);
112   void array_copy_forward(GraphKit& kit, bool can_reshape,
113                           const TypeAryPtr* atp_src, const TypeAryPtr* atp_dest,
114                           Node* adr_src, Node* base_src, Node* adr_dest, Node* base_dest,
115                           BasicType copy_type, const Type* value_type, int count);
116   void array_copy_backward(GraphKit& kit, bool can_reshape,
117                            const TypeAryPtr* atp_src, const TypeAryPtr* atp_dest,
118                            Node* adr_src, Node* base_src, Node* adr_dest, Node* base_dest,
119                            BasicType copy_type, const Type* value_type, int count);





120   bool finish_transform(PhaseGVN *phase, bool can_reshape,
121                         Node* ctl, Node *mem);
122   void copy(GraphKit& kit, const TypeAryPtr* atp_src, const TypeAryPtr* atp_dest, int i,
123             Node* base_src, Node* base_dest, Node* adr_src, Node* adr_dest,
124             BasicType copy_type, const Type* value_type);
125 
126   static bool may_modify_helper(const TypeOopPtr* t_oop, Node* n, PhaseValues* phase, CallNode*& call);
127 public:
128   static Node* load(BarrierSetC2* bs, PhaseGVN *phase, Node*& ctl, MergeMemNode* mem, Node* addr, const TypePtr* adr_type, const Type *type, BasicType bt);
129 private:
130   void store(BarrierSetC2* bs, PhaseGVN *phase, Node*& ctl, MergeMemNode* mem, Node* addr, const TypePtr* adr_type, Node* val, const Type *type, BasicType bt);
131 
132 public:
133 
134   enum {
135     Src   = TypeFunc::Parms,
136     SrcPos,
137     Dest,
138     DestPos,
139     Length,
140     SrcLen,
141     DestLen,
142     SrcKlass,
143     DestKlass,
144     ParmLimit
145   };
< prev index next >