mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 19:14:38 +02:00
7153771: array bound check elimination for c1
When possible optimize out array bound checks, inserting predicates when needed. Reviewed-by: never, kvn, twisti
This commit is contained in:
parent
2f4ecb86a2
commit
06ef4cddf7
40 changed files with 2861 additions and 153 deletions
|
@ -254,6 +254,7 @@ class CodeEmitInfo: public CompilationResourceObj {
|
|||
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(); }
|
||||
|
@ -261,7 +262,7 @@ class CodeEmitInfo: public CompilationResourceObj {
|
|||
public:
|
||||
|
||||
// use scope from ValueStack
|
||||
CodeEmitInfo(ValueStack* stack, XHandlers* exception_handlers);
|
||||
CodeEmitInfo(ValueStack* stack, XHandlers* exception_handlers, bool deoptimize_on_exception = false);
|
||||
|
||||
// make a copy
|
||||
CodeEmitInfo(CodeEmitInfo* info, ValueStack* stack = NULL);
|
||||
|
@ -272,6 +273,7 @@ class CodeEmitInfo: public CompilationResourceObj {
|
|||
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);
|
||||
|
@ -309,7 +311,8 @@ class IR: public CompilationResourceObj {
|
|||
int max_stack() const { return top_scope()->max_stack(); } // expensive
|
||||
|
||||
// ir manipulation
|
||||
void optimize();
|
||||
void optimize_blocks();
|
||||
void eliminate_null_checks();
|
||||
void compute_predecessors();
|
||||
void split_critical_edges();
|
||||
void compute_code();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue