comparison src/share/vm/opto/callGenerator.hpp @ 20804:7848fc12602b

Merge with jdk8u40-b25
author Gilles Duboscq <gilles.m.duboscq@oracle.com>
date Tue, 07 Apr 2015 14:58:49 +0200
parents 096c224171c4 411e30e5fbb8
children
comparison
equal deleted inserted replaced
20184:84105dcdb05b 20804:7848fc12602b
28 #include "compiler/compileBroker.hpp" 28 #include "compiler/compileBroker.hpp"
29 #include "opto/callnode.hpp" 29 #include "opto/callnode.hpp"
30 #include "opto/compile.hpp" 30 #include "opto/compile.hpp"
31 #include "opto/type.hpp" 31 #include "opto/type.hpp"
32 #include "runtime/deoptimization.hpp" 32 #include "runtime/deoptimization.hpp"
33
34 class Parse;
35 33
36 //---------------------------CallGenerator------------------------------------- 34 //---------------------------CallGenerator-------------------------------------
37 // The subclasses of this class handle generation of ideal nodes for 35 // The subclasses of this class handle generation of ideal nodes for
38 // call sites and method entry points. 36 // call sites and method entry points.
39 37
61 virtual bool is_parse() const { return false; } 59 virtual bool is_parse() const { return false; }
62 // is_virtual: The call uses the receiver type to select or check the method. 60 // is_virtual: The call uses the receiver type to select or check the method.
63 virtual bool is_virtual() const { return false; } 61 virtual bool is_virtual() const { return false; }
64 // is_deferred: The decision whether to inline or not is deferred. 62 // is_deferred: The decision whether to inline or not is deferred.
65 virtual bool is_deferred() const { return false; } 63 virtual bool is_deferred() const { return false; }
66 // is_predicted: Uses an explicit check against a predicted type. 64 // is_predicated: Uses an explicit check (predicate).
67 virtual bool is_predicted() const { return false; } 65 virtual bool is_predicated() const { return false; }
66 virtual int predicates_count() const { return 0; }
68 // is_trap: Does not return to the caller. (E.g., uncommon trap.) 67 // is_trap: Does not return to the caller. (E.g., uncommon trap.)
69 virtual bool is_trap() const { return false; } 68 virtual bool is_trap() const { return false; }
70 // does_virtual_dispatch: Should try inlining as normal method first. 69 // does_virtual_dispatch: Should try inlining as normal method first.
71 virtual bool does_virtual_dispatch() const { return false; } 70 virtual bool does_virtual_dispatch() const { return false; }
72 71
109 // If the call traps, the returned map must have a control edge of top. 108 // If the call traps, the returned map must have a control edge of top.
110 // If the call can throw, the returned map must report has_exceptions(). 109 // If the call can throw, the returned map must report has_exceptions().
111 // 110 //
112 // If the result is NULL, it means that this CallGenerator was unable 111 // If the result is NULL, it means that this CallGenerator was unable
113 // to handle the given call, and another CallGenerator should be consulted. 112 // to handle the given call, and another CallGenerator should be consulted.
114 virtual JVMState* generate(JVMState* jvms, Parse* parent_parser) = 0; 113 virtual JVMState* generate(JVMState* jvms) = 0;
115 114
116 // How to generate a call site that is inlined: 115 // How to generate a call site that is inlined:
117 static CallGenerator* for_inline(ciMethod* m, float expected_uses = -1); 116 static CallGenerator* for_inline(ciMethod* m, float expected_uses = -1);
118 // How to generate code for an on-stack replacement handler. 117 // How to generate code for an on-stack replacement handler.
119 static CallGenerator* for_osr(ciMethod* m, int osr_bci); 118 static CallGenerator* for_osr(ciMethod* m, int osr_bci);
155 Deoptimization::DeoptAction action); 154 Deoptimization::DeoptAction action);
156 155
157 // Registry for intrinsics: 156 // Registry for intrinsics:
158 static CallGenerator* for_intrinsic(ciMethod* m); 157 static CallGenerator* for_intrinsic(ciMethod* m);
159 static void register_intrinsic(ciMethod* m, CallGenerator* cg); 158 static void register_intrinsic(ciMethod* m, CallGenerator* cg);
160 static CallGenerator* for_predicted_intrinsic(CallGenerator* intrinsic, 159 static CallGenerator* for_predicated_intrinsic(CallGenerator* intrinsic,
161 CallGenerator* cg); 160 CallGenerator* cg);
162 virtual Node* generate_predicate(JVMState* jvms) { return NULL; }; 161 virtual Node* generate_predicate(JVMState* jvms, int predicate) { return NULL; };
163 162
164 virtual void print_inlining_late(const char* msg) { ShouldNotReachHere(); } 163 virtual void print_inlining_late(const char* msg) { ShouldNotReachHere(); }
165 164
166 static void print_inlining(Compile* C, ciMethod* callee, int inline_level, int bci, const char* msg) { 165 static void print_inlining(Compile* C, ciMethod* callee, int inline_level, int bci, const char* msg) {
167 if (C->print_inlining()) { 166 if (C->print_inlining()) {