src/share/vm/opto/compile.hpp

changeset 8285
535618ab1c04
parent 7792
99edc344d77c
child 8604
04d83ba48607
child 8654
2e734e824d16
equal deleted inserted replaced
8282:16f7b676725a 8285:535618ab1c04
73 class StartNode; 73 class StartNode;
74 class SafePointNode; 74 class SafePointNode;
75 class JVMState; 75 class JVMState;
76 class Type; 76 class Type;
77 class TypeData; 77 class TypeData;
78 class TypeInt;
78 class TypePtr; 79 class TypePtr;
79 class TypeOopPtr; 80 class TypeOopPtr;
80 class TypeFunc; 81 class TypeFunc;
81 class Unique_Node_List; 82 class Unique_Node_List;
82 class nmethod; 83 class nmethod;
332 const char* _failure_reason; // for record_failure/failing pattern 333 const char* _failure_reason; // for record_failure/failing pattern
333 GrowableArray<CallGenerator*>* _intrinsics; // List of intrinsics. 334 GrowableArray<CallGenerator*>* _intrinsics; // List of intrinsics.
334 GrowableArray<Node*>* _macro_nodes; // List of nodes which need to be expanded before matching. 335 GrowableArray<Node*>* _macro_nodes; // List of nodes which need to be expanded before matching.
335 GrowableArray<Node*>* _predicate_opaqs; // List of Opaque1 nodes for the loop predicates. 336 GrowableArray<Node*>* _predicate_opaqs; // List of Opaque1 nodes for the loop predicates.
336 GrowableArray<Node*>* _expensive_nodes; // List of nodes that are expensive to compute and that we'd better not let the GVN freely common 337 GrowableArray<Node*>* _expensive_nodes; // List of nodes that are expensive to compute and that we'd better not let the GVN freely common
338 GrowableArray<Node*>* _range_check_casts; // List of CastII nodes with a range check dependency
337 ConnectionGraph* _congraph; 339 ConnectionGraph* _congraph;
338 #ifndef PRODUCT 340 #ifndef PRODUCT
339 IdealGraphPrinter* _printer; 341 IdealGraphPrinter* _printer;
340 #endif 342 #endif
341 343
667 Node* expensive_node(int idx) const { return _expensive_nodes->at(idx); } 669 Node* expensive_node(int idx) const { return _expensive_nodes->at(idx); }
668 ConnectionGraph* congraph() { return _congraph;} 670 ConnectionGraph* congraph() { return _congraph;}
669 void set_congraph(ConnectionGraph* congraph) { _congraph = congraph;} 671 void set_congraph(ConnectionGraph* congraph) { _congraph = congraph;}
670 void add_macro_node(Node * n) { 672 void add_macro_node(Node * n) {
671 //assert(n->is_macro(), "must be a macro node"); 673 //assert(n->is_macro(), "must be a macro node");
672 assert(!_macro_nodes->contains(n), " duplicate entry in expand list"); 674 assert(!_macro_nodes->contains(n), "duplicate entry in expand list");
673 _macro_nodes->append(n); 675 _macro_nodes->append(n);
674 } 676 }
675 void remove_macro_node(Node * n) { 677 void remove_macro_node(Node * n) {
676 // this function may be called twice for a node so check 678 // this function may be called twice for a node so check
677 // that the node is in the array before attempting to remove it 679 // that the node is in the array before attempting to remove it
687 if (_expensive_nodes->contains(n)) { 689 if (_expensive_nodes->contains(n)) {
688 _expensive_nodes->remove(n); 690 _expensive_nodes->remove(n);
689 } 691 }
690 } 692 }
691 void add_predicate_opaq(Node * n) { 693 void add_predicate_opaq(Node * n) {
692 assert(!_predicate_opaqs->contains(n), " duplicate entry in predicate opaque1"); 694 assert(!_predicate_opaqs->contains(n), "duplicate entry in predicate opaque1");
693 assert(_macro_nodes->contains(n), "should have already been in macro list"); 695 assert(_macro_nodes->contains(n), "should have already been in macro list");
694 _predicate_opaqs->append(n); 696 _predicate_opaqs->append(n);
695 } 697 }
698
699 // Range check dependent CastII nodes that can be removed after loop optimizations
700 void add_range_check_cast(Node* n);
701 void remove_range_check_cast(Node* n) {
702 if (_range_check_casts->contains(n)) {
703 _range_check_casts->remove(n);
704 }
705 }
706 Node* range_check_cast_node(int idx) const { return _range_check_casts->at(idx); }
707 int range_check_cast_count() const { return _range_check_casts->length(); }
708 // Remove all range check dependent CastIINodes.
709 void remove_range_check_casts(PhaseIterGVN &igvn);
710
696 // remove the opaque nodes that protect the predicates so that the unused checks and 711 // remove the opaque nodes that protect the predicates so that the unused checks and
697 // uncommon traps will be eliminated from the graph. 712 // uncommon traps will be eliminated from the graph.
698 void cleanup_loop_predicates(PhaseIterGVN &igvn); 713 void cleanup_loop_predicates(PhaseIterGVN &igvn);
699 bool is_predicate_opaq(Node * n) { 714 bool is_predicate_opaq(Node * n) {
700 return _predicate_opaqs->contains(n); 715 return _predicate_opaqs->contains(n);
1199 static void adlc_verification() PRODUCT_RETURN; 1214 static void adlc_verification() PRODUCT_RETURN;
1200 1215
1201 // Definitions of pd methods 1216 // Definitions of pd methods
1202 static void pd_compiler2_init(); 1217 static void pd_compiler2_init();
1203 1218
1219 // Convert integer value to a narrowed long type dependent on ctrl (for example, a range check)
1220 static Node* constrained_convI2L(PhaseGVN* phase, Node* value, const TypeInt* itype, Node* ctrl);
1221
1204 // Auxiliary method for randomized fuzzing/stressing 1222 // Auxiliary method for randomized fuzzing/stressing
1205 static bool randomized_select(int count); 1223 static bool randomized_select(int count);
1206 }; 1224 };
1207 1225
1208 #endif // SHARE_VM_OPTO_COMPILE_HPP 1226 #endif // SHARE_VM_OPTO_COMPILE_HPP

mercurial