src/share/vm/c1/c1_Compilation.hpp

changeset 4860
46f6f063b272
parent 4164
d804e148cff8
child 5614
9758d9f36299
equal deleted inserted replaced
4780:98f3af397705 4860:46f6f063b272
24 24
25 #ifndef SHARE_VM_C1_C1_COMPILATION_HPP 25 #ifndef SHARE_VM_C1_C1_COMPILATION_HPP
26 #define SHARE_VM_C1_C1_COMPILATION_HPP 26 #define SHARE_VM_C1_C1_COMPILATION_HPP
27 27
28 #include "ci/ciEnv.hpp" 28 #include "ci/ciEnv.hpp"
29 #include "ci/ciMethodData.hpp"
29 #include "code/exceptionHandlerTable.hpp" 30 #include "code/exceptionHandlerTable.hpp"
30 #include "memory/resourceArea.hpp" 31 #include "memory/resourceArea.hpp"
32 #include "runtime/deoptimization.hpp"
31 33
32 class CompilationResourceObj; 34 class CompilationResourceObj;
33 class XHandlers; 35 class XHandlers;
34 class ExceptionInfo; 36 class ExceptionInfo;
35 class DebugInformationRecorder; 37 class DebugInformationRecorder;
83 ExceptionHandlerTable _exception_handler_table; 85 ExceptionHandlerTable _exception_handler_table;
84 ImplicitExceptionTable _implicit_exception_table; 86 ImplicitExceptionTable _implicit_exception_table;
85 LinearScan* _allocator; 87 LinearScan* _allocator;
86 CodeOffsets _offsets; 88 CodeOffsets _offsets;
87 CodeBuffer _code; 89 CodeBuffer _code;
90 bool _has_access_indexed;
88 91
89 // compilation helpers 92 // compilation helpers
90 void initialize(); 93 void initialize();
91 void build_hir(); 94 void build_hir();
92 void emit_lir(); 95 void emit_lir();
138 FrameMap* frame_map() const { return _frame_map; } 141 FrameMap* frame_map() const { return _frame_map; }
139 CodeBuffer* code() { return &_code; } 142 CodeBuffer* code() { return &_code; }
140 C1_MacroAssembler* masm() const { return _masm; } 143 C1_MacroAssembler* masm() const { return _masm; }
141 CodeOffsets* offsets() { return &_offsets; } 144 CodeOffsets* offsets() { return &_offsets; }
142 Arena* arena() { return _arena; } 145 Arena* arena() { return _arena; }
146 bool has_access_indexed() { return _has_access_indexed; }
143 147
144 // Instruction ids 148 // Instruction ids
145 int get_next_id() { return _next_id++; } 149 int get_next_id() { return _next_id++; }
146 int number_of_instructions() const { return _next_id; } 150 int number_of_instructions() const { return _next_id; }
147 151
152 // setters 156 // setters
153 void set_has_exception_handlers(bool f) { _has_exception_handlers = f; } 157 void set_has_exception_handlers(bool f) { _has_exception_handlers = f; }
154 void set_has_fpu_code(bool f) { _has_fpu_code = f; } 158 void set_has_fpu_code(bool f) { _has_fpu_code = f; }
155 void set_has_unsafe_access(bool f) { _has_unsafe_access = f; } 159 void set_has_unsafe_access(bool f) { _has_unsafe_access = f; }
156 void set_would_profile(bool f) { _would_profile = f; } 160 void set_would_profile(bool f) { _would_profile = f; }
161 void set_has_access_indexed(bool f) { _has_access_indexed = f; }
157 // Add a set of exception handlers covering the given PC offset 162 // Add a set of exception handlers covering the given PC offset
158 void add_exception_handlers_for_pco(int pco, XHandlers* exception_handlers); 163 void add_exception_handlers_for_pco(int pco, XHandlers* exception_handlers);
159 // Statistics gathering 164 // Statistics gathering
160 void notice_inlined_method(ciMethod* method); 165 void notice_inlined_method(ciMethod* method);
161 166
231 } 236 }
232 bool profile_checkcasts() { 237 bool profile_checkcasts() {
233 return env()->comp_level() == CompLevel_full_profile && 238 return env()->comp_level() == CompLevel_full_profile &&
234 C1UpdateMethodData && C1ProfileCheckcasts; 239 C1UpdateMethodData && C1ProfileCheckcasts;
235 } 240 }
241
242 // will compilation make optimistic assumptions that might lead to
243 // deoptimization and that the runtime will account for?
244 bool is_optimistic() const {
245 return !TieredCompilation &&
246 (RangeCheckElimination || UseLoopInvariantCodeMotion) &&
247 method()->method_data()->trap_count(Deoptimization::Reason_none) == 0;
248 }
236 }; 249 };
237 250
238 251
239 // Macro definitions for unified bailout-support 252 // Macro definitions for unified bailout-support
240 // The methods bailout() and bailed_out() are present in all classes 253 // The methods bailout() and bailed_out() are present in all classes

mercurial