135 !directive->is_intrinsic_disabled(method) &&
136 !vmIntrinsics::is_disabled_by_flags(method);
137 }
138
139 // Determines if an intrinsic is supported by the compiler, that is,
140 // the compiler provides the instructions necessary to generate
141 // the intrinsic code for method 'method'.
142 //
143 // The 'is_intrinsic_supported' method is a white list, that is,
144 // by default no intrinsics are supported by a compiler except
145 // the ones listed in the method. Overriding methods should conform
146 // to this behavior.
147 virtual bool is_intrinsic_supported(const methodHandle& method) {
148 return false;
149 }
150
151 // Compiler type queries.
152 const bool is_c1() { return _type == compiler_c1; }
153 const bool is_c2() { return _type == compiler_c2; }
154 const bool is_jvmci() { return _type == compiler_jvmci; }
155 const bool is_shark() { return _type == compiler_shark; }
156 const CompilerType type() { return _type; }
157
158 // Extra tests to identify trivial methods for the tiered compilation policy.
159 virtual bool is_trivial(Method* method) { return false; }
160
161 // Customization
162 virtual void initialize () = 0;
163
164 void set_num_compiler_threads(int num) { _num_compiler_threads = num; }
165 int num_compiler_threads() { return _num_compiler_threads; }
166
167 // Get/set state of compiler objects
168 bool is_initialized() { return _compiler_state == initialized; }
169 bool is_failed () { return _compiler_state == failed;}
170 void set_state (int state);
171 void set_shut_down () { set_state(shut_down); }
172 // Compilation entry point for methods
173 virtual void compile_method(ciEnv* env, ciMethod* target, int entry_bci, DirectiveSet* directive) {
174 ShouldNotReachHere();
175 }
|
135 !directive->is_intrinsic_disabled(method) &&
136 !vmIntrinsics::is_disabled_by_flags(method);
137 }
138
139 // Determines if an intrinsic is supported by the compiler, that is,
140 // the compiler provides the instructions necessary to generate
141 // the intrinsic code for method 'method'.
142 //
143 // The 'is_intrinsic_supported' method is a white list, that is,
144 // by default no intrinsics are supported by a compiler except
145 // the ones listed in the method. Overriding methods should conform
146 // to this behavior.
147 virtual bool is_intrinsic_supported(const methodHandle& method) {
148 return false;
149 }
150
151 // Compiler type queries.
152 const bool is_c1() { return _type == compiler_c1; }
153 const bool is_c2() { return _type == compiler_c2; }
154 const bool is_jvmci() { return _type == compiler_jvmci; }
155 const CompilerType type() { return _type; }
156
157 // Extra tests to identify trivial methods for the tiered compilation policy.
158 virtual bool is_trivial(Method* method) { return false; }
159
160 // Customization
161 virtual void initialize () = 0;
162
163 void set_num_compiler_threads(int num) { _num_compiler_threads = num; }
164 int num_compiler_threads() { return _num_compiler_threads; }
165
166 // Get/set state of compiler objects
167 bool is_initialized() { return _compiler_state == initialized; }
168 bool is_failed () { return _compiler_state == failed;}
169 void set_state (int state);
170 void set_shut_down () { set_state(shut_down); }
171 // Compilation entry point for methods
172 virtual void compile_method(ciEnv* env, ciMethod* target, int entry_bci, DirectiveSet* directive) {
173 ShouldNotReachHere();
174 }
|