< prev index next >

src/hotspot/share/opto/arraycopynode.hpp

Print this page

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



105                            Node* adr_src, Node* base_src, Node* adr_dest, Node* base_dest,
106                            BasicType copy_type, const Type* value_type, int count);
107   Node* array_copy_backward(PhaseGVN *phase, bool can_reshape, Node*& ctl,
108                             Node* mem,
109                             const TypePtr* atp_src, const TypePtr* atp_dest,
110                             Node* adr_src, Node* base_src, Node* adr_dest, Node* base_dest,
111                             BasicType copy_type, const Type* value_type, int count);
112   bool finish_transform(PhaseGVN *phase, bool can_reshape,
113                         Node* ctl, Node *mem);




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

 73     fields[DestPos]   = TypeInt::INT;
 74     fields[Length]    = TypeInt::INT;
 75     fields[SrcLen]    = TypeInt::INT;
 76     fields[DestLen]   = TypeInt::INT;
 77     fields[SrcKlass]  = TypeKlassPtr::BOTTOM;
 78     fields[DestKlass] = TypeKlassPtr::BOTTOM;
 79     const TypeTuple *domain = TypeTuple::make(ParmLimit, fields);
 80 
 81     // create result type (range)
 82     fields = TypeTuple::fields(0);
 83 
 84     const TypeTuple *range = TypeTuple::make(TypeFunc::Parms+0, fields);
 85 
 86     return TypeFunc::make(domain, range);
 87   }
 88 
 89   ArrayCopyNode(Compile* C, bool alloc_tightly_coupled, bool has_negative_length_guard);
 90 
 91   intptr_t get_length_if_constant(PhaseGVN *phase) const;
 92   int get_count(PhaseGVN *phase) const;
 93   static const TypeAryPtr* get_address_type(PhaseGVN* phase, const TypePtr* atp, Node* n);
 94 
 95   Node* try_clone_instance(PhaseGVN *phase, bool can_reshape, int count);
 96   bool prepare_array_copy(PhaseGVN *phase, bool can_reshape,
 97                           Node*& adr_src, Node*& base_src, Node*& adr_dest, Node*& base_dest,
 98                           BasicType& copy_type, const Type*& value_type, bool& disjoint_bases);
 99   void array_copy_test_overlap(GraphKit& kit,
100                                bool disjoint_bases, int count,
101                                Node*& backward_ctl);
102   void array_copy_forward(GraphKit& kit, bool can_reshape,
103                           const TypeAryPtr* atp_src, const TypeAryPtr* atp_dest,
104                           Node* adr_src, Node* base_src, Node* adr_dest, Node* base_dest,
105                           BasicType copy_type, const Type* value_type, int count);
106   void array_copy_backward(GraphKit& kit, bool can_reshape,
107                            const TypeAryPtr* atp_src, const TypeAryPtr* 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   void copy(GraphKit& kit, const TypeAryPtr* atp_src, const TypeAryPtr* atp_dest, int i,
113             Node* base_src, Node* base_dest, Node* adr_src, Node* adr_dest,
114             BasicType copy_type, const Type* value_type);
115 
116   static bool may_modify_helper(const TypeOopPtr* t_oop, Node* n, PhaseValues* phase, CallNode*& call);
117 public:
118   static Node* load(BarrierSetC2* bs, PhaseGVN *phase, Node*& ctl, MergeMemNode* mem, Node* addr, const TypePtr* adr_type, const Type *type, BasicType bt);
119 private:
120   void store(BarrierSetC2* bs, PhaseGVN *phase, Node*& ctl, MergeMemNode* mem, Node* addr, const TypePtr* adr_type, Node* val, const Type *type, BasicType bt);
121 
122 public:
123 
124   enum {
125     Src   = TypeFunc::Parms,
126     SrcPos,
127     Dest,
128     DestPos,
129     Length,
130     SrcLen,
131     DestLen,
132     SrcKlass,
133     DestKlass,
134     ParmLimit
135   };
< prev index next >