< prev index next >
src/share/vm/opto/compile.hpp
Print this page
@@ -73,10 +73,11 @@
class StartNode;
class SafePointNode;
class JVMState;
class Type;
class TypeData;
+class TypeInt;
class TypePtr;
class TypeOopPtr;
class TypeFunc;
class Unique_Node_List;
class nmethod;
@@ -332,10 +333,11 @@
const char* _failure_reason; // for record_failure/failing pattern
GrowableArray<CallGenerator*>* _intrinsics; // List of intrinsics.
GrowableArray<Node*>* _macro_nodes; // List of nodes which need to be expanded before matching.
GrowableArray<Node*>* _predicate_opaqs; // List of Opaque1 nodes for the loop predicates.
GrowableArray<Node*>* _expensive_nodes; // List of nodes that are expensive to compute and that we'd better not let the GVN freely common
+ GrowableArray<Node*>* _range_check_casts; // List of CastII nodes with a range check dependency
ConnectionGraph* _congraph;
#ifndef PRODUCT
IdealGraphPrinter* _printer;
#endif
@@ -667,11 +669,11 @@
Node* expensive_node(int idx) const { return _expensive_nodes->at(idx); }
ConnectionGraph* congraph() { return _congraph;}
void set_congraph(ConnectionGraph* congraph) { _congraph = congraph;}
void add_macro_node(Node * n) {
//assert(n->is_macro(), "must be a macro node");
- assert(!_macro_nodes->contains(n), " duplicate entry in expand list");
+ assert(!_macro_nodes->contains(n), "duplicate entry in expand list");
_macro_nodes->append(n);
}
void remove_macro_node(Node * n) {
// this function may be called twice for a node so check
// that the node is in the array before attempting to remove it
@@ -687,14 +689,27 @@
if (_expensive_nodes->contains(n)) {
_expensive_nodes->remove(n);
}
}
void add_predicate_opaq(Node * n) {
- assert(!_predicate_opaqs->contains(n), " duplicate entry in predicate opaque1");
+ assert(!_predicate_opaqs->contains(n), "duplicate entry in predicate opaque1");
assert(_macro_nodes->contains(n), "should have already been in macro list");
_predicate_opaqs->append(n);
}
+
+ // Range check dependent CastII nodes that can be removed after loop optimizations
+ void add_range_check_cast(Node* n);
+ void remove_range_check_cast(Node* n) {
+ if (_range_check_casts->contains(n)) {
+ _range_check_casts->remove(n);
+ }
+ }
+ Node* range_check_cast_node(int idx) const { return _range_check_casts->at(idx); }
+ int range_check_cast_count() const { return _range_check_casts->length(); }
+ // Remove all range check dependent CastIINodes.
+ void remove_range_check_casts(PhaseIterGVN &igvn);
+
// remove the opaque nodes that protect the predicates so that the unused checks and
// uncommon traps will be eliminated from the graph.
void cleanup_loop_predicates(PhaseIterGVN &igvn);
bool is_predicate_opaq(Node * n) {
return _predicate_opaqs->contains(n);
@@ -1199,10 +1214,13 @@
static void adlc_verification() PRODUCT_RETURN;
// Definitions of pd methods
static void pd_compiler2_init();
+ // Convert integer value to a narrowed long type dependent on ctrl (for example, a range check)
+ static Node* constrained_convI2L(PhaseGVN* phase, Node* value, const TypeInt* itype, Node* ctrl);
+
// Auxiliary method for randomized fuzzing/stressing
static bool randomized_select(int count);
};
#endif // SHARE_VM_OPTO_COMPILE_HPP
< prev index next >