Mercurial > hg > graal-compiler
comparison src/share/vm/opto/memnode.hpp @ 14435:da862781b584
Merge
author | kvn |
---|---|
date | Thu, 21 Nov 2013 12:30:35 -0800 |
parents | 2113136690bc 94a83e0f9ce1 |
children | 50fdb38839eb |
comparison
equal
deleted
inserted
replaced
14434:318d0622a6d7 | 14435:da862781b584 |
---|---|
218 static bool is_immutable_value(Node* adr); | 218 static bool is_immutable_value(Node* adr); |
219 #endif | 219 #endif |
220 protected: | 220 protected: |
221 const Type* load_array_final_field(const TypeKlassPtr *tkls, | 221 const Type* load_array_final_field(const TypeKlassPtr *tkls, |
222 ciKlass* klass) const; | 222 ciKlass* klass) const; |
223 // depends_only_on_test is almost always true, and needs to be almost always | |
224 // true to enable key hoisting & commoning optimizations. However, for the | |
225 // special case of RawPtr loads from TLS top & end, and other loads performed by | |
226 // GC barriers, the control edge carries the dependence preventing hoisting past | |
227 // a Safepoint instead of the memory edge. (An unfortunate consequence of having | |
228 // Safepoints not set Raw Memory; itself an unfortunate consequence of having Nodes | |
229 // which produce results (new raw memory state) inside of loops preventing all | |
230 // manner of other optimizations). Basically, it's ugly but so is the alternative. | |
231 // See comment in macro.cpp, around line 125 expand_allocate_common(). | |
232 virtual bool depends_only_on_test() const { return adr_type() != TypeRawPtr::BOTTOM; } | |
233 | |
223 }; | 234 }; |
224 | 235 |
225 //------------------------------LoadBNode-------------------------------------- | 236 //------------------------------LoadBNode-------------------------------------- |
226 // Load a byte (8bits signed) from memory | 237 // Load a byte (8bits signed) from memory |
227 class LoadBNode : public LoadNode { | 238 class LoadBNode : public LoadNode { |
382 : LoadNode(c, mem, adr, at, t, mo) {} | 393 : LoadNode(c, mem, adr, at, t, mo) {} |
383 virtual int Opcode() const; | 394 virtual int Opcode() const; |
384 virtual uint ideal_reg() const { return Op_RegP; } | 395 virtual uint ideal_reg() const { return Op_RegP; } |
385 virtual int store_Opcode() const { return Op_StoreP; } | 396 virtual int store_Opcode() const { return Op_StoreP; } |
386 virtual BasicType memory_type() const { return T_ADDRESS; } | 397 virtual BasicType memory_type() const { return T_ADDRESS; } |
387 // depends_only_on_test is almost always true, and needs to be almost always | |
388 // true to enable key hoisting & commoning optimizations. However, for the | |
389 // special case of RawPtr loads from TLS top & end, the control edge carries | |
390 // the dependence preventing hoisting past a Safepoint instead of the memory | |
391 // edge. (An unfortunate consequence of having Safepoints not set Raw | |
392 // Memory; itself an unfortunate consequence of having Nodes which produce | |
393 // results (new raw memory state) inside of loops preventing all manner of | |
394 // other optimizations). Basically, it's ugly but so is the alternative. | |
395 // See comment in macro.cpp, around line 125 expand_allocate_common(). | |
396 virtual bool depends_only_on_test() const { return adr_type() != TypeRawPtr::BOTTOM; } | |
397 }; | 398 }; |
398 | 399 |
399 | 400 |
400 //------------------------------LoadNNode-------------------------------------- | 401 //------------------------------LoadNNode-------------------------------------- |
401 // Load a narrow oop from memory (either object or array) | 402 // Load a narrow oop from memory (either object or array) |
405 : LoadNode(c, mem, adr, at, t, mo) {} | 406 : LoadNode(c, mem, adr, at, t, mo) {} |
406 virtual int Opcode() const; | 407 virtual int Opcode() const; |
407 virtual uint ideal_reg() const { return Op_RegN; } | 408 virtual uint ideal_reg() const { return Op_RegN; } |
408 virtual int store_Opcode() const { return Op_StoreN; } | 409 virtual int store_Opcode() const { return Op_StoreN; } |
409 virtual BasicType memory_type() const { return T_NARROWOOP; } | 410 virtual BasicType memory_type() const { return T_NARROWOOP; } |
410 // depends_only_on_test is almost always true, and needs to be almost always | |
411 // true to enable key hoisting & commoning optimizations. However, for the | |
412 // special case of RawPtr loads from TLS top & end, the control edge carries | |
413 // the dependence preventing hoisting past a Safepoint instead of the memory | |
414 // edge. (An unfortunate consequence of having Safepoints not set Raw | |
415 // Memory; itself an unfortunate consequence of having Nodes which produce | |
416 // results (new raw memory state) inside of loops preventing all manner of | |
417 // other optimizations). Basically, it's ugly but so is the alternative. | |
418 // See comment in macro.cpp, around line 125 expand_allocate_common(). | |
419 virtual bool depends_only_on_test() const { return adr_type() != TypeRawPtr::BOTTOM; } | |
420 }; | 411 }; |
421 | 412 |
422 //------------------------------LoadKlassNode---------------------------------- | 413 //------------------------------LoadKlassNode---------------------------------- |
423 // Load a Klass from an object | 414 // Load a Klass from an object |
424 class LoadKlassNode : public LoadPNode { | 415 class LoadKlassNode : public LoadPNode { |