Mercurial > hg > graal-compiler
comparison src/share/vm/opto/callnode.hpp @ 20327:411e30e5fbb8
8026796: Make replace_in_map() on parent maps generic
Summary: propagate node replacements along control flow edges to callers
Reviewed-by: kvn, vlivanov
author | roland |
---|---|
date | Wed, 13 Aug 2014 11:00:22 +0200 |
parents | 0bf37f737702 |
children | 7848fc12602b |
comparison
equal
deleted
inserted
replaced
20326:da00a41842a5 | 20327:411e30e5fbb8 |
---|---|
28 #include "opto/connode.hpp" | 28 #include "opto/connode.hpp" |
29 #include "opto/mulnode.hpp" | 29 #include "opto/mulnode.hpp" |
30 #include "opto/multnode.hpp" | 30 #include "opto/multnode.hpp" |
31 #include "opto/opcodes.hpp" | 31 #include "opto/opcodes.hpp" |
32 #include "opto/phaseX.hpp" | 32 #include "opto/phaseX.hpp" |
33 #include "opto/replacednodes.hpp" | |
33 #include "opto/type.hpp" | 34 #include "opto/type.hpp" |
34 | 35 |
35 // Portions of code courtesy of Clifford Click | 36 // Portions of code courtesy of Clifford Click |
36 | 37 |
37 // Optimization - Graph Style | 38 // Optimization - Graph Style |
333 } | 334 } |
334 | 335 |
335 OopMap* _oop_map; // Array of OopMap info (8-bit char) for GC | 336 OopMap* _oop_map; // Array of OopMap info (8-bit char) for GC |
336 JVMState* const _jvms; // Pointer to list of JVM State objects | 337 JVMState* const _jvms; // Pointer to list of JVM State objects |
337 const TypePtr* _adr_type; // What type of memory does this node produce? | 338 const TypePtr* _adr_type; // What type of memory does this node produce? |
339 ReplacedNodes _replaced_nodes; // During parsing: list of pair of nodes from calls to GraphKit::replace_in_map() | |
338 | 340 |
339 // Many calls take *all* of memory as input, | 341 // Many calls take *all* of memory as input, |
340 // but some produce a limited subset of that memory as output. | 342 // but some produce a limited subset of that memory as output. |
341 // The adr_type reports the call's behavior as a store, not a load. | 343 // The adr_type reports the call's behavior as a store, not a load. |
342 | 344 |
423 // This feature is used only for safepoints which serve as "maps" | 425 // This feature is used only for safepoints which serve as "maps" |
424 // for JVM states during parsing, intrinsic expansion, etc. | 426 // for JVM states during parsing, intrinsic expansion, etc. |
425 SafePointNode* next_exception() const; | 427 SafePointNode* next_exception() const; |
426 void set_next_exception(SafePointNode* n); | 428 void set_next_exception(SafePointNode* n); |
427 bool has_exceptions() const { return next_exception() != NULL; } | 429 bool has_exceptions() const { return next_exception() != NULL; } |
430 | |
431 // Helper methods to operate on replaced nodes | |
432 ReplacedNodes replaced_nodes() const { | |
433 return _replaced_nodes; | |
434 } | |
435 | |
436 void set_replaced_nodes(ReplacedNodes replaced_nodes) { | |
437 _replaced_nodes = replaced_nodes; | |
438 } | |
439 | |
440 void clone_replaced_nodes() { | |
441 _replaced_nodes.clone(); | |
442 } | |
443 void record_replaced_node(Node* initial, Node* improved) { | |
444 _replaced_nodes.record(initial, improved); | |
445 } | |
446 void transfer_replaced_nodes_from(SafePointNode* sfpt, uint idx = 0) { | |
447 _replaced_nodes.transfer_from(sfpt->_replaced_nodes, idx); | |
448 } | |
449 void delete_replaced_nodes() { | |
450 _replaced_nodes.reset(); | |
451 } | |
452 void apply_replaced_nodes() { | |
453 _replaced_nodes.apply(this); | |
454 } | |
455 void merge_replaced_nodes_with(SafePointNode* sfpt) { | |
456 _replaced_nodes.merge_with(sfpt->_replaced_nodes); | |
457 } | |
458 bool has_replaced_nodes() const { | |
459 return !_replaced_nodes.is_empty(); | |
460 } | |
428 | 461 |
429 // Standard Node stuff | 462 // Standard Node stuff |
430 virtual int Opcode() const; | 463 virtual int Opcode() const; |
431 virtual bool pinned() const { return true; } | 464 virtual bool pinned() const { return true; } |
432 virtual const Type *Value( PhaseTransform *phase ) const; | 465 virtual const Type *Value( PhaseTransform *phase ) const; |