Mercurial > hg > truffle
comparison src/share/vm/compiler/abstractCompiler.hpp @ 21559:be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 28 May 2015 15:36:48 +0200 |
parents | 89152779163c |
children |
comparison
equal
deleted
inserted
replaced
21558:d563baeca9df | 21559:be896a1983c0 |
---|---|
27 | 27 |
28 #include "ci/compilerInterface.hpp" | 28 #include "ci/compilerInterface.hpp" |
29 | 29 |
30 typedef void (*initializer)(void); | 30 typedef void (*initializer)(void); |
31 | 31 |
32 #ifdef GRAAL | 32 #ifdef JVMCI |
33 // Per-compiler statistics | 33 // Per-compiler statistics |
34 class CompilerStatistics VALUE_OBJ_CLASS_SPEC { | 34 class CompilerStatistics VALUE_OBJ_CLASS_SPEC { |
35 friend class VMStructs; | 35 friend class VMStructs; |
36 | 36 |
37 class Data VALUE_OBJ_CLASS_SPEC { | 37 class Data VALUE_OBJ_CLASS_SPEC { |
82 bool should_perform_init(); | 82 bool should_perform_init(); |
83 | 83 |
84 // The (closed set) of concrete compiler classes. Using an tag like this | 84 // The (closed set) of concrete compiler classes. Using an tag like this |
85 // avoids a confusing use of macros around the definition of the | 85 // avoids a confusing use of macros around the definition of the |
86 // 'is_<compiler type>' methods. | 86 // 'is_<compiler type>' methods. |
87 enum Type { c1, c2, shark, graal }; | 87 enum Type { c1, c2, shark, jvmci }; |
88 | 88 |
89 private: | 89 private: |
90 Type _type; | 90 Type _type; |
91 | 91 |
92 #ifdef GRAAL | 92 #ifdef JVMCI |
93 CompilerStatistics _stats; | 93 CompilerStatistics _stats; |
94 #endif | 94 #endif |
95 | 95 |
96 public: | 96 public: |
97 AbstractCompiler(Type type) : _type(type), _compiler_state(uninitialized), _num_compiler_threads(0) {} | 97 AbstractCompiler(Type type) : _type(type), _compiler_state(uninitialized), _num_compiler_threads(0) {} |
110 virtual bool supports_osr () { return true; } | 110 virtual bool supports_osr () { return true; } |
111 virtual bool can_compile_method(methodHandle method) { return true; } | 111 virtual bool can_compile_method(methodHandle method) { return true; } |
112 bool is_c1 () { return _type == c1; } | 112 bool is_c1 () { return _type == c1; } |
113 bool is_c2 () { return _type == c2; } | 113 bool is_c2 () { return _type == c2; } |
114 bool is_shark() { return _type == shark; } | 114 bool is_shark() { return _type == shark; } |
115 bool is_graal() { return _type == graal; } | 115 bool is_jvmci() { return _type == jvmci; } |
116 | 116 |
117 // Customization | 117 // Customization |
118 virtual void initialize () = 0; | 118 virtual void initialize () = 0; |
119 | 119 |
120 void set_num_compiler_threads(int num) { _num_compiler_threads = num; } | 120 void set_num_compiler_threads(int num) { _num_compiler_threads = num; } |
134 // Print compilation timers and statistics | 134 // Print compilation timers and statistics |
135 virtual void print_timers() { | 135 virtual void print_timers() { |
136 ShouldNotReachHere(); | 136 ShouldNotReachHere(); |
137 } | 137 } |
138 | 138 |
139 #ifdef GRAAL | 139 #ifdef JVMCI |
140 CompilerStatistics* stats() { return &_stats; } | 140 CompilerStatistics* stats() { return &_stats; } |
141 #endif | 141 #endif |
142 }; | 142 }; |
143 | 143 |
144 #endif // SHARE_VM_COMPILER_ABSTRACTCOMPILER_HPP | 144 #endif // SHARE_VM_COMPILER_ABSTRACTCOMPILER_HPP |