src/share/vm/opto/cfgnode.hpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
hotspot Cdiff src/share/vm/opto/cfgnode.hpp
src/share/vm/opto/cfgnode.hpp
Print this page
rev 7999 : 8073480: C2 should optimize explicit range checks
Summary: explicit range checks should be recognized by C2
Reviewed-by:
*** 261,270 ****
--- 261,294 ----
// Output selected Control, based on a boolean test
class IfNode : public MultiBranchNode {
// Size is bigger to hold the probability field. However, _prob does not
// change the semantics so it does not appear in the hash & cmp functions.
virtual uint size_of() const { return sizeof(*this); }
+
+ private:
+ ProjNode* range_check_trap_proj(int& flip, Node*& l, Node*& r);
+ ProjNode* range_check_trap_proj() {
+ int flip_test = 0;
+ Node* l = NULL;
+ Node* r = NULL;
+ return range_check_trap_proj(flip_test, l, r);
+ }
+
+ // Helper methods for fold_compares
+ bool cmpi_folds(PhaseIterGVN* igvn);
+ bool is_ctrl_folds(Node* ctrl, PhaseIterGVN* igvn);
+ bool has_shared_region(ProjNode* proj, ProjNode*& success, ProjNode*& fail);
+ bool has_only_uncommon_traps(ProjNode* proj, ProjNode*& success, ProjNode*& fail, PhaseIterGVN* igvn);
+ static void merge_uncommon_traps(ProjNode* proj, ProjNode* success, ProjNode* fail, PhaseIterGVN* igvn);
+ static void improve_address_types(Node* l, Node* r, ProjNode* fail, PhaseIterGVN* igvn);
+ bool is_cmp_with_loadrange(ProjNode* proj);
+ bool is_null_check(ProjNode* proj, PhaseIterGVN* igvn);
+ bool is_side_effect_free_test(ProjNode* proj, PhaseIterGVN* igvn);
+ void reroute_side_effect_free_unc(ProjNode* proj, ProjNode* dom_proj, PhaseIterGVN* igvn);
+ ProjNode* uncommon_trap_proj(CallStaticJavaNode*& call) const;
+ bool fold_compares_helper(ProjNode* proj, ProjNode* success, ProjNode* fail, PhaseIterGVN* igvn);
+
public:
// Degrees of branch prediction probability by order of magnitude:
// PROB_UNLIKELY_1e(N) is a 1 in 1eN chance.
// PROB_LIKELY_1e(N) is a 1 - PROB_UNLIKELY_1e(N)
*** 346,356 ****
virtual const Type *Value( PhaseTransform *phase ) const;
virtual int required_outcnt() const { return 2; }
virtual const RegMask &out_RegMask() const;
void dominated_by(Node* prev_dom, PhaseIterGVN* igvn);
int is_range_check(Node* &range, Node* &index, jint &offset);
! Node* fold_compares(PhaseGVN* phase);
static Node* up_one_dom(Node* curr, bool linear_only = false);
// Takes the type of val and filters it through the test represented
// by if_proj and returns a more refined type if one is produced.
// Returns NULL is it couldn't improve the type.
--- 370,380 ----
virtual const Type *Value( PhaseTransform *phase ) const;
virtual int required_outcnt() const { return 2; }
virtual const RegMask &out_RegMask() const;
void dominated_by(Node* prev_dom, PhaseIterGVN* igvn);
int is_range_check(Node* &range, Node* &index, jint &offset);
! Node* fold_compares(PhaseIterGVN* phase);
static Node* up_one_dom(Node* curr, bool linear_only = false);
// Takes the type of val and filters it through the test represented
// by if_proj and returns a more refined type if one is produced.
// Returns NULL is it couldn't improve the type.
src/share/vm/opto/cfgnode.hpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File