838
839 // Helper functions to identify inlining potential at call-site
840 ciMethod* optimize_virtual_call(ciMethod* caller, int bci, ciInstanceKlass* klass,
841 ciMethod* callee, const TypeOopPtr* receiver_type,
842 bool is_virtual,
843 bool &call_does_dispatch, int &vtable_index);
844 ciMethod* optimize_inlining(ciMethod* caller, int bci, ciInstanceKlass* klass,
845 ciMethod* callee, const TypeOopPtr* receiver_type);
846
847 // Report if there were too many traps at a current method and bci.
848 // Report if a trap was recorded, and/or PerMethodTrapLimit was exceeded.
849 // If there is no MDO at all, report no trap unless told to assume it.
850 bool too_many_traps(ciMethod* method, int bci, Deoptimization::DeoptReason reason);
851 // This version, unspecific to a particular bci, asks if
852 // PerMethodTrapLimit was exceeded for all inlined methods seen so far.
853 bool too_many_traps(Deoptimization::DeoptReason reason,
854 // Privately used parameter for logging:
855 ciMethodData* logmd = NULL);
856 // Report if there were too many recompiles at a method and bci.
857 bool too_many_recompiles(ciMethod* method, int bci, Deoptimization::DeoptReason reason);
858
859 // Parsing, optimization
860 PhaseGVN* initial_gvn() { return _initial_gvn; }
861 Unique_Node_List* for_igvn() { return _for_igvn; }
862 inline void record_for_igvn(Node* n); // Body is after class Unique_Node_List.
863 void set_initial_gvn(PhaseGVN *gvn) { _initial_gvn = gvn; }
864 void set_for_igvn(Unique_Node_List *for_igvn) { _for_igvn = for_igvn; }
865
866 // Replace n by nn using initial_gvn, calling hash_delete and
867 // record_for_igvn as needed.
868 void gvn_replace_by(Node* n, Node* nn);
869
870
871 void identify_useful_nodes(Unique_Node_List &useful);
872 void update_dead_node_list(Unique_Node_List &useful);
873 void remove_useless_nodes (Unique_Node_List &useful);
874
875 WarmCallInfo* warm_calls() const { return _warm_calls; }
876 void set_warm_calls(WarmCallInfo* l) { _warm_calls = l; }
877 WarmCallInfo* pop_warm_call();
|
838
839 // Helper functions to identify inlining potential at call-site
840 ciMethod* optimize_virtual_call(ciMethod* caller, int bci, ciInstanceKlass* klass,
841 ciMethod* callee, const TypeOopPtr* receiver_type,
842 bool is_virtual,
843 bool &call_does_dispatch, int &vtable_index);
844 ciMethod* optimize_inlining(ciMethod* caller, int bci, ciInstanceKlass* klass,
845 ciMethod* callee, const TypeOopPtr* receiver_type);
846
847 // Report if there were too many traps at a current method and bci.
848 // Report if a trap was recorded, and/or PerMethodTrapLimit was exceeded.
849 // If there is no MDO at all, report no trap unless told to assume it.
850 bool too_many_traps(ciMethod* method, int bci, Deoptimization::DeoptReason reason);
851 // This version, unspecific to a particular bci, asks if
852 // PerMethodTrapLimit was exceeded for all inlined methods seen so far.
853 bool too_many_traps(Deoptimization::DeoptReason reason,
854 // Privately used parameter for logging:
855 ciMethodData* logmd = NULL);
856 // Report if there were too many recompiles at a method and bci.
857 bool too_many_recompiles(ciMethod* method, int bci, Deoptimization::DeoptReason reason);
858 // Return a bitset with the reasons where deoptimization is allowed,
859 // i.e., where there were not too many uncommon traps.
860 int _allowed_reasons;
861 int allowed_deopt_reasons() { return _allowed_reasons; }
862 void set_allowed_deopt_reasons();
863
864 // Parsing, optimization
865 PhaseGVN* initial_gvn() { return _initial_gvn; }
866 Unique_Node_List* for_igvn() { return _for_igvn; }
867 inline void record_for_igvn(Node* n); // Body is after class Unique_Node_List.
868 void set_initial_gvn(PhaseGVN *gvn) { _initial_gvn = gvn; }
869 void set_for_igvn(Unique_Node_List *for_igvn) { _for_igvn = for_igvn; }
870
871 // Replace n by nn using initial_gvn, calling hash_delete and
872 // record_for_igvn as needed.
873 void gvn_replace_by(Node* n, Node* nn);
874
875
876 void identify_useful_nodes(Unique_Node_List &useful);
877 void update_dead_node_list(Unique_Node_List &useful);
878 void remove_useless_nodes (Unique_Node_List &useful);
879
880 WarmCallInfo* warm_calls() const { return _warm_calls; }
881 void set_warm_calls(WarmCallInfo* l) { _warm_calls = l; }
882 WarmCallInfo* pop_warm_call();
|