160 bool is_c1() { return _type == c1; }
161 bool is_c2() { return _type == c2; }
162 bool is_jvmci() { return _type == jvmci; }
163 bool is_shark() { return _type == shark; }
164
165 // Extra tests to identify trivial methods for the tiered compilation policy.
166 virtual bool is_trivial(Method* method) { return false; }
167
168 // Customization
169 virtual void initialize () = 0;
170
171 void set_num_compiler_threads(int num) { _num_compiler_threads = num; }
172 int num_compiler_threads() { return _num_compiler_threads; }
173
174 // Get/set state of compiler objects
175 bool is_initialized() { return _compiler_state == initialized; }
176 bool is_failed () { return _compiler_state == failed;}
177 void set_state (int state);
178 void set_shut_down () { set_state(shut_down); }
179 // Compilation entry point for methods
180 virtual void compile_method(ciEnv* env, ciMethod* target, int entry_bci, DirectiveSet* directive) {
181 ShouldNotReachHere();
182 }
183
184
185 // Print compilation timers and statistics
186 virtual void print_timers() {
187 ShouldNotReachHere();
188 }
189
190 #if INCLUDE_JVMCI
191 CompilerStatistics* stats() { return &_stats; }
192 #endif
193 };
194
195 #endif // SHARE_VM_COMPILER_ABSTRACTCOMPILER_HPP
|
160 bool is_c1() { return _type == c1; }
161 bool is_c2() { return _type == c2; }
162 bool is_jvmci() { return _type == jvmci; }
163 bool is_shark() { return _type == shark; }
164
165 // Extra tests to identify trivial methods for the tiered compilation policy.
166 virtual bool is_trivial(Method* method) { return false; }
167
168 // Customization
169 virtual void initialize () = 0;
170
171 void set_num_compiler_threads(int num) { _num_compiler_threads = num; }
172 int num_compiler_threads() { return _num_compiler_threads; }
173
174 // Get/set state of compiler objects
175 bool is_initialized() { return _compiler_state == initialized; }
176 bool is_failed () { return _compiler_state == failed;}
177 void set_state (int state);
178 void set_shut_down () { set_state(shut_down); }
179 // Compilation entry point for methods
180 virtual void compile_method(ciEnv* env, ciMethod* target, int entry_bci) {
181 ShouldNotReachHere();
182 }
183
184
185 // Print compilation timers and statistics
186 virtual void print_timers() {
187 ShouldNotReachHere();
188 }
189
190 #if INCLUDE_JVMCI
191 CompilerStatistics* stats() { return &_stats; }
192 #endif
193 };
194
195 #endif // SHARE_VM_COMPILER_ABSTRACTCOMPILER_HPP
|