comparison src/share/vm/opto/subnode.hpp @ 17936:968a17f18337

8042786: Proper fix for 8032566 Summary: Check for overflow cases in range checks and collapse it if we can. Reviewed-by: jrose, iveresov
author kvn
date Fri, 16 May 2014 12:05:14 -0700
parents 55fb97c4c58d
children 52b4284cb496 5b8e0f84f00f
comparison
equal deleted inserted replaced
17935:7384f6a12fc1 17936:968a17f18337
48 virtual Node *Identity( PhaseTransform *phase ); 48 virtual Node *Identity( PhaseTransform *phase );
49 49
50 // Compute a new Type for this node. Basically we just do the pre-check, 50 // Compute a new Type for this node. Basically we just do the pre-check,
51 // then call the virtual add() to set the type. 51 // then call the virtual add() to set the type.
52 virtual const Type *Value( PhaseTransform *phase ) const; 52 virtual const Type *Value( PhaseTransform *phase ) const;
53 const Type* Value_common( PhaseTransform *phase ) const;
53 54
54 // Supplied function returns the subtractend of the inputs. 55 // Supplied function returns the subtractend of the inputs.
55 // This also type-checks the inputs for sanity. Guaranteed never to 56 // This also type-checks the inputs for sanity. Guaranteed never to
56 // be passed a TOP or BOTTOM type, these are filtered out by a pre-check. 57 // be passed a TOP or BOTTOM type, these are filtered out by a pre-check.
57 virtual const Type *sub( const Type *, const Type * ) const = 0; 58 virtual const Type *sub( const Type *, const Type * ) const = 0;
156 class CmpUNode : public CmpNode { 157 class CmpUNode : public CmpNode {
157 public: 158 public:
158 CmpUNode( Node *in1, Node *in2 ) : CmpNode(in1,in2) {} 159 CmpUNode( Node *in1, Node *in2 ) : CmpNode(in1,in2) {}
159 virtual int Opcode() const; 160 virtual int Opcode() const;
160 virtual const Type *sub( const Type *, const Type * ) const; 161 virtual const Type *sub( const Type *, const Type * ) const;
162 const Type *Value( PhaseTransform *phase ) const;
161 bool is_index_range_check() const; 163 bool is_index_range_check() const;
162 }; 164 };
163 165
164 //------------------------------CmpPNode--------------------------------------- 166 //------------------------------CmpPNode---------------------------------------
165 // Compare 2 pointer values, returning condition codes (-1, 0 or 1). 167 // Compare 2 pointer values, returning condition codes (-1, 0 or 1).