comparison src/share/vm/opto/memnode.hpp @ 4815:53a127075045

7131302: connode.cpp:205 Error: ShouldNotReachHere() Summary: Add Value() methods to short and byte Load nodes to truncate constants which does not fit. Reviewed-by: jrose
author kvn
date Fri, 20 Jan 2012 09:43:06 -0800
parents 1dc233a8c7fe
children 8b0a4867acf0
comparison
equal deleted inserted replaced
4810:50d9b7a0072c 4815:53a127075045
213 LoadBNode( Node *c, Node *mem, Node *adr, const TypePtr* at, const TypeInt *ti = TypeInt::BYTE ) 213 LoadBNode( Node *c, Node *mem, Node *adr, const TypePtr* at, const TypeInt *ti = TypeInt::BYTE )
214 : LoadNode(c,mem,adr,at,ti) {} 214 : LoadNode(c,mem,adr,at,ti) {}
215 virtual int Opcode() const; 215 virtual int Opcode() const;
216 virtual uint ideal_reg() const { return Op_RegI; } 216 virtual uint ideal_reg() const { return Op_RegI; }
217 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); 217 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
218 virtual const Type *Value(PhaseTransform *phase) const;
218 virtual int store_Opcode() const { return Op_StoreB; } 219 virtual int store_Opcode() const { return Op_StoreB; }
219 virtual BasicType memory_type() const { return T_BYTE; } 220 virtual BasicType memory_type() const { return T_BYTE; }
220 }; 221 };
221 222
222 //------------------------------LoadUBNode------------------------------------- 223 //------------------------------LoadUBNode-------------------------------------
226 LoadUBNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt* ti = TypeInt::UBYTE ) 227 LoadUBNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt* ti = TypeInt::UBYTE )
227 : LoadNode(c, mem, adr, at, ti) {} 228 : LoadNode(c, mem, adr, at, ti) {}
228 virtual int Opcode() const; 229 virtual int Opcode() const;
229 virtual uint ideal_reg() const { return Op_RegI; } 230 virtual uint ideal_reg() const { return Op_RegI; }
230 virtual Node* Ideal(PhaseGVN *phase, bool can_reshape); 231 virtual Node* Ideal(PhaseGVN *phase, bool can_reshape);
232 virtual const Type *Value(PhaseTransform *phase) const;
231 virtual int store_Opcode() const { return Op_StoreB; } 233 virtual int store_Opcode() const { return Op_StoreB; }
232 virtual BasicType memory_type() const { return T_BYTE; } 234 virtual BasicType memory_type() const { return T_BYTE; }
233 }; 235 };
234 236
235 //------------------------------LoadUSNode------------------------------------- 237 //------------------------------LoadUSNode-------------------------------------
239 LoadUSNode( Node *c, Node *mem, Node *adr, const TypePtr* at, const TypeInt *ti = TypeInt::CHAR ) 241 LoadUSNode( Node *c, Node *mem, Node *adr, const TypePtr* at, const TypeInt *ti = TypeInt::CHAR )
240 : LoadNode(c,mem,adr,at,ti) {} 242 : LoadNode(c,mem,adr,at,ti) {}
241 virtual int Opcode() const; 243 virtual int Opcode() const;
242 virtual uint ideal_reg() const { return Op_RegI; } 244 virtual uint ideal_reg() const { return Op_RegI; }
243 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); 245 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
246 virtual const Type *Value(PhaseTransform *phase) const;
244 virtual int store_Opcode() const { return Op_StoreC; } 247 virtual int store_Opcode() const { return Op_StoreC; }
245 virtual BasicType memory_type() const { return T_CHAR; } 248 virtual BasicType memory_type() const { return T_CHAR; }
249 };
250
251 //------------------------------LoadSNode--------------------------------------
252 // Load a short (16bits signed) from memory
253 class LoadSNode : public LoadNode {
254 public:
255 LoadSNode( Node *c, Node *mem, Node *adr, const TypePtr* at, const TypeInt *ti = TypeInt::SHORT )
256 : LoadNode(c,mem,adr,at,ti) {}
257 virtual int Opcode() const;
258 virtual uint ideal_reg() const { return Op_RegI; }
259 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
260 virtual const Type *Value(PhaseTransform *phase) const;
261 virtual int store_Opcode() const { return Op_StoreC; }
262 virtual BasicType memory_type() const { return T_SHORT; }
246 }; 263 };
247 264
248 //------------------------------LoadINode-------------------------------------- 265 //------------------------------LoadINode--------------------------------------
249 // Load an integer from memory 266 // Load an integer from memory
250 class LoadINode : public LoadNode { 267 class LoadINode : public LoadNode {
430 virtual const Type *Value( PhaseTransform *phase ) const; 447 virtual const Type *Value( PhaseTransform *phase ) const;
431 virtual Node *Identity( PhaseTransform *phase ); 448 virtual Node *Identity( PhaseTransform *phase );
432 virtual bool depends_only_on_test() const { return true; } 449 virtual bool depends_only_on_test() const { return true; }
433 }; 450 };
434 451
435
436 //------------------------------LoadSNode--------------------------------------
437 // Load a short (16bits signed) from memory
438 class LoadSNode : public LoadNode {
439 public:
440 LoadSNode( Node *c, Node *mem, Node *adr, const TypePtr* at, const TypeInt *ti = TypeInt::SHORT )
441 : LoadNode(c,mem,adr,at,ti) {}
442 virtual int Opcode() const;
443 virtual uint ideal_reg() const { return Op_RegI; }
444 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
445 virtual int store_Opcode() const { return Op_StoreC; }
446 virtual BasicType memory_type() const { return T_SHORT; }
447 };
448 452
449 //------------------------------StoreNode-------------------------------------- 453 //------------------------------StoreNode--------------------------------------
450 // Store value; requires Store, Address and Value 454 // Store value; requires Store, Address and Value
451 class StoreNode : public MemNode { 455 class StoreNode : public MemNode {
452 protected: 456 protected: