c1_GraphBuilder.hpp (10478:dc073ee24dc6) | c1_GraphBuilder.hpp (11891:8eab4734c758) |
---|---|
1/* 2 * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * --- 86 unchanged lines hidden (view full) --- 95 // allows us to perform CSE across inlined scopes and to avoid 96 // storing parameters to the stack. Having a global register 97 // allocator and being able to perform global CSE would allow this 98 // code to be removed and thereby simplify the inliner. 99 BlockBegin* _cleanup_block; // The block to which the return was added 100 Instruction* _cleanup_return_prev; // Instruction before return instruction 101 ValueStack* _cleanup_state; // State of that block (not yet pinned) 102 | 1/* 2 * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * --- 86 unchanged lines hidden (view full) --- 95 // allows us to perform CSE across inlined scopes and to avoid 96 // storing parameters to the stack. Having a global register 97 // allocator and being able to perform global CSE would allow this 98 // code to be removed and thereby simplify the inliner. 99 BlockBegin* _cleanup_block; // The block to which the return was added 100 Instruction* _cleanup_return_prev; // Instruction before return instruction 101 ValueStack* _cleanup_state; // State of that block (not yet pinned) 102 |
103 // When inlining do not push the result on the stack 104 bool _ignore_return; 105 |
|
103 public: 104 ScopeData(ScopeData* parent); 105 106 ScopeData* parent() const { return _parent; } 107 108 BlockList* bci2block() const { return _bci2block; } 109 void set_bci2block(BlockList* bci2block) { _bci2block = bci2block; } 110 --- 47 unchanged lines hidden (view full) --- 158 void incr_num_returns(); 159 160 void set_inline_cleanup_info(BlockBegin* block, 161 Instruction* return_prev, 162 ValueStack* return_state); 163 BlockBegin* inline_cleanup_block() const { return _cleanup_block; } 164 Instruction* inline_cleanup_return_prev() const{ return _cleanup_return_prev; } 165 ValueStack* inline_cleanup_state() const { return _cleanup_state; } | 106 public: 107 ScopeData(ScopeData* parent); 108 109 ScopeData* parent() const { return _parent; } 110 111 BlockList* bci2block() const { return _bci2block; } 112 void set_bci2block(BlockList* bci2block) { _bci2block = bci2block; } 113 --- 47 unchanged lines hidden (view full) --- 161 void incr_num_returns(); 162 163 void set_inline_cleanup_info(BlockBegin* block, 164 Instruction* return_prev, 165 ValueStack* return_state); 166 BlockBegin* inline_cleanup_block() const { return _cleanup_block; } 167 Instruction* inline_cleanup_return_prev() const{ return _cleanup_return_prev; } 168 ValueStack* inline_cleanup_state() const { return _cleanup_state; } |
169 170 bool ignore_return() const { return _ignore_return; } 171 void set_ignore_return(bool ignore_return) { _ignore_return = ignore_return; } |
|
166 }; 167 168 // for all GraphBuilders 169 static bool _can_trap[Bytecodes::number_of_java_codes]; 170 171 // for each instance of GraphBuilder 172 ScopeData* _scope_data; // Per-scope data; used for inlining 173 Compilation* _compilation; // the current compilation --- 67 unchanged lines hidden (view full) --- 241 void if_node(Value x, If::Condition cond, Value y, ValueStack* stack_before); 242 void if_zero(ValueType* type, If::Condition cond); 243 void if_null(ValueType* type, If::Condition cond); 244 void if_same(ValueType* type, If::Condition cond); 245 void jsr(int dest); 246 void ret(int local_index); 247 void table_switch(); 248 void lookup_switch(); | 172 }; 173 174 // for all GraphBuilders 175 static bool _can_trap[Bytecodes::number_of_java_codes]; 176 177 // for each instance of GraphBuilder 178 ScopeData* _scope_data; // Per-scope data; used for inlining 179 Compilation* _compilation; // the current compilation --- 67 unchanged lines hidden (view full) --- 247 void if_node(Value x, If::Condition cond, Value y, ValueStack* stack_before); 248 void if_zero(ValueType* type, If::Condition cond); 249 void if_null(ValueType* type, If::Condition cond); 250 void if_same(ValueType* type, If::Condition cond); 251 void jsr(int dest); 252 void ret(int local_index); 253 void table_switch(); 254 void lookup_switch(); |
249 void method_return(Value x); | 255 void method_return(Value x, bool ignore_return = false); |
250 void call_register_finalizer(); 251 void access_field(Bytecodes::Code code); 252 void invoke(Bytecodes::Code code); 253 void new_instance(int klass_index); 254 void new_type_array(); 255 void new_object_array(); 256 void check_cast(int klass_index); 257 void instance_of(int klass_index); --- 77 unchanged lines hidden (view full) --- 335 intx max_inline_size() const { return scope_data()->max_inline_size(); } 336 int inline_level() const { return scope()->level(); } 337 int recursive_inline_level(ciMethod* callee) const; 338 339 // inlining of synchronized methods 340 void inline_sync_entry(Value lock, BlockBegin* sync_handler); 341 void fill_sync_handler(Value lock, BlockBegin* sync_handler, bool default_handler = false); 342 | 256 void call_register_finalizer(); 257 void access_field(Bytecodes::Code code); 258 void invoke(Bytecodes::Code code); 259 void new_instance(int klass_index); 260 void new_type_array(); 261 void new_object_array(); 262 void check_cast(int klass_index); 263 void instance_of(int klass_index); --- 77 unchanged lines hidden (view full) --- 341 intx max_inline_size() const { return scope_data()->max_inline_size(); } 342 int inline_level() const { return scope()->level(); } 343 int recursive_inline_level(ciMethod* callee) const; 344 345 // inlining of synchronized methods 346 void inline_sync_entry(Value lock, BlockBegin* sync_handler); 347 void fill_sync_handler(Value lock, BlockBegin* sync_handler, bool default_handler = false); 348 |
343 void build_graph_for_intrinsic(ciMethod* callee); | 349 void build_graph_for_intrinsic(ciMethod* callee, bool ignore_return); |
344 345 // inliners | 350 351 // inliners |
346 bool try_inline( ciMethod* callee, bool holder_known, Bytecodes::Code bc = Bytecodes::_illegal, Value receiver = NULL); 347 bool try_inline_intrinsics(ciMethod* callee); 348 bool try_inline_full( ciMethod* callee, bool holder_known, Bytecodes::Code bc = Bytecodes::_illegal, Value receiver = NULL); | 352 bool try_inline( ciMethod* callee, bool holder_known, bool ignore_return, Bytecodes::Code bc = Bytecodes::_illegal, Value receiver = NULL); 353 bool try_inline_intrinsics(ciMethod* callee, bool ignore_return = false); 354 bool try_inline_full( ciMethod* callee, bool holder_known, bool ignore_return, Bytecodes::Code bc = Bytecodes::_illegal, Value receiver = NULL); |
349 bool try_inline_jsr(int jsr_dest_bci); 350 351 const char* check_can_parse(ciMethod* callee) const; 352 const char* should_not_inline(ciMethod* callee) const; 353 354 // JSR 292 support | 355 bool try_inline_jsr(int jsr_dest_bci); 356 357 const char* check_can_parse(ciMethod* callee) const; 358 const char* should_not_inline(ciMethod* callee) const; 359 360 // JSR 292 support |
355 bool try_method_handle_inline(ciMethod* callee); | 361 bool try_method_handle_inline(ciMethod* callee, bool ignore_return); |
356 357 // helpers 358 void inline_bailout(const char* msg); 359 BlockBegin* header_block(BlockBegin* entry, BlockBegin::Flag f, ValueStack* state); 360 BlockBegin* setup_start_block(int osr_bci, BlockBegin* std_entry, BlockBegin* osr_entry, ValueStack* init_state); 361 void setup_osr_entry_block(); 362 void clear_inline_bailout(); 363 ValueStack* state_at_entry(); --- 58 unchanged lines hidden --- | 362 363 // helpers 364 void inline_bailout(const char* msg); 365 BlockBegin* header_block(BlockBegin* entry, BlockBegin::Flag f, ValueStack* state); 366 BlockBegin* setup_start_block(int osr_bci, BlockBegin* std_entry, BlockBegin* osr_entry, ValueStack* init_state); 367 void setup_osr_entry_block(); 368 void clear_inline_bailout(); 369 ValueStack* state_at_entry(); --- 58 unchanged lines hidden --- |