src/share/vm/c1/c1_IR.hpp
Print this page
rev 4136 : 7153771: array bound check elimination for c1
Summary: when possible optimize out array bound checks, inserting predicates when needed.
Reviewed-by:
*** 252,279 ****
IRScope* _scope;
XHandlers* _exception_handlers;
OopMap* _oop_map;
ValueStack* _stack; // used by deoptimization (contains also monitors
bool _is_method_handle_invoke; // true if the associated call site is a MethodHandle call site.
FrameMap* frame_map() const { return scope()->compilation()->frame_map(); }
Compilation* compilation() const { return scope()->compilation(); }
public:
// use scope from ValueStack
! CodeEmitInfo(ValueStack* stack, XHandlers* exception_handlers);
// make a copy
CodeEmitInfo(CodeEmitInfo* info, ValueStack* stack = NULL);
// accessors
OopMap* oop_map() { return _oop_map; }
ciMethod* method() const { return _scope->method(); }
IRScope* scope() const { return _scope; }
XHandlers* exception_handlers() const { return _exception_handlers; }
ValueStack* stack() const { return _stack; }
void add_register_oop(LIR_Opr opr);
void record_debug_info(DebugInformationRecorder* recorder, int pc_offset);
bool is_method_handle_invoke() const { return _is_method_handle_invoke; }
--- 252,281 ----
IRScope* _scope;
XHandlers* _exception_handlers;
OopMap* _oop_map;
ValueStack* _stack; // used by deoptimization (contains also monitors
bool _is_method_handle_invoke; // true if the associated call site is a MethodHandle call site.
+ bool _deoptimize_on_exception;
FrameMap* frame_map() const { return scope()->compilation()->frame_map(); }
Compilation* compilation() const { return scope()->compilation(); }
public:
// use scope from ValueStack
! CodeEmitInfo(ValueStack* stack, XHandlers* exception_handlers, bool deoptimize_on_exception = false);
// make a copy
CodeEmitInfo(CodeEmitInfo* info, ValueStack* stack = NULL);
// accessors
OopMap* oop_map() { return _oop_map; }
ciMethod* method() const { return _scope->method(); }
IRScope* scope() const { return _scope; }
XHandlers* exception_handlers() const { return _exception_handlers; }
ValueStack* stack() const { return _stack; }
+ bool deoptimize_on_exception() const { return _deoptimize_on_exception; }
void add_register_oop(LIR_Opr opr);
void record_debug_info(DebugInformationRecorder* recorder, int pc_offset);
bool is_method_handle_invoke() const { return _is_method_handle_invoke; }
*** 307,317 ****
BlockList* code() const { return _code; }
int num_loops() const { return _num_loops; }
int max_stack() const { return top_scope()->max_stack(); } // expensive
// ir manipulation
! void optimize();
void compute_predecessors();
void split_critical_edges();
void compute_code();
void compute_use_counts();
--- 309,320 ----
BlockList* code() const { return _code; }
int num_loops() const { return _num_loops; }
int max_stack() const { return top_scope()->max_stack(); } // expensive
// ir manipulation
! void optimize_blocks();
! void eliminate_null_checks();
void compute_predecessors();
void split_critical_edges();
void compute_code();
void compute_use_counts();