145 } 146 147 // Determines if an intrinsic is supported by the compiler, that is, 148 // the compiler provides the instructions necessary to generate 149 // the intrinsic code for method 'method'. 150 // 151 // The 'is_intrinsic_supported' method is a white list, that is, 152 // by default no intrinsics are supported by a compiler except 153 // the ones listed in the method. Overriding methods should conform 154 // to this behavior. 155 virtual bool is_intrinsic_supported(methodHandle method) { 156 return false; 157 } 158 159 // Compiler type queries. 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 // Customization 166 virtual void initialize () = 0; 167 168 void set_num_compiler_threads(int num) { _num_compiler_threads = num; } 169 int num_compiler_threads() { return _num_compiler_threads; } 170 171 // Get/set state of compiler objects 172 bool is_initialized() { return _compiler_state == initialized; } 173 bool is_failed () { return _compiler_state == failed;} 174 void set_state (int state); 175 void set_shut_down () { set_state(shut_down); } 176 // Compilation entry point for methods 177 virtual void compile_method(ciEnv* env, ciMethod* target, int entry_bci, DirectiveSet* directive) { 178 ShouldNotReachHere(); 179 } 180 181 182 // Print compilation timers and statistics 183 virtual void print_timers() { 184 ShouldNotReachHere(); | 145 } 146 147 // Determines if an intrinsic is supported by the compiler, that is, 148 // the compiler provides the instructions necessary to generate 149 // the intrinsic code for method 'method'. 150 // 151 // The 'is_intrinsic_supported' method is a white list, that is, 152 // by default no intrinsics are supported by a compiler except 153 // the ones listed in the method. Overriding methods should conform 154 // to this behavior. 155 virtual bool is_intrinsic_supported(methodHandle method) { 156 return false; 157 } 158 159 // Compiler type queries. 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(); |