src/share/vm/opto/graphKit.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/opto

src/share/vm/opto/graphKit.hpp

Print this page
rev 10072 : 8087341: C2 doesn't optimize redundant memory operations with G1
Summary: effect of memory barrier in post barrier is too wide
Reviewed-by:


 817                           Node* parm4 = NULL, Node* parm5 = NULL,
 818                           Node* parm6 = NULL, Node* parm7 = NULL);
 819   enum {  // flag values for make_runtime_call
 820     RC_NO_FP = 1,               // CallLeafNoFPNode
 821     RC_NO_IO = 2,               // do not hook IO edges
 822     RC_NO_LEAF = 4,             // CallStaticJavaNode
 823     RC_MUST_THROW = 8,          // flag passed to add_safepoint_edges
 824     RC_NARROW_MEM = 16,         // input memory is same as output
 825     RC_UNCOMMON = 32,           // freq. expected to be like uncommon trap
 826     RC_LEAF = 0                 // null value:  no flags set
 827   };
 828 
 829   // merge in all memory slices from new_mem, along the given path
 830   void merge_memory(Node* new_mem, Node* region, int new_path);
 831   void make_slow_call_ex(Node* call, ciInstanceKlass* ex_klass, bool separate_io_proj, bool deoptimize = false);
 832 
 833   // Helper functions to build synchronizations
 834   int next_monitor();
 835   Node* insert_mem_bar(int opcode, Node* precedent = NULL);
 836   Node* insert_mem_bar_volatile(int opcode, int alias_idx, Node* precedent = NULL);

 837   // Optional 'precedent' is appended as an extra edge, to force ordering.
 838   FastLockNode* shared_lock(Node* obj);
 839   void shared_unlock(Node* box, Node* obj);
 840 
 841   // helper functions for the fast path/slow path idioms
 842   Node* fast_and_slow(Node* in, const Type *result_type, Node* null_result, IfNode* fast_test, Node* fast_result, address slow_call, const TypeFunc *slow_call_type, Node* slow_arg, Klass* ex_klass, Node* slow_result);
 843 
 844   // Generate an instance-of idiom.  Used by both the instance-of bytecode
 845   // and the reflective instance-of call.
 846   Node* gen_instanceof(Node *subobj, Node* superkls, bool safe_for_replace = false);
 847 
 848   // Generate a check-cast idiom.  Used by both the check-cast bytecode
 849   // and the array-store bytecode
 850   Node* gen_checkcast( Node *subobj, Node* superkls,
 851                        Node* *failure_control = NULL );
 852 
 853   Node* gen_subtype_check(Node* subklass, Node* superklass) {
 854     MergeMemNode* mem = merged_memory();
 855     Node* ctrl = control();
 856     Node* n = Phase::gen_subtype_check(subklass, superklass, &ctrl, mem, &_gvn);




 817                           Node* parm4 = NULL, Node* parm5 = NULL,
 818                           Node* parm6 = NULL, Node* parm7 = NULL);
 819   enum {  // flag values for make_runtime_call
 820     RC_NO_FP = 1,               // CallLeafNoFPNode
 821     RC_NO_IO = 2,               // do not hook IO edges
 822     RC_NO_LEAF = 4,             // CallStaticJavaNode
 823     RC_MUST_THROW = 8,          // flag passed to add_safepoint_edges
 824     RC_NARROW_MEM = 16,         // input memory is same as output
 825     RC_UNCOMMON = 32,           // freq. expected to be like uncommon trap
 826     RC_LEAF = 0                 // null value:  no flags set
 827   };
 828 
 829   // merge in all memory slices from new_mem, along the given path
 830   void merge_memory(Node* new_mem, Node* region, int new_path);
 831   void make_slow_call_ex(Node* call, ciInstanceKlass* ex_klass, bool separate_io_proj, bool deoptimize = false);
 832 
 833   // Helper functions to build synchronizations
 834   int next_monitor();
 835   Node* insert_mem_bar(int opcode, Node* precedent = NULL);
 836   Node* insert_mem_bar_volatile(int opcode, int alias_idx, Node* precedent = NULL);
 837   void insert_store_load_for_barrier();
 838   // Optional 'precedent' is appended as an extra edge, to force ordering.
 839   FastLockNode* shared_lock(Node* obj);
 840   void shared_unlock(Node* box, Node* obj);
 841 
 842   // helper functions for the fast path/slow path idioms
 843   Node* fast_and_slow(Node* in, const Type *result_type, Node* null_result, IfNode* fast_test, Node* fast_result, address slow_call, const TypeFunc *slow_call_type, Node* slow_arg, Klass* ex_klass, Node* slow_result);
 844 
 845   // Generate an instance-of idiom.  Used by both the instance-of bytecode
 846   // and the reflective instance-of call.
 847   Node* gen_instanceof(Node *subobj, Node* superkls, bool safe_for_replace = false);
 848 
 849   // Generate a check-cast idiom.  Used by both the check-cast bytecode
 850   // and the array-store bytecode
 851   Node* gen_checkcast( Node *subobj, Node* superkls,
 852                        Node* *failure_control = NULL );
 853 
 854   Node* gen_subtype_check(Node* subklass, Node* superklass) {
 855     MergeMemNode* mem = merged_memory();
 856     Node* ctrl = control();
 857     Node* n = Phase::gen_subtype_check(subklass, superklass, &ctrl, mem, &_gvn);


src/share/vm/opto/graphKit.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File