72 MemNode( Node *c0, Node *c1, Node *c2, const TypePtr* at, Node *c3, Node *c4) 73 : Node(c0,c1,c2,c3,c4), _unaligned_access(false), _mismatched_access(false) { 74 init_class_id(Class_Mem); 75 debug_only(_adr_type=at; adr_type();) 76 } 77 78 static bool check_if_adr_maybe_raw(Node* adr); 79 80 public: 81 // Helpers for the optimizer. Documented in memnode.cpp. 82 static bool detect_ptr_independence(Node* p1, AllocateNode* a1, 83 Node* p2, AllocateNode* a2, 84 PhaseTransform* phase); 85 static bool adr_phi_is_loop_invariant(Node* adr_phi, Node* cast); 86 87 static Node *optimize_simple_memory_chain(Node *mchain, const TypeOopPtr *t_oop, Node *load, PhaseGVN *phase); 88 static Node *optimize_memory_chain(Node *mchain, const TypePtr *t_adr, Node *load, PhaseGVN *phase); 89 // This one should probably be a phase-specific function: 90 static bool all_controls_dominate(Node* dom, Node* sub); 91 92 // Find any cast-away of null-ness and keep its control. 93 static Node *Ideal_common_DU_postCCP( PhaseCCP *ccp, Node* n, Node* adr ); 94 virtual Node *Ideal_DU_postCCP( PhaseCCP *ccp ); 95 96 virtual const class TypePtr *adr_type() const; // returns bottom_type of address 97 98 // Shared code for Ideal methods: 99 Node *Ideal_common(PhaseGVN *phase, bool can_reshape); // Return -1 for short-circuit NULL. 100 101 // Helper function for adr_type() implementations. 102 static const TypePtr* calculate_adr_type(const Type* t, const TypePtr* cross_check = NULL); 103 104 // Raw access function, to allow copying of adr_type efficiently in 105 // product builds and retain the debug info for debug builds. 106 const TypePtr *raw_adr_type() const { 107 #ifdef ASSERT 108 return _adr_type; 109 #else 110 return 0; 111 #endif 112 } 113 114 // Map a load or store opcode to its corresponding store opcode. 115 // (Return -1 if unknown.) | 72 MemNode( Node *c0, Node *c1, Node *c2, const TypePtr* at, Node *c3, Node *c4) 73 : Node(c0,c1,c2,c3,c4), _unaligned_access(false), _mismatched_access(false) { 74 init_class_id(Class_Mem); 75 debug_only(_adr_type=at; adr_type();) 76 } 77 78 static bool check_if_adr_maybe_raw(Node* adr); 79 80 public: 81 // Helpers for the optimizer. Documented in memnode.cpp. 82 static bool detect_ptr_independence(Node* p1, AllocateNode* a1, 83 Node* p2, AllocateNode* a2, 84 PhaseTransform* phase); 85 static bool adr_phi_is_loop_invariant(Node* adr_phi, Node* cast); 86 87 static Node *optimize_simple_memory_chain(Node *mchain, const TypeOopPtr *t_oop, Node *load, PhaseGVN *phase); 88 static Node *optimize_memory_chain(Node *mchain, const TypePtr *t_adr, Node *load, PhaseGVN *phase); 89 // This one should probably be a phase-specific function: 90 static bool all_controls_dominate(Node* dom, Node* sub); 91 92 virtual const class TypePtr *adr_type() const; // returns bottom_type of address 93 94 // Shared code for Ideal methods: 95 Node *Ideal_common(PhaseGVN *phase, bool can_reshape); // Return -1 for short-circuit NULL. 96 97 // Helper function for adr_type() implementations. 98 static const TypePtr* calculate_adr_type(const Type* t, const TypePtr* cross_check = NULL); 99 100 // Raw access function, to allow copying of adr_type efficiently in 101 // product builds and retain the debug info for debug builds. 102 const TypePtr *raw_adr_type() const { 103 #ifdef ASSERT 104 return _adr_type; 105 #else 106 return 0; 107 #endif 108 } 109 110 // Map a load or store opcode to its corresponding store opcode. 111 // (Return -1 if unknown.) |