1064 void mark_reductions( IdealLoopTree *loop ); 1065 1066 // Return true if exp is a constant times an induction var 1067 bool is_scaled_iv(Node* exp, Node* iv, int* p_scale); 1068 1069 // Return true if exp is a scaled induction var plus (or minus) constant 1070 bool is_scaled_iv_plus_offset(Node* exp, Node* iv, int* p_scale, Node** p_offset, int depth = 0); 1071 1072 // Create a new if above the uncommon_trap_if_pattern for the predicate to be promoted 1073 ProjNode* create_new_if_for_predicate(ProjNode* cont_proj, Node* new_entry, 1074 Deoptimization::DeoptReason reason, 1075 int opcode); 1076 void register_control(Node* n, IdealLoopTree *loop, Node* pred); 1077 1078 // Clone loop predicates to cloned loops (peeled, unswitched) 1079 static ProjNode* clone_predicate(ProjNode* predicate_proj, Node* new_entry, 1080 Deoptimization::DeoptReason reason, 1081 PhaseIdealLoop* loop_phase, 1082 PhaseIterGVN* igvn); 1083 1084 static Node* clone_loop_predicates(Node* old_entry, Node* new_entry, 1085 bool clone_limit_check, 1086 PhaseIdealLoop* loop_phase, 1087 PhaseIterGVN* igvn); 1088 Node* clone_loop_predicates(Node* old_entry, Node* new_entry, bool clone_limit_check); 1089 1090 static Node* skip_all_loop_predicates(Node* entry); 1091 static Node* skip_loop_predicates(Node* entry); 1092 1093 // Find a good location to insert a predicate 1094 static ProjNode* find_predicate_insertion_point(Node* start_c, Deoptimization::DeoptReason reason); 1095 // Find a predicate 1096 static Node* find_predicate(Node* entry); 1097 // Construct a range check for a predicate if 1098 BoolNode* rc_predicate(IdealLoopTree *loop, Node* ctrl, 1099 int scale, Node* offset, 1100 Node* init, Node* limit, jint stride, 1101 Node* range, bool upper, bool &overflow); 1102 1103 // Implementation of the loop predication to promote checks outside the loop | 1064 void mark_reductions( IdealLoopTree *loop ); 1065 1066 // Return true if exp is a constant times an induction var 1067 bool is_scaled_iv(Node* exp, Node* iv, int* p_scale); 1068 1069 // Return true if exp is a scaled induction var plus (or minus) constant 1070 bool is_scaled_iv_plus_offset(Node* exp, Node* iv, int* p_scale, Node** p_offset, int depth = 0); 1071 1072 // Create a new if above the uncommon_trap_if_pattern for the predicate to be promoted 1073 ProjNode* create_new_if_for_predicate(ProjNode* cont_proj, Node* new_entry, 1074 Deoptimization::DeoptReason reason, 1075 int opcode); 1076 void register_control(Node* n, IdealLoopTree *loop, Node* pred); 1077 1078 // Clone loop predicates to cloned loops (peeled, unswitched) 1079 static ProjNode* clone_predicate(ProjNode* predicate_proj, Node* new_entry, 1080 Deoptimization::DeoptReason reason, 1081 PhaseIdealLoop* loop_phase, 1082 PhaseIterGVN* igvn); 1083 1084 static void clone_loop_predicates_fix_mem(ProjNode* dom_proj , ProjNode* proj, 1085 PhaseIdealLoop* loop_phase, 1086 PhaseIterGVN* igvn ); 1087 1088 static Node* clone_loop_predicates(Node* old_entry, Node* new_entry, 1089 bool clone_limit_check, 1090 PhaseIdealLoop* loop_phase, 1091 PhaseIterGVN* igvn); 1092 Node* clone_loop_predicates(Node* old_entry, Node* new_entry, bool clone_limit_check); 1093 1094 static Node* skip_all_loop_predicates(Node* entry); 1095 static Node* skip_loop_predicates(Node* entry); 1096 1097 // Find a good location to insert a predicate 1098 static ProjNode* find_predicate_insertion_point(Node* start_c, Deoptimization::DeoptReason reason); 1099 // Find a predicate 1100 static Node* find_predicate(Node* entry); 1101 // Construct a range check for a predicate if 1102 BoolNode* rc_predicate(IdealLoopTree *loop, Node* ctrl, 1103 int scale, Node* offset, 1104 Node* init, Node* limit, jint stride, 1105 Node* range, bool upper, bool &overflow); 1106 1107 // Implementation of the loop predication to promote checks outside the loop |