src/share/vm/opto/compile.hpp

changeset 8285
535618ab1c04
parent 7792
99edc344d77c
child 8604
04d83ba48607
child 8654
2e734e824d16
     1.1 --- a/src/share/vm/opto/compile.hpp	Mon Jan 25 08:46:19 2016 +0000
     1.2 +++ b/src/share/vm/opto/compile.hpp	Wed Jan 27 09:02:51 2016 +0100
     1.3 @@ -75,6 +75,7 @@
     1.4  class JVMState;
     1.5  class Type;
     1.6  class TypeData;
     1.7 +class TypeInt;
     1.8  class TypePtr;
     1.9  class TypeOopPtr;
    1.10  class TypeFunc;
    1.11 @@ -334,6 +335,7 @@
    1.12    GrowableArray<Node*>* _macro_nodes;           // List of nodes which need to be expanded before matching.
    1.13    GrowableArray<Node*>* _predicate_opaqs;       // List of Opaque1 nodes for the loop predicates.
    1.14    GrowableArray<Node*>* _expensive_nodes;       // List of nodes that are expensive to compute and that we'd better not let the GVN freely common
    1.15 +  GrowableArray<Node*>* _range_check_casts;     // List of CastII nodes with a range check dependency
    1.16    ConnectionGraph*      _congraph;
    1.17  #ifndef PRODUCT
    1.18    IdealGraphPrinter*    _printer;
    1.19 @@ -669,7 +671,7 @@
    1.20    void set_congraph(ConnectionGraph* congraph)  { _congraph = congraph;}
    1.21    void add_macro_node(Node * n) {
    1.22      //assert(n->is_macro(), "must be a macro node");
    1.23 -    assert(!_macro_nodes->contains(n), " duplicate entry in expand list");
    1.24 +    assert(!_macro_nodes->contains(n), "duplicate entry in expand list");
    1.25      _macro_nodes->append(n);
    1.26    }
    1.27    void remove_macro_node(Node * n) {
    1.28 @@ -689,10 +691,23 @@
    1.29      }
    1.30    }
    1.31    void add_predicate_opaq(Node * n) {
    1.32 -    assert(!_predicate_opaqs->contains(n), " duplicate entry in predicate opaque1");
    1.33 +    assert(!_predicate_opaqs->contains(n), "duplicate entry in predicate opaque1");
    1.34      assert(_macro_nodes->contains(n), "should have already been in macro list");
    1.35      _predicate_opaqs->append(n);
    1.36    }
    1.37 +
    1.38 +  // Range check dependent CastII nodes that can be removed after loop optimizations
    1.39 +  void add_range_check_cast(Node* n);
    1.40 +  void remove_range_check_cast(Node* n) {
    1.41 +    if (_range_check_casts->contains(n)) {
    1.42 +      _range_check_casts->remove(n);
    1.43 +    }
    1.44 +  }
    1.45 +  Node* range_check_cast_node(int idx) const { return _range_check_casts->at(idx);  }
    1.46 +  int   range_check_cast_count()       const { return _range_check_casts->length(); }
    1.47 +  // Remove all range check dependent CastIINodes.
    1.48 +  void  remove_range_check_casts(PhaseIterGVN &igvn);
    1.49 +
    1.50    // remove the opaque nodes that protect the predicates so that the unused checks and
    1.51    // uncommon traps will be eliminated from the graph.
    1.52    void cleanup_loop_predicates(PhaseIterGVN &igvn);
    1.53 @@ -1201,6 +1216,9 @@
    1.54    // Definitions of pd methods
    1.55    static void pd_compiler2_init();
    1.56  
    1.57 +  // Convert integer value to a narrowed long type dependent on ctrl (for example, a range check)
    1.58 +  static Node* constrained_convI2L(PhaseGVN* phase, Node* value, const TypeInt* itype, Node* ctrl);
    1.59 +
    1.60    // Auxiliary method for randomized fuzzing/stressing
    1.61    static bool randomized_select(int count);
    1.62  };

mercurial