8208670: Compiler changes to allow enabling -Wreorder
Reviewed-by: kvn
This commit is contained in:
parent
d702d5f8d2
commit
e98c176026
@ -2219,8 +2219,8 @@ public:
|
||||
_evex_encoding(0),
|
||||
_is_clear_context(true),
|
||||
_is_extended_context(false),
|
||||
_current_assembler(NULL),
|
||||
_embedded_opmask_register_specifier(1) { // hard code k1, it will be initialized for now
|
||||
_embedded_opmask_register_specifier(1), // hard code k1, it will be initialized for now
|
||||
_current_assembler(NULL) {
|
||||
if (UseAVX < 3) _legacy_mode = true;
|
||||
}
|
||||
|
||||
|
@ -89,13 +89,13 @@ void CounterOverflowStub::emit_code(LIR_Assembler* ce) {
|
||||
}
|
||||
|
||||
RangeCheckStub::RangeCheckStub(CodeEmitInfo* info, LIR_Opr index, LIR_Opr array)
|
||||
: _throw_index_out_of_bounds_exception(false), _index(index), _array(array) {
|
||||
: _index(index), _array(array), _throw_index_out_of_bounds_exception(false) {
|
||||
assert(info != NULL, "must have info");
|
||||
_info = new CodeEmitInfo(info);
|
||||
}
|
||||
|
||||
RangeCheckStub::RangeCheckStub(CodeEmitInfo* info, LIR_Opr index)
|
||||
: _throw_index_out_of_bounds_exception(true), _index(index), _array(NULL) {
|
||||
: _index(index), _array(NULL), _throw_index_out_of_bounds_exception(true) {
|
||||
assert(info != NULL, "must have info");
|
||||
_info = new CodeEmitInfo(info);
|
||||
}
|
||||
|
@ -110,9 +110,9 @@ void LinearScan::allocate_fpu_stack() {
|
||||
|
||||
FpuStackAllocator::FpuStackAllocator(Compilation* compilation, LinearScan* allocator)
|
||||
: _compilation(compilation)
|
||||
, _allocator(allocator)
|
||||
, _lir(NULL)
|
||||
, _pos(-1)
|
||||
, _allocator(allocator)
|
||||
, _sim(compilation)
|
||||
, _temp_sim(compilation)
|
||||
{}
|
||||
|
@ -1633,12 +1633,12 @@ class ComputeMoveOrder: public StackObj {
|
||||
public:
|
||||
MoveOperation(int src_index, VMRegPair src, int dst_index, VMRegPair dst):
|
||||
_src(src)
|
||||
, _src_index(src_index)
|
||||
, _dst(dst)
|
||||
, _src_index(src_index)
|
||||
, _dst_index(dst_index)
|
||||
, _processed(false)
|
||||
, _next(NULL)
|
||||
, _prev(NULL)
|
||||
, _processed(false) {
|
||||
, _prev(NULL) {
|
||||
}
|
||||
|
||||
VMRegPair src() const { return _src; }
|
||||
|
@ -1006,19 +1006,19 @@ void ArchDesc::declare_pipe_classes(FILE *fp_hpp) {
|
||||
fprintf(fp_hpp, " enum machPipelineStages * const stage,\n");
|
||||
fprintf(fp_hpp, " uint * const cycles,\n");
|
||||
fprintf(fp_hpp, " Pipeline_Use resource_use)\n");
|
||||
fprintf(fp_hpp, " : _write_stage(write_stage)\n");
|
||||
fprintf(fp_hpp, " , _read_stage_count(count)\n");
|
||||
fprintf(fp_hpp, " , _has_fixed_latency(has_fixed_latency)\n");
|
||||
fprintf(fp_hpp, " : _read_stage_count(count)\n");
|
||||
fprintf(fp_hpp, " , _write_stage(write_stage)\n");
|
||||
fprintf(fp_hpp, " , _fixed_latency(fixed_latency)\n");
|
||||
fprintf(fp_hpp, " , _read_stages(dst)\n");
|
||||
fprintf(fp_hpp, " , _resource_stage(stage)\n");
|
||||
fprintf(fp_hpp, " , _resource_cycles(cycles)\n");
|
||||
fprintf(fp_hpp, " , _resource_use(resource_use)\n");
|
||||
fprintf(fp_hpp, " , _instruction_count(instruction_count)\n");
|
||||
fprintf(fp_hpp, " , _has_fixed_latency(has_fixed_latency)\n");
|
||||
fprintf(fp_hpp, " , _has_branch_delay(has_branch_delay)\n");
|
||||
fprintf(fp_hpp, " , _has_multiple_bundles(has_multiple_bundles)\n");
|
||||
fprintf(fp_hpp, " , _force_serialization(force_serialization)\n");
|
||||
fprintf(fp_hpp, " , _may_have_no_code(may_have_no_code)\n");
|
||||
fprintf(fp_hpp, " , _read_stages(dst)\n");
|
||||
fprintf(fp_hpp, " , _resource_stage(stage)\n");
|
||||
fprintf(fp_hpp, " , _resource_cycles(cycles)\n");
|
||||
fprintf(fp_hpp, " , _resource_use(resource_use)\n");
|
||||
fprintf(fp_hpp, " {};\n");
|
||||
fprintf(fp_hpp, "\n");
|
||||
fprintf(fp_hpp, " uint writeStage() const {\n");
|
||||
|
@ -138,8 +138,8 @@ private:
|
||||
_heap(heap),
|
||||
_name(name),
|
||||
_metadata_size(metadata_size),
|
||||
_method_index(method_index),
|
||||
_aot_id(aot_id) {
|
||||
_aot_id(aot_id),
|
||||
_method_index(method_index) {
|
||||
|
||||
_is_far_code = CodeCache::is_far_target(code) ||
|
||||
CodeCache::is_far_target(code + meta->code_size());
|
||||
|
@ -218,7 +218,7 @@ class ImplicitNullCheckStub: public CodeStub {
|
||||
|
||||
public:
|
||||
ImplicitNullCheckStub(int offset, CodeEmitInfo* info)
|
||||
: _offset(offset), _info(info) {
|
||||
: _info(info), _offset(offset) {
|
||||
}
|
||||
virtual void emit_code(LIR_Assembler* e);
|
||||
virtual CodeEmitInfo* info() const { return _info; }
|
||||
@ -479,7 +479,7 @@ class SimpleExceptionStub: public CodeStub {
|
||||
|
||||
public:
|
||||
SimpleExceptionStub(Runtime1::StubID stub, LIR_Opr obj, CodeEmitInfo* info):
|
||||
_obj(obj), _info(info), _stub(stub) {
|
||||
_obj(obj), _stub(stub), _info(info) {
|
||||
}
|
||||
|
||||
void set_obj(LIR_Opr obj) {
|
||||
|
@ -538,12 +538,13 @@ void Compilation::generate_exception_handler_table() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Compilation::Compilation(AbstractCompiler* compiler, ciEnv* env, ciMethod* method,
|
||||
int osr_bci, BufferBlob* buffer_blob, DirectiveSet* directive)
|
||||
: _compiler(compiler)
|
||||
, _env(env)
|
||||
: _next_id(0)
|
||||
, _next_block_id(0)
|
||||
, _compiler(compiler)
|
||||
, _directive(directive)
|
||||
, _env(env)
|
||||
, _log(env->log())
|
||||
, _method(method)
|
||||
, _osr_bci(osr_bci)
|
||||
@ -553,19 +554,17 @@ Compilation::Compilation(AbstractCompiler* compiler, ciEnv* env, ciMethod* metho
|
||||
, _masm(NULL)
|
||||
, _has_exception_handlers(false)
|
||||
, _has_fpu_code(true) // pessimistic assumption
|
||||
, _would_profile(false)
|
||||
, _has_unsafe_access(false)
|
||||
, _would_profile(false)
|
||||
, _has_method_handle_invokes(false)
|
||||
, _has_reserved_stack_access(method->has_reserved_stack_access())
|
||||
, _bailout_msg(NULL)
|
||||
, _exception_info_list(NULL)
|
||||
, _allocator(NULL)
|
||||
, _next_id(0)
|
||||
, _next_block_id(0)
|
||||
, _code(buffer_blob)
|
||||
, _has_access_indexed(false)
|
||||
, _current_instruction(NULL)
|
||||
, _interpreter_frame_size(0)
|
||||
, _current_instruction(NULL)
|
||||
#ifndef PRODUCT
|
||||
, _last_instruction_printed(NULL)
|
||||
, _cfg_printer_output(NULL)
|
||||
|
@ -102,11 +102,11 @@ BlockListBuilder::BlockListBuilder(Compilation* compilation, IRScope* scope, int
|
||||
, _scope(scope)
|
||||
, _blocks(16)
|
||||
, _bci2block(new BlockList(scope->method()->code_size(), NULL))
|
||||
, _next_block_number(0)
|
||||
, _active() // size not known yet
|
||||
, _visited() // size not known yet
|
||||
, _next_loop_index(0)
|
||||
, _loop_map() // size not known yet
|
||||
, _next_loop_index(0)
|
||||
, _next_block_number(0)
|
||||
{
|
||||
set_entries(osr_bci);
|
||||
set_leaders();
|
||||
@ -680,10 +680,10 @@ GraphBuilder::ScopeData::ScopeData(ScopeData* parent)
|
||||
, _has_handler(false)
|
||||
, _stream(NULL)
|
||||
, _work_list(NULL)
|
||||
, _parsing_jsr(false)
|
||||
, _jsr_xhandlers(NULL)
|
||||
, _caller_stack_size(-1)
|
||||
, _continuation(NULL)
|
||||
, _parsing_jsr(false)
|
||||
, _jsr_xhandlers(NULL)
|
||||
, _num_returns(0)
|
||||
, _cleanup_block(NULL)
|
||||
, _cleanup_return_prev(NULL)
|
||||
@ -3195,11 +3195,11 @@ ValueStack* GraphBuilder::state_at_entry() {
|
||||
|
||||
GraphBuilder::GraphBuilder(Compilation* compilation, IRScope* scope)
|
||||
: _scope_data(NULL)
|
||||
, _compilation(compilation)
|
||||
, _memory(new MemoryBuffer())
|
||||
, _inline_bailout_msg(NULL)
|
||||
, _instruction_count(0)
|
||||
, _osr_entry(NULL)
|
||||
, _memory(new MemoryBuffer())
|
||||
, _compilation(compilation)
|
||||
, _inline_bailout_msg(NULL)
|
||||
{
|
||||
int osr_bci = compilation->osr_bci();
|
||||
|
||||
|
@ -132,8 +132,8 @@ BlockBegin* IRScope::build_graph(Compilation* compilation, int osr_bci) {
|
||||
|
||||
|
||||
IRScope::IRScope(Compilation* compilation, IRScope* caller, int caller_bci, ciMethod* method, int osr_bci, bool create_graph)
|
||||
: _callees(2)
|
||||
, _compilation(compilation)
|
||||
: _compilation(compilation)
|
||||
, _callees(2)
|
||||
, _requires_phi_function(method->max_locals())
|
||||
{
|
||||
_caller = caller;
|
||||
@ -184,11 +184,11 @@ bool IRScopeDebugInfo::should_reexecute() {
|
||||
|
||||
// Stack must be NON-null
|
||||
CodeEmitInfo::CodeEmitInfo(ValueStack* stack, XHandlers* exception_handlers, bool deoptimize_on_exception)
|
||||
: _scope(stack->scope())
|
||||
, _scope_debug_info(NULL)
|
||||
: _scope_debug_info(NULL)
|
||||
, _scope(stack->scope())
|
||||
, _exception_handlers(exception_handlers)
|
||||
, _oop_map(NULL)
|
||||
, _stack(stack)
|
||||
, _exception_handlers(exception_handlers)
|
||||
, _is_method_handle_invoke(false)
|
||||
, _deoptimize_on_exception(deoptimize_on_exception) {
|
||||
assert(_stack != NULL, "must be non null");
|
||||
@ -196,9 +196,9 @@ CodeEmitInfo::CodeEmitInfo(ValueStack* stack, XHandlers* exception_handlers, boo
|
||||
|
||||
|
||||
CodeEmitInfo::CodeEmitInfo(CodeEmitInfo* info, ValueStack* stack)
|
||||
: _scope(info->_scope)
|
||||
: _scope_debug_info(NULL)
|
||||
, _scope(info->_scope)
|
||||
, _exception_handlers(NULL)
|
||||
, _scope_debug_info(NULL)
|
||||
, _oop_map(NULL)
|
||||
, _stack(stack == NULL ? info->_stack : stack)
|
||||
, _is_method_handle_invoke(info->_is_method_handle_invoke)
|
||||
@ -526,14 +526,14 @@ ComputeLinearScanOrder::ComputeLinearScanOrder(Compilation* c, BlockBegin* start
|
||||
_num_blocks(0),
|
||||
_num_loops(0),
|
||||
_iterative_dominators(false),
|
||||
_linear_scan_order(NULL), // initialized later with correct size
|
||||
_visited_blocks(_max_block_id),
|
||||
_active_blocks(_max_block_id),
|
||||
_dominator_blocks(_max_block_id),
|
||||
_forward_branches(_max_block_id, _max_block_id, 0),
|
||||
_loop_end_blocks(8),
|
||||
_work_list(8),
|
||||
_linear_scan_order(NULL), // initialized later with correct size
|
||||
_loop_map(0), // initialized later with correct size
|
||||
_work_list(8),
|
||||
_compilation(c)
|
||||
{
|
||||
TRACE_LINEAR_SCAN(2, tty->print_cr("***** computing linear-scan block order"));
|
||||
|
@ -215,8 +215,8 @@ class IRScopeDebugInfo: public CompilationResourceObj {
|
||||
GrowableArray<MonitorValue*>* monitors,
|
||||
IRScopeDebugInfo* caller):
|
||||
_scope(scope)
|
||||
, _locals(locals)
|
||||
, _bci(bci)
|
||||
, _locals(locals)
|
||||
, _expressions(expressions)
|
||||
, _monitors(monitors)
|
||||
, _caller(caller) {}
|
||||
|
@ -410,19 +410,20 @@ class Instruction: public CompilationResourceObj {
|
||||
|
||||
// creation
|
||||
Instruction(ValueType* type, ValueStack* state_before = NULL, bool type_is_constant = false)
|
||||
: _use_count(0)
|
||||
:
|
||||
#ifndef PRODUCT
|
||||
, _printable_bci(-99)
|
||||
_printable_bci(-99),
|
||||
#endif
|
||||
_use_count(0)
|
||||
, _pin_state(0)
|
||||
, _type(type)
|
||||
, _next(NULL)
|
||||
, _block(NULL)
|
||||
, _subst(NULL)
|
||||
, _flags(0)
|
||||
, _operand(LIR_OprFact::illegalOpr)
|
||||
, _flags(0)
|
||||
, _state_before(state_before)
|
||||
, _exception_handlers(NULL)
|
||||
, _block(NULL)
|
||||
{
|
||||
check_state(state_before);
|
||||
assert(type != NULL && (!type->is_constant() || type_is_constant), "type must exist");
|
||||
@ -705,8 +706,8 @@ LEAF(Local, Instruction)
|
||||
Local(ciType* declared, ValueType* type, int index, bool receiver)
|
||||
: Instruction(type)
|
||||
, _java_index(index)
|
||||
, _declared_type(declared)
|
||||
, _is_receiver(receiver)
|
||||
, _declared_type(declared)
|
||||
{
|
||||
NOT_PRODUCT(set_printable_bci(-1));
|
||||
}
|
||||
@ -1664,19 +1665,21 @@ LEAF(BlockBegin, StateSplit)
|
||||
, _bci(bci)
|
||||
, _depth_first_number(-1)
|
||||
, _linear_scan_number(-1)
|
||||
, _loop_depth(0)
|
||||
, _flags(0)
|
||||
, _dominator_depth(-1)
|
||||
, _loop_depth(0)
|
||||
, _loop_index(-1)
|
||||
, _flags(0)
|
||||
, _total_preds(0)
|
||||
, _stores_to_locals()
|
||||
, _successors(2)
|
||||
, _predecessors(2)
|
||||
, _dominates(2)
|
||||
, _dominator(NULL)
|
||||
, _end(NULL)
|
||||
, _predecessors(2)
|
||||
, _successors(2)
|
||||
, _dominates(2)
|
||||
, _exception_handlers(1)
|
||||
, _exception_states(NULL)
|
||||
, _exception_handler_pco(-1)
|
||||
, _lir(NULL)
|
||||
, _loop_index(-1)
|
||||
, _live_in()
|
||||
, _live_out()
|
||||
, _live_gen()
|
||||
@ -1685,8 +1688,6 @@ LEAF(BlockBegin, StateSplit)
|
||||
, _fpu_stack_state(NULL)
|
||||
, _first_lir_instruction_id(-1)
|
||||
, _last_lir_instruction_id(-1)
|
||||
, _total_preds(0)
|
||||
, _stores_to_locals()
|
||||
{
|
||||
_block = this;
|
||||
#ifndef PRODUCT
|
||||
@ -1872,18 +1873,18 @@ LEAF(Goto, BlockEnd)
|
||||
// creation
|
||||
Goto(BlockBegin* sux, ValueStack* state_before, bool is_safepoint = false)
|
||||
: BlockEnd(illegalType, state_before, is_safepoint)
|
||||
, _direction(none)
|
||||
, _profiled_method(NULL)
|
||||
, _profiled_bci(0) {
|
||||
, _profiled_bci(0)
|
||||
, _direction(none) {
|
||||
BlockList* s = new BlockList(1);
|
||||
s->append(sux);
|
||||
set_sux(s);
|
||||
}
|
||||
|
||||
Goto(BlockBegin* sux, bool is_safepoint) : BlockEnd(illegalType, NULL, is_safepoint)
|
||||
, _direction(none)
|
||||
, _profiled_method(NULL)
|
||||
, _profiled_bci(0) {
|
||||
, _profiled_bci(0)
|
||||
, _direction(none) {
|
||||
BlockList* s = new BlockList(1);
|
||||
s->append(sux);
|
||||
set_sux(s);
|
||||
@ -2550,9 +2551,9 @@ LEAF(RuntimeCall, Instruction)
|
||||
public:
|
||||
RuntimeCall(ValueType* type, const char* entry_name, address entry, Values* args, bool pass_thread = true)
|
||||
: Instruction(type)
|
||||
, _entry_name(entry_name)
|
||||
, _entry(entry)
|
||||
, _args(args)
|
||||
, _entry_name(entry_name)
|
||||
, _pass_thread(pass_thread) {
|
||||
ASSERT_VALUES
|
||||
pin();
|
||||
|
@ -47,8 +47,8 @@ class InstructionPrinter: public InstructionVisitor {
|
||||
|
||||
public:
|
||||
InstructionPrinter(bool print_phis = true, outputStream* output = tty)
|
||||
: _print_phis(print_phis)
|
||||
, _output(output)
|
||||
: _output(output)
|
||||
, _print_phis(print_phis)
|
||||
{}
|
||||
|
||||
outputStream* output() { return _output; }
|
||||
|
@ -321,9 +321,9 @@ LIR_OpTypeCheck::LIR_OpTypeCheck(LIR_Code code, LIR_Opr result, LIR_Opr object,
|
||||
, _tmp2(tmp2)
|
||||
, _tmp3(tmp3)
|
||||
, _fast_check(fast_check)
|
||||
, _stub(stub)
|
||||
, _info_for_patch(info_for_patch)
|
||||
, _info_for_exception(info_for_exception)
|
||||
, _stub(stub)
|
||||
, _profiled_method(NULL)
|
||||
, _profiled_bci(-1)
|
||||
, _should_profile(false)
|
||||
@ -348,9 +348,9 @@ LIR_OpTypeCheck::LIR_OpTypeCheck(LIR_Code code, LIR_Opr object, LIR_Opr array, L
|
||||
, _tmp2(tmp2)
|
||||
, _tmp3(tmp3)
|
||||
, _fast_check(false)
|
||||
, _stub(NULL)
|
||||
, _info_for_patch(NULL)
|
||||
, _info_for_exception(info_for_exception)
|
||||
, _stub(NULL)
|
||||
, _profiled_method(NULL)
|
||||
, _profiled_bci(-1)
|
||||
, _should_profile(false)
|
||||
@ -367,14 +367,14 @@ LIR_OpTypeCheck::LIR_OpTypeCheck(LIR_Code code, LIR_Opr object, LIR_Opr array, L
|
||||
LIR_OpArrayCopy::LIR_OpArrayCopy(LIR_Opr src, LIR_Opr src_pos, LIR_Opr dst, LIR_Opr dst_pos, LIR_Opr length,
|
||||
LIR_Opr tmp, ciArrayKlass* expected_type, int flags, CodeEmitInfo* info)
|
||||
: LIR_Op(lir_arraycopy, LIR_OprFact::illegalOpr, info)
|
||||
, _tmp(tmp)
|
||||
, _src(src)
|
||||
, _src_pos(src_pos)
|
||||
, _dst(dst)
|
||||
, _dst_pos(dst_pos)
|
||||
, _flags(flags)
|
||||
, _length(length)
|
||||
, _tmp(tmp)
|
||||
, _expected_type(expected_type)
|
||||
, _length(length) {
|
||||
, _flags(flags) {
|
||||
_stub = new ArrayCopyStub(this);
|
||||
}
|
||||
|
||||
|
@ -516,36 +516,36 @@ class LIR_Address: public LIR_OprPtr {
|
||||
_base(base)
|
||||
, _index(index)
|
||||
, _scale(times_1)
|
||||
, _type(type)
|
||||
, _disp(0) { verify(); }
|
||||
, _disp(0)
|
||||
, _type(type) { verify(); }
|
||||
|
||||
LIR_Address(LIR_Opr base, intx disp, BasicType type):
|
||||
_base(base)
|
||||
, _index(LIR_OprDesc::illegalOpr())
|
||||
, _scale(times_1)
|
||||
, _type(type)
|
||||
, _disp(disp) { verify(); }
|
||||
, _disp(disp)
|
||||
, _type(type) { verify(); }
|
||||
|
||||
LIR_Address(LIR_Opr base, BasicType type):
|
||||
_base(base)
|
||||
, _index(LIR_OprDesc::illegalOpr())
|
||||
, _scale(times_1)
|
||||
, _type(type)
|
||||
, _disp(0) { verify(); }
|
||||
, _disp(0)
|
||||
, _type(type) { verify(); }
|
||||
|
||||
LIR_Address(LIR_Opr base, LIR_Opr index, intx disp, BasicType type):
|
||||
_base(base)
|
||||
, _index(index)
|
||||
, _scale(times_1)
|
||||
, _type(type)
|
||||
, _disp(disp) { verify(); }
|
||||
, _disp(disp)
|
||||
, _type(type) { verify(); }
|
||||
|
||||
LIR_Address(LIR_Opr base, LIR_Opr index, Scale scale, intx disp, BasicType type):
|
||||
_base(base)
|
||||
, _index(index)
|
||||
, _scale(scale)
|
||||
, _type(type)
|
||||
, _disp(disp) { verify(); }
|
||||
, _disp(disp)
|
||||
, _type(type) { verify(); }
|
||||
|
||||
LIR_Opr base() const { return _base; }
|
||||
LIR_Opr index() const { return _index; }
|
||||
@ -1058,30 +1058,32 @@ class LIR_Op: public CompilationResourceObj {
|
||||
|
||||
public:
|
||||
LIR_Op()
|
||||
: _result(LIR_OprFact::illegalOpr)
|
||||
:
|
||||
#ifdef ASSERT
|
||||
_file(NULL)
|
||||
, _line(0),
|
||||
#endif
|
||||
_result(LIR_OprFact::illegalOpr)
|
||||
, _code(lir_none)
|
||||
, _flags(0)
|
||||
, _info(NULL)
|
||||
#ifdef ASSERT
|
||||
, _file(NULL)
|
||||
, _line(0)
|
||||
#endif
|
||||
, _id(-1)
|
||||
, _fpu_pop_count(0)
|
||||
, _source(NULL)
|
||||
, _id(-1) {}
|
||||
, _source(NULL) {}
|
||||
|
||||
LIR_Op(LIR_Code code, LIR_Opr result, CodeEmitInfo* info)
|
||||
: _result(result)
|
||||
:
|
||||
#ifdef ASSERT
|
||||
_file(NULL)
|
||||
, _line(0),
|
||||
#endif
|
||||
_result(result)
|
||||
, _code(code)
|
||||
, _flags(0)
|
||||
, _info(info)
|
||||
#ifdef ASSERT
|
||||
, _file(NULL)
|
||||
, _line(0)
|
||||
#endif
|
||||
, _id(-1)
|
||||
, _fpu_pop_count(0)
|
||||
, _source(NULL)
|
||||
, _id(-1) {}
|
||||
, _source(NULL) {}
|
||||
|
||||
CodeEmitInfo* info() const { return _info; }
|
||||
LIR_Code code() const { return (LIR_Code)_code; }
|
||||
@ -1153,8 +1155,8 @@ class LIR_OpCall: public LIR_Op {
|
||||
LIR_OpCall(LIR_Code code, address addr, LIR_Opr result,
|
||||
LIR_OprList* arguments, CodeEmitInfo* info = NULL)
|
||||
: LIR_Op(code, result, info)
|
||||
, _arguments(arguments)
|
||||
, _addr(addr) {}
|
||||
, _addr(addr)
|
||||
, _arguments(arguments) {}
|
||||
|
||||
public:
|
||||
address addr() const { return _addr; }
|
||||
@ -1180,8 +1182,8 @@ class LIR_OpJavaCall: public LIR_OpCall {
|
||||
address addr, LIR_OprList* arguments,
|
||||
CodeEmitInfo* info)
|
||||
: LIR_OpCall(code, addr, result, arguments, info)
|
||||
, _receiver(receiver)
|
||||
, _method(method)
|
||||
, _receiver(receiver)
|
||||
, _method_handle_invoke_SP_save_opr(LIR_OprFact::illegalOpr)
|
||||
{ assert(is_in_range(code, begin_opJavaCall, end_opJavaCall), "code check"); }
|
||||
|
||||
@ -1189,8 +1191,8 @@ class LIR_OpJavaCall: public LIR_OpCall {
|
||||
LIR_Opr receiver, LIR_Opr result, intptr_t vtable_offset,
|
||||
LIR_OprList* arguments, CodeEmitInfo* info)
|
||||
: LIR_OpCall(code, (address)vtable_offset, result, arguments, info)
|
||||
, _receiver(receiver)
|
||||
, _method(method)
|
||||
, _receiver(receiver)
|
||||
, _method_handle_invoke_SP_save_opr(LIR_OprFact::illegalOpr)
|
||||
{ assert(is_in_range(code, begin_opJavaCall, end_opJavaCall), "code check"); }
|
||||
|
||||
@ -1345,14 +1347,14 @@ class LIR_Op1: public LIR_Op {
|
||||
LIR_Op1(LIR_Code code, LIR_Opr opr, LIR_Opr result = LIR_OprFact::illegalOpr, BasicType type = T_ILLEGAL, LIR_PatchCode patch = lir_patch_none, CodeEmitInfo* info = NULL)
|
||||
: LIR_Op(code, result, info)
|
||||
, _opr(opr)
|
||||
, _patch(patch)
|
||||
, _type(type) { assert(is_in_range(code, begin_op1, end_op1), "code check"); }
|
||||
, _type(type)
|
||||
, _patch(patch) { assert(is_in_range(code, begin_op1, end_op1), "code check"); }
|
||||
|
||||
LIR_Op1(LIR_Code code, LIR_Opr opr, LIR_Opr result, BasicType type, LIR_PatchCode patch, CodeEmitInfo* info, LIR_MoveKind kind)
|
||||
: LIR_Op(code, result, info)
|
||||
, _opr(opr)
|
||||
, _patch(patch)
|
||||
, _type(type) {
|
||||
, _type(type)
|
||||
, _patch(patch) {
|
||||
assert(code == lir_move, "must be");
|
||||
set_kind(kind);
|
||||
}
|
||||
@ -1360,8 +1362,8 @@ class LIR_Op1: public LIR_Op {
|
||||
LIR_Op1(LIR_Code code, LIR_Opr opr, CodeEmitInfo* info)
|
||||
: LIR_Op(code, LIR_OprFact::illegalOpr, info)
|
||||
, _opr(opr)
|
||||
, _patch(lir_patch_none)
|
||||
, _type(T_ILLEGAL) { assert(is_in_range(code, begin_op1, end_op1), "code check"); }
|
||||
, _type(T_ILLEGAL)
|
||||
, _patch(lir_patch_none) { assert(is_in_range(code, begin_op1, end_op1), "code check"); }
|
||||
|
||||
LIR_Opr in_opr() const { return _opr; }
|
||||
LIR_PatchCode patch_code() const { return _patch; }
|
||||
@ -1462,8 +1464,8 @@ class LIR_OpConvert: public LIR_Op1 {
|
||||
public:
|
||||
LIR_OpConvert(Bytecodes::Code code, LIR_Opr opr, LIR_Opr result, ConversionStub* stub)
|
||||
: LIR_Op1(lir_convert, opr, result)
|
||||
, _stub(stub)
|
||||
, _bytecode(code) {}
|
||||
, _bytecode(code)
|
||||
, _stub(stub) {}
|
||||
|
||||
Bytecodes::Code bytecode() const { return _bytecode; }
|
||||
ConversionStub* stub() const { return _stub; }
|
||||
@ -1501,8 +1503,8 @@ class LIR_OpAllocObj : public LIR_Op1 {
|
||||
, _tmp4(t4)
|
||||
, _hdr_size(hdr_size)
|
||||
, _obj_size(obj_size)
|
||||
, _init_check(init_check)
|
||||
, _stub(stub) { }
|
||||
, _stub(stub)
|
||||
, _init_check(init_check) { }
|
||||
|
||||
LIR_Opr klass() const { return in_opr(); }
|
||||
LIR_Opr obj() const { return result_opr(); }
|
||||
@ -1611,31 +1613,31 @@ class LIR_Op2: public LIR_Op {
|
||||
public:
|
||||
LIR_Op2(LIR_Code code, LIR_Condition condition, LIR_Opr opr1, LIR_Opr opr2, CodeEmitInfo* info = NULL)
|
||||
: LIR_Op(code, LIR_OprFact::illegalOpr, info)
|
||||
, _fpu_stack_size(0)
|
||||
, _opr1(opr1)
|
||||
, _opr2(opr2)
|
||||
, _type(T_ILLEGAL)
|
||||
, _condition(condition)
|
||||
, _fpu_stack_size(0)
|
||||
, _tmp1(LIR_OprFact::illegalOpr)
|
||||
, _tmp2(LIR_OprFact::illegalOpr)
|
||||
, _tmp3(LIR_OprFact::illegalOpr)
|
||||
, _tmp4(LIR_OprFact::illegalOpr)
|
||||
, _tmp5(LIR_OprFact::illegalOpr) {
|
||||
, _tmp5(LIR_OprFact::illegalOpr)
|
||||
, _condition(condition) {
|
||||
assert(code == lir_cmp || code == lir_assert, "code check");
|
||||
}
|
||||
|
||||
LIR_Op2(LIR_Code code, LIR_Condition condition, LIR_Opr opr1, LIR_Opr opr2, LIR_Opr result, BasicType type)
|
||||
: LIR_Op(code, result, NULL)
|
||||
, _fpu_stack_size(0)
|
||||
, _opr1(opr1)
|
||||
, _opr2(opr2)
|
||||
, _type(type)
|
||||
, _condition(condition)
|
||||
, _fpu_stack_size(0)
|
||||
, _tmp1(LIR_OprFact::illegalOpr)
|
||||
, _tmp2(LIR_OprFact::illegalOpr)
|
||||
, _tmp3(LIR_OprFact::illegalOpr)
|
||||
, _tmp4(LIR_OprFact::illegalOpr)
|
||||
, _tmp5(LIR_OprFact::illegalOpr) {
|
||||
, _tmp5(LIR_OprFact::illegalOpr)
|
||||
, _condition(condition) {
|
||||
assert(code == lir_cmove, "code check");
|
||||
assert(type != T_ILLEGAL, "cmove should have type");
|
||||
}
|
||||
@ -1643,32 +1645,32 @@ class LIR_Op2: public LIR_Op {
|
||||
LIR_Op2(LIR_Code code, LIR_Opr opr1, LIR_Opr opr2, LIR_Opr result = LIR_OprFact::illegalOpr,
|
||||
CodeEmitInfo* info = NULL, BasicType type = T_ILLEGAL)
|
||||
: LIR_Op(code, result, info)
|
||||
, _fpu_stack_size(0)
|
||||
, _opr1(opr1)
|
||||
, _opr2(opr2)
|
||||
, _type(type)
|
||||
, _condition(lir_cond_unknown)
|
||||
, _fpu_stack_size(0)
|
||||
, _tmp1(LIR_OprFact::illegalOpr)
|
||||
, _tmp2(LIR_OprFact::illegalOpr)
|
||||
, _tmp3(LIR_OprFact::illegalOpr)
|
||||
, _tmp4(LIR_OprFact::illegalOpr)
|
||||
, _tmp5(LIR_OprFact::illegalOpr) {
|
||||
, _tmp5(LIR_OprFact::illegalOpr)
|
||||
, _condition(lir_cond_unknown) {
|
||||
assert(code != lir_cmp && is_in_range(code, begin_op2, end_op2), "code check");
|
||||
}
|
||||
|
||||
LIR_Op2(LIR_Code code, LIR_Opr opr1, LIR_Opr opr2, LIR_Opr result, LIR_Opr tmp1, LIR_Opr tmp2 = LIR_OprFact::illegalOpr,
|
||||
LIR_Opr tmp3 = LIR_OprFact::illegalOpr, LIR_Opr tmp4 = LIR_OprFact::illegalOpr, LIR_Opr tmp5 = LIR_OprFact::illegalOpr)
|
||||
: LIR_Op(code, result, NULL)
|
||||
, _fpu_stack_size(0)
|
||||
, _opr1(opr1)
|
||||
, _opr2(opr2)
|
||||
, _type(T_ILLEGAL)
|
||||
, _condition(lir_cond_unknown)
|
||||
, _fpu_stack_size(0)
|
||||
, _tmp1(tmp1)
|
||||
, _tmp2(tmp2)
|
||||
, _tmp3(tmp3)
|
||||
, _tmp4(tmp4)
|
||||
, _tmp5(tmp5) {
|
||||
, _tmp5(tmp5)
|
||||
, _condition(lir_cond_unknown) {
|
||||
assert(code != lir_cmp && is_in_range(code, begin_op2, end_op2), "code check");
|
||||
}
|
||||
|
||||
@ -1833,8 +1835,8 @@ class LIR_OpAssert : public LIR_Op2 {
|
||||
public:
|
||||
LIR_OpAssert(LIR_Condition condition, LIR_Opr opr1, LIR_Opr opr2, const char* msg, bool halt)
|
||||
: LIR_Op2(lir_assert, condition, opr1, opr2)
|
||||
, _halt(halt)
|
||||
, _msg(msg) {
|
||||
, _msg(msg)
|
||||
, _halt(halt) {
|
||||
}
|
||||
|
||||
const char* msg() const { return _msg; }
|
||||
@ -1942,9 +1944,9 @@ class LIR_OpProfileType : public LIR_Op {
|
||||
: LIR_Op(lir_profile_type, LIR_OprFact::illegalOpr, NULL) // no result, no info
|
||||
, _mdp(mdp)
|
||||
, _obj(obj)
|
||||
, _tmp(tmp)
|
||||
, _exact_klass(exact_klass)
|
||||
, _current_klass(current_klass)
|
||||
, _tmp(tmp)
|
||||
, _not_null(not_null)
|
||||
, _no_conflict(no_conflict) { }
|
||||
|
||||
|
@ -99,9 +99,9 @@ PatchingStub::PatchID LIR_Assembler::patching_id(CodeEmitInfo* info) {
|
||||
|
||||
|
||||
LIR_Assembler::LIR_Assembler(Compilation* c):
|
||||
_compilation(c)
|
||||
, _masm(c->masm())
|
||||
_masm(c->masm())
|
||||
, _bs(BarrierSet::barrier_set())
|
||||
, _compilation(c)
|
||||
, _frame_map(c->frame_map())
|
||||
, _current_block(NULL)
|
||||
, _pending_non_safepoint(NULL)
|
||||
|
@ -74,6 +74,7 @@ LinearScan::LinearScan(IR* ir, LIRGenerator* gen, FrameMap* frame_map)
|
||||
, _ir(ir)
|
||||
, _gen(gen)
|
||||
, _frame_map(frame_map)
|
||||
, _cached_blocks(*ir->linear_scan_order())
|
||||
, _num_virtual_regs(gen->max_virtual_register_number())
|
||||
, _has_fpu_registers(false)
|
||||
, _num_calls(-1)
|
||||
@ -87,9 +88,8 @@ LinearScan::LinearScan(IR* ir, LIRGenerator* gen, FrameMap* frame_map)
|
||||
, _block_of_op(0) // initialized later with correct length
|
||||
, _has_info(0)
|
||||
, _has_call(0)
|
||||
, _scope_value_cache(0) // initialized later with correct length
|
||||
, _interval_in_loop(0) // initialized later with correct length
|
||||
, _cached_blocks(*ir->linear_scan_order())
|
||||
, _scope_value_cache(0) // initialized later with correct length
|
||||
#ifdef X86
|
||||
, _fpu_stack_allocator(NULL)
|
||||
#endif
|
||||
@ -3717,13 +3717,13 @@ void RegisterVerifier::process_operations(LIR_List* ops, IntervalList* input_sta
|
||||
|
||||
MoveResolver::MoveResolver(LinearScan* allocator) :
|
||||
_allocator(allocator),
|
||||
_multiple_reads_allowed(false),
|
||||
_insert_list(NULL),
|
||||
_insert_idx(-1),
|
||||
_insertion_buffer(),
|
||||
_mapping_from(8),
|
||||
_mapping_from_opr(8),
|
||||
_mapping_to(8),
|
||||
_insert_list(NULL),
|
||||
_insert_idx(-1),
|
||||
_insertion_buffer()
|
||||
_multiple_reads_allowed(false)
|
||||
{
|
||||
for (int i = 0; i < LinearScan::nof_regs; i++) {
|
||||
_register_blocked[i] = 0;
|
||||
@ -4127,9 +4127,9 @@ Interval::Interval(int reg_num) :
|
||||
_split_children(0),
|
||||
_canonical_spill_slot(-1),
|
||||
_insert_move_when_activated(false),
|
||||
_register_hint(NULL),
|
||||
_spill_state(noDefinitionFound),
|
||||
_spill_definition_pos(-1)
|
||||
_spill_definition_pos(-1),
|
||||
_register_hint(NULL)
|
||||
{
|
||||
_split_parent = this;
|
||||
_current_split_child = this;
|
||||
|
@ -47,7 +47,7 @@ class CE_Eliminator: public BlockClosure {
|
||||
int _has_substitution;
|
||||
|
||||
public:
|
||||
CE_Eliminator(IR* hir) : _cee_count(0), _ifop_count(0), _hir(hir) {
|
||||
CE_Eliminator(IR* hir) : _hir(hir), _cee_count(0), _ifop_count(0) {
|
||||
_has_substitution = false;
|
||||
_hir->iterate_preorder(this);
|
||||
if (_has_substitution) {
|
||||
@ -592,10 +592,10 @@ class NullCheckEliminator: public ValueVisitor {
|
||||
// constructor
|
||||
NullCheckEliminator(Optimizer* opt)
|
||||
: _opt(opt)
|
||||
, _work_list(new BlockList())
|
||||
, _set(new ValueSet())
|
||||
, _last_explicit_null_check(NULL)
|
||||
, _block_states(BlockBegin::number_of_blocks(), BlockBegin::number_of_blocks(), NULL)
|
||||
, _work_list(new BlockList()) {
|
||||
, _last_explicit_null_check(NULL) {
|
||||
_visitable_instructions = new ValueSet();
|
||||
_visitor.set_eliminator(this);
|
||||
CompileLog* log = _opt->ir()->compilation()->log();
|
||||
|
@ -485,9 +485,9 @@ bool ShortLoopOptimizer::process(BlockBegin* loop_header) {
|
||||
|
||||
|
||||
GlobalValueNumbering::GlobalValueNumbering(IR* ir)
|
||||
: _current_map(NULL)
|
||||
: _compilation(ir->compilation())
|
||||
, _current_map(NULL)
|
||||
, _value_maps(ir->linear_scan_order()->length(), ir->linear_scan_order()->length(), NULL)
|
||||
, _compilation(ir->compilation())
|
||||
{
|
||||
TRACE_VALUE_NUMBERING(tty->print_cr("****** start of global value numbering"));
|
||||
|
||||
|
@ -104,7 +104,7 @@ class ValueType: public CompilationResourceObj {
|
||||
const ValueTag _tag;
|
||||
ValueType();
|
||||
protected:
|
||||
ValueType(ValueTag tag, int size): _tag(tag), _size(size) {}
|
||||
ValueType(ValueTag tag, int size): _size(size), _tag(tag) {}
|
||||
|
||||
public:
|
||||
// initialization
|
||||
|
@ -1447,8 +1447,8 @@ void BCEscapeAnalyzer::dump() {
|
||||
#endif
|
||||
|
||||
BCEscapeAnalyzer::BCEscapeAnalyzer(ciMethod* method, BCEscapeAnalyzer* parent)
|
||||
: _conservative(method == NULL || !EstimateArgEscape)
|
||||
, _arena(CURRENT_ENV->arena())
|
||||
: _arena(CURRENT_ENV->arena())
|
||||
, _conservative(method == NULL || !EstimateArgEscape)
|
||||
, _method(method)
|
||||
, _methodData(method ? method->method_data() : NULL)
|
||||
, _arg_size(method ? method->arg_size() : 0)
|
||||
|
@ -166,16 +166,16 @@ ciMethod::ciMethod(ciInstanceKlass* holder,
|
||||
ciMetadata((Metadata*)NULL),
|
||||
_name( name),
|
||||
_holder( holder),
|
||||
_intrinsic_id( vmIntrinsics::_none),
|
||||
_liveness( NULL),
|
||||
_can_be_statically_bound(false),
|
||||
_method_data( NULL),
|
||||
_method_blocks( NULL),
|
||||
_method_data( NULL)
|
||||
_intrinsic_id( vmIntrinsics::_none),
|
||||
_instructions_size(-1),
|
||||
_can_be_statically_bound(false),
|
||||
_liveness( NULL)
|
||||
#if defined(COMPILER2)
|
||||
,
|
||||
_flow( NULL),
|
||||
_bcea( NULL),
|
||||
_instructions_size(-1)
|
||||
_bcea( NULL)
|
||||
#endif // COMPILER2
|
||||
{
|
||||
// Usually holder and accessor are the same type but in some cases
|
||||
|
@ -345,13 +345,13 @@ void ciMethodBlocks::dump() {
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
ciBlock::ciBlock(ciMethod *method, int index, int start_bci) :
|
||||
_idx(index), _start_bci(start_bci), _limit_bci(-1), _control_bci(fall_through_bci),
|
||||
_flags(0), _ex_start_bci(-1), _ex_limit_bci(-1)
|
||||
#ifndef PRODUCT
|
||||
_method(method),
|
||||
, _method(method)
|
||||
#endif
|
||||
_idx(index), _flags(0), _start_bci(start_bci), _limit_bci(-1), _control_bci(fall_through_bci),
|
||||
_ex_start_bci(-1), _ex_limit_bci(-1) {
|
||||
{
|
||||
}
|
||||
|
||||
void ciBlock::set_exception_range(int start_bci, int limit_bci) {
|
||||
|
@ -724,8 +724,8 @@ public:
|
||||
|
||||
public:
|
||||
Loop(Block* head, Block* tail) :
|
||||
_head(head), _tail(tail),
|
||||
_parent(NULL), _sibling(NULL), _child(NULL),
|
||||
_head(head), _tail(tail),
|
||||
_irreducible(false), _def_locals() {}
|
||||
|
||||
Loop* parent() const { return _parent; }
|
||||
|
@ -71,22 +71,22 @@ unsigned int CodeBlob::allocation_size(CodeBuffer* cb, int header_size) {
|
||||
}
|
||||
|
||||
CodeBlob::CodeBlob(const char* name, CompilerType type, const CodeBlobLayout& layout, int frame_complete_offset, int frame_size, ImmutableOopMapSet* oop_maps, bool caller_must_gc_arguments) :
|
||||
_name(name),
|
||||
_type(type),
|
||||
_size(layout.size()),
|
||||
_header_size(layout.header_size()),
|
||||
_frame_complete_offset(frame_complete_offset),
|
||||
_data_offset(layout.data_offset()),
|
||||
_frame_size(frame_size),
|
||||
_strings(CodeStrings()),
|
||||
_oop_maps(oop_maps),
|
||||
_caller_must_gc_arguments(caller_must_gc_arguments),
|
||||
_code_begin(layout.code_begin()),
|
||||
_code_end(layout.code_end()),
|
||||
_content_begin(layout.content_begin()),
|
||||
_data_end(layout.data_end()),
|
||||
_relocation_begin(layout.relocation_begin()),
|
||||
_relocation_end(layout.relocation_end()),
|
||||
_content_begin(layout.content_begin()),
|
||||
_type(type)
|
||||
_oop_maps(oop_maps),
|
||||
_caller_must_gc_arguments(caller_must_gc_arguments),
|
||||
_strings(CodeStrings()),
|
||||
_name(name)
|
||||
{
|
||||
assert(is_aligned(layout.size(), oopSize), "unaligned size");
|
||||
assert(is_aligned(layout.header_size(), oopSize), "unaligned size");
|
||||
@ -99,21 +99,21 @@ CodeBlob::CodeBlob(const char* name, CompilerType type, const CodeBlobLayout& la
|
||||
}
|
||||
|
||||
CodeBlob::CodeBlob(const char* name, CompilerType type, const CodeBlobLayout& layout, CodeBuffer* cb, int frame_complete_offset, int frame_size, OopMapSet* oop_maps, bool caller_must_gc_arguments) :
|
||||
_name(name),
|
||||
_type(type),
|
||||
_size(layout.size()),
|
||||
_header_size(layout.header_size()),
|
||||
_frame_complete_offset(frame_complete_offset),
|
||||
_data_offset(layout.data_offset()),
|
||||
_frame_size(frame_size),
|
||||
_strings(CodeStrings()),
|
||||
_caller_must_gc_arguments(caller_must_gc_arguments),
|
||||
_code_begin(layout.code_begin()),
|
||||
_code_end(layout.code_end()),
|
||||
_content_begin(layout.content_begin()),
|
||||
_data_end(layout.data_end()),
|
||||
_relocation_begin(layout.relocation_begin()),
|
||||
_relocation_end(layout.relocation_end()),
|
||||
_content_begin(layout.content_begin()),
|
||||
_type(type)
|
||||
_caller_must_gc_arguments(caller_must_gc_arguments),
|
||||
_strings(CodeStrings()),
|
||||
_name(name)
|
||||
{
|
||||
assert(is_aligned(_size, oopSize), "unaligned size");
|
||||
assert(is_aligned(_header_size, oopSize), "unaligned size");
|
||||
|
@ -268,10 +268,10 @@ public:
|
||||
_content_offset(0),
|
||||
_code_offset(0),
|
||||
_data_offset(0),
|
||||
_content_begin(content_begin),
|
||||
_content_end(content_end),
|
||||
_code_begin(code_begin),
|
||||
_code_end(code_end),
|
||||
_content_begin(content_begin),
|
||||
_content_end(content_end),
|
||||
_data_end(data_end),
|
||||
_relocation_begin(relocation_begin),
|
||||
_relocation_end(relocation_end)
|
||||
|
@ -126,7 +126,7 @@ class CompiledICInfo : public StackObj {
|
||||
}
|
||||
|
||||
CompiledICInfo(): _entry(NULL), _cached_value(NULL), _is_icholder(false),
|
||||
_to_interpreter(false), _to_aot(false), _is_optimized(false), _release_icholder(false) {
|
||||
_is_optimized(false), _to_interpreter(false), _to_aot(false), _release_icholder(false) {
|
||||
}
|
||||
~CompiledICInfo() {
|
||||
// In rare cases the info is computed but not used, so release any
|
||||
|
@ -39,13 +39,13 @@
|
||||
|
||||
CompiledMethod::CompiledMethod(Method* method, const char* name, CompilerType type, const CodeBlobLayout& layout, int frame_complete_offset, int frame_size, ImmutableOopMapSet* oop_maps, bool caller_must_gc_arguments)
|
||||
: CodeBlob(name, type, layout, frame_complete_offset, frame_size, oop_maps, caller_must_gc_arguments),
|
||||
_method(method), _mark_for_deoptimization_status(not_marked) {
|
||||
_mark_for_deoptimization_status(not_marked), _method(method) {
|
||||
init_defaults();
|
||||
}
|
||||
|
||||
CompiledMethod::CompiledMethod(Method* method, const char* name, CompilerType type, int size, int header_size, CodeBuffer* cb, int frame_complete_offset, int frame_size, OopMapSet* oop_maps, bool caller_must_gc_arguments)
|
||||
: CodeBlob(name, type, CodeBlobLayout((address) this, size, header_size, cb), cb, frame_complete_offset, frame_size, oop_maps, caller_must_gc_arguments),
|
||||
_method(method), _mark_for_deoptimization_status(not_marked) {
|
||||
_mark_for_deoptimization_status(not_marked), _method(method) {
|
||||
init_defaults();
|
||||
}
|
||||
|
||||
|
@ -509,9 +509,9 @@ class Dependencies: public ResourceObj {
|
||||
bool _valid;
|
||||
void* _value;
|
||||
public:
|
||||
DepArgument() : _is_oop(false), _value(NULL), _valid(false) {}
|
||||
DepArgument(oop v): _is_oop(true), _value(v), _valid(true) {}
|
||||
DepArgument(Metadata* v): _is_oop(false), _value(v), _valid(true) {}
|
||||
DepArgument() : _is_oop(false), _valid(false), _value(NULL) {}
|
||||
DepArgument(oop v): _is_oop(true), _valid(true), _value(v) {}
|
||||
DepArgument(Metadata* v): _is_oop(false), _valid(true), _value(v) {}
|
||||
|
||||
bool is_null() const { return _value == NULL; }
|
||||
bool is_oop() const { return _is_oop; }
|
||||
@ -582,15 +582,15 @@ class Dependencies: public ResourceObj {
|
||||
|
||||
public:
|
||||
DepStream(Dependencies* deps)
|
||||
: _deps(deps),
|
||||
_code(NULL),
|
||||
: _code(NULL),
|
||||
_deps(deps),
|
||||
_bytes(deps->content_bytes())
|
||||
{
|
||||
initial_asserts(deps->size_in_bytes());
|
||||
}
|
||||
DepStream(nmethod* code)
|
||||
: _deps(NULL),
|
||||
_code(code),
|
||||
: _code(code),
|
||||
_deps(NULL),
|
||||
_bytes(code->dependencies_begin())
|
||||
{
|
||||
initial_asserts(code->dependencies_size());
|
||||
|
@ -53,7 +53,7 @@ class nmethodBucket: public CHeapObj<mtClass> {
|
||||
|
||||
public:
|
||||
nmethodBucket(nmethod* nmethod, nmethodBucket* next) :
|
||||
_nmethod(nmethod), _next(next), _count(1) {}
|
||||
_nmethod(nmethod), _count(1), _next(next) {}
|
||||
|
||||
int count() { return _count; }
|
||||
int increment() { _count += 1; return _count; }
|
||||
|
@ -147,7 +147,7 @@ class ImplicitExceptionTable {
|
||||
implicit_null_entry *adr( uint idx ) const { return &_data[2*idx]; }
|
||||
ReallocMark _nesting; // assertion check for reallocations
|
||||
public:
|
||||
ImplicitExceptionTable( ) : _data(0), _size(0), _len(0) { }
|
||||
ImplicitExceptionTable( ) : _size(0), _len(0), _data(0) { }
|
||||
// (run-time) construction from nmethod
|
||||
ImplicitExceptionTable( const nmethod *nm );
|
||||
|
||||
|
@ -162,7 +162,7 @@ template class ValueRecorder<jobject>;
|
||||
|
||||
oop ObjectLookup::ObjectEntry::oop_value() const { return JNIHandles::resolve(_value); }
|
||||
|
||||
ObjectLookup::ObjectLookup(): _gc_count(Universe::heap()->total_collections()), _values(4) {}
|
||||
ObjectLookup::ObjectLookup(): _values(4), _gc_count(Universe::heap()->total_collections()) {}
|
||||
|
||||
void ObjectLookup::maybe_resort() {
|
||||
// The values are kept sorted by address which may be invalidated
|
||||
|
@ -49,8 +49,8 @@ class VtableStub {
|
||||
void* operator new(size_t size, int code_size) throw();
|
||||
|
||||
VtableStub(bool is_vtable_stub, int index)
|
||||
: _next(NULL), _is_vtable_stub(is_vtable_stub),
|
||||
_index(index), _ame_offset(-1), _npe_offset(-1) {}
|
||||
: _next(NULL), _index(index), _ame_offset(-1), _npe_offset(-1),
|
||||
_is_vtable_stub(is_vtable_stub) {}
|
||||
VtableStub* next() const { return _next; }
|
||||
int index() const { return _index; }
|
||||
static VMReg receiver_location() { return _receiver_location; }
|
||||
|
@ -91,7 +91,7 @@ class AbstractCompiler : public CHeapObj<mtCompiler> {
|
||||
#endif
|
||||
|
||||
public:
|
||||
AbstractCompiler(CompilerType type) : _type(type), _compiler_state(uninitialized), _num_compiler_threads(0) {}
|
||||
AbstractCompiler(CompilerType type) : _num_compiler_threads(0), _compiler_state(uninitialized), _type(type) {}
|
||||
|
||||
// This function determines the compiler thread that will perform the
|
||||
// shutdown of the corresponding compiler runtime.
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include "memory/allocation.inline.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
|
||||
CompilerDirectives::CompilerDirectives() :_match(NULL), _next(NULL), _ref_count(0) {
|
||||
CompilerDirectives::CompilerDirectives() : _next(NULL), _match(NULL), _ref_count(0) {
|
||||
_c1_store = new DirectiveSet(this);
|
||||
_c2_store = new DirectiveSet(this);
|
||||
};
|
||||
|
@ -569,11 +569,11 @@ void MethodLiveness::print_times() {
|
||||
|
||||
|
||||
MethodLiveness::BasicBlock::BasicBlock(MethodLiveness *analyzer, int start, int limit) :
|
||||
_gen(analyzer->arena(), analyzer->bit_map_size_bits()),
|
||||
_kill(analyzer->arena(), analyzer->bit_map_size_bits()),
|
||||
_entry(analyzer->arena(), analyzer->bit_map_size_bits()),
|
||||
_normal_exit(analyzer->arena(), analyzer->bit_map_size_bits()),
|
||||
_exception_exit(analyzer->arena(), analyzer->bit_map_size_bits()),
|
||||
_gen(analyzer->arena(), analyzer->bit_map_size_bits()),
|
||||
_kill(analyzer->arena(), analyzer->bit_map_size_bits()),
|
||||
_last_bci(-1) {
|
||||
_analyzer = analyzer;
|
||||
_start_bci = start;
|
||||
|
@ -62,11 +62,11 @@
|
||||
#define RANGESLASH "[*" RANGEBASE "/]"
|
||||
|
||||
MethodMatcher::MethodMatcher():
|
||||
_class_mode(Exact)
|
||||
, _method_mode(Exact)
|
||||
, _class_name(NULL)
|
||||
_class_name(NULL)
|
||||
, _method_name(NULL)
|
||||
, _signature(NULL) {
|
||||
, _signature(NULL)
|
||||
, _class_mode(Exact)
|
||||
, _method_mode(Exact) {
|
||||
}
|
||||
|
||||
MethodMatcher::~MethodMatcher() {
|
||||
|
@ -604,7 +604,7 @@ int ImmutableOopMap::nr_of_bytes() const {
|
||||
}
|
||||
#endif
|
||||
|
||||
ImmutableOopMapBuilder::ImmutableOopMapBuilder(const OopMapSet* set) : _set(set), _new_set(NULL), _empty(NULL), _last(NULL), _empty_offset(-1), _last_offset(-1), _offset(0), _required(-1) {
|
||||
ImmutableOopMapBuilder::ImmutableOopMapBuilder(const OopMapSet* set) : _set(set), _empty(NULL), _last(NULL), _empty_offset(-1), _last_offset(-1), _offset(0), _required(-1), _new_set(NULL) {
|
||||
_mapping = NEW_RESOURCE_ARRAY(Mapping, _set->size());
|
||||
}
|
||||
|
||||
|
@ -33,9 +33,9 @@
|
||||
|
||||
ArrayCopyNode::ArrayCopyNode(Compile* C, bool alloc_tightly_coupled, bool has_negative_length_guard)
|
||||
: CallNode(arraycopy_type(), NULL, TypeRawPtr::BOTTOM),
|
||||
_kind(None),
|
||||
_alloc_tightly_coupled(alloc_tightly_coupled),
|
||||
_has_negative_length_guard(has_negative_length_guard),
|
||||
_kind(None),
|
||||
_arguments_validated(false),
|
||||
_src_type(TypeOopPtr::BOTTOM),
|
||||
_dest_type(TypeOopPtr::BOTTOM) {
|
||||
|
@ -359,10 +359,10 @@ void Block::dump(const PhaseCFG* cfg) const {
|
||||
|
||||
PhaseCFG::PhaseCFG(Arena* arena, RootNode* root, Matcher& matcher)
|
||||
: Phase(CFG)
|
||||
, _root(root)
|
||||
, _block_arena(arena)
|
||||
, _regalloc(NULL)
|
||||
, _scheduling_for_pressure(false)
|
||||
, _root(root)
|
||||
, _matcher(matcher)
|
||||
, _node_to_block_mapping(arena)
|
||||
, _node_latency(NULL)
|
||||
|
@ -55,7 +55,7 @@ protected:
|
||||
void grow( uint i ); // Grow array node to fit
|
||||
|
||||
public:
|
||||
Block_Array(Arena *a) : _arena(a), _size(OptoBlockListSize) {
|
||||
Block_Array(Arena *a) : _size(OptoBlockListSize), _arena(a) {
|
||||
debug_only(_limit=0);
|
||||
_blocks = NEW_ARENA_ARRAY( a, Block *, OptoBlockListSize );
|
||||
for( int i = 0; i < OptoBlockListSize; i++ ) {
|
||||
@ -752,7 +752,7 @@ class CFGEdge : public ResourceObj {
|
||||
|
||||
CFGEdge(Block *from, Block *to, double freq, int from_pct, int to_pct) :
|
||||
_from(from), _to(to), _freq(freq),
|
||||
_from_pct(from_pct), _to_pct(to_pct), _state(open) {
|
||||
_state(open), _from_pct(from_pct), _to_pct(to_pct) {
|
||||
_infrequent = from_infrequent() || to_infrequent();
|
||||
}
|
||||
|
||||
@ -800,11 +800,11 @@ class Trace : public ResourceObj {
|
||||
public:
|
||||
|
||||
Trace(Block *b, Block **next_list, Block **prev_list) :
|
||||
_first(b),
|
||||
_last(b),
|
||||
_id(b->_pre_order),
|
||||
_next_list(next_list),
|
||||
_prev_list(prev_list),
|
||||
_id(b->_pre_order) {
|
||||
_first(b),
|
||||
_last(b) {
|
||||
set_next(b, NULL);
|
||||
set_prev(b, NULL);
|
||||
};
|
||||
|
@ -44,11 +44,11 @@ InlineTree::InlineTree(Compile* c,
|
||||
float site_invoke_ratio, int max_inline_level) :
|
||||
C(c),
|
||||
_caller_jvms(caller_jvms),
|
||||
_caller_tree((InlineTree*) caller_tree),
|
||||
_method(callee),
|
||||
_caller_tree((InlineTree*) caller_tree),
|
||||
_count_inline_bcs(method()->code_size_for_inlining()),
|
||||
_site_invoke_ratio(site_invoke_ratio),
|
||||
_max_inline_level(max_inline_level),
|
||||
_count_inline_bcs(method()->code_size_for_inlining()),
|
||||
_subtrees(c->comp_arena(), 2, 0, NULL),
|
||||
_msg(NULL)
|
||||
{
|
||||
|
@ -298,7 +298,7 @@ class LateInlineCallGenerator : public DirectCallGenerator {
|
||||
|
||||
public:
|
||||
LateInlineCallGenerator(ciMethod* method, CallGenerator* inline_cg) :
|
||||
DirectCallGenerator(method, true), _inline_cg(inline_cg), _unique_id(0) {}
|
||||
DirectCallGenerator(method, true), _unique_id(0), _inline_cg(inline_cg) {}
|
||||
|
||||
virtual bool is_late_inline() const { return true; }
|
||||
|
||||
|
@ -1278,11 +1278,11 @@ SafePointScalarObjectNode::SafePointScalarObjectNode(const TypeOopPtr* tp,
|
||||
uint first_index,
|
||||
uint n_fields) :
|
||||
TypeNode(tp, 1), // 1 control input -- seems required. Get from root.
|
||||
#ifdef ASSERT
|
||||
_alloc(alloc),
|
||||
#endif
|
||||
_first_index(first_index),
|
||||
_n_fields(n_fields)
|
||||
#ifdef ASSERT
|
||||
, _alloc(alloc)
|
||||
#endif
|
||||
{
|
||||
init_class_id(Class_SafePointScalarObject);
|
||||
}
|
||||
|
@ -329,8 +329,8 @@ public:
|
||||
// A plain safepoint advertises no memory effects (NULL):
|
||||
const TypePtr* adr_type = NULL)
|
||||
: MultiNode( edges ),
|
||||
_jvms(jvms),
|
||||
_oop_map(NULL),
|
||||
_jvms(jvms),
|
||||
_adr_type(adr_type)
|
||||
{
|
||||
init_class_id(Class_SafePoint);
|
||||
@ -663,10 +663,10 @@ public:
|
||||
const int _bci; // Byte Code Index of call byte code
|
||||
CallJavaNode(const TypeFunc* tf , address addr, ciMethod* method, int bci)
|
||||
: CallNode(tf, addr, TypePtr::BOTTOM),
|
||||
_method(method), _bci(bci),
|
||||
_optimized_virtual(false),
|
||||
_method_handle_invoke(false),
|
||||
_override_symbolic_info(false)
|
||||
_override_symbolic_info(false),
|
||||
_method(method), _bci(bci)
|
||||
{
|
||||
init_class_id(Class_CallJava);
|
||||
}
|
||||
|
@ -201,20 +201,20 @@ PhaseChaitin::PhaseChaitin(uint unique, PhaseCFG &cfg, Matcher &matcher, bool sc
|
||||
NULL
|
||||
#endif
|
||||
)
|
||||
, _lrg_map(Thread::current()->resource_area(), unique)
|
||||
, _live(0)
|
||||
, _spilled_once(Thread::current()->resource_area())
|
||||
, _spilled_twice(Thread::current()->resource_area())
|
||||
, _lo_degree(0), _lo_stk_degree(0), _hi_degree(0), _simplified(0)
|
||||
, _oldphi(unique)
|
||||
#ifndef PRODUCT
|
||||
, _trace_spilling(C->directive()->TraceSpillingOption)
|
||||
#endif
|
||||
, _lrg_map(Thread::current()->resource_area(), unique)
|
||||
, _scheduling_info_generated(scheduling_info_generated)
|
||||
, _sched_int_pressure(0, INTPRESSURE)
|
||||
, _sched_float_pressure(0, FLOATPRESSURE)
|
||||
, _scratch_int_pressure(0, INTPRESSURE)
|
||||
, _scratch_float_pressure(0, FLOATPRESSURE)
|
||||
#ifndef PRODUCT
|
||||
, _trace_spilling(C->directive()->TraceSpillingOption)
|
||||
#endif
|
||||
{
|
||||
Compile::TracePhase tp("ctorChaitin", &timers[_t_ctorChaitin]);
|
||||
|
||||
|
@ -350,9 +350,9 @@ public:
|
||||
}
|
||||
|
||||
LiveRangeMap(Arena* arena, uint unique)
|
||||
: _names(arena, unique, unique, 0)
|
||||
: _max_lrg_id(0)
|
||||
, _uf_map(arena, unique, unique, 0)
|
||||
, _max_lrg_id(0) {}
|
||||
, _names(arena, unique, unique, 0) {}
|
||||
|
||||
uint find_id( const Node *n ) {
|
||||
uint retval = live_range_id(n);
|
||||
|
@ -636,62 +636,67 @@ debug_only( int Compile::_debug_idx = 100000; )
|
||||
Compile::Compile( ciEnv* ci_env, C2Compiler* compiler, ciMethod* target, int osr_bci,
|
||||
bool subsume_loads, bool do_escape_analysis, bool eliminate_boxing, DirectiveSet* directive)
|
||||
: Phase(Compiler),
|
||||
_env(ci_env),
|
||||
_directive(directive),
|
||||
_log(ci_env->log()),
|
||||
_compile_id(ci_env->compile_id()),
|
||||
_save_argument_registers(false),
|
||||
_stub_name(NULL),
|
||||
_stub_function(NULL),
|
||||
_stub_entry_point(NULL),
|
||||
_method(target),
|
||||
_barrier_set_state(BarrierSet::barrier_set()->barrier_set_c2()->create_barrier_state(comp_arena())),
|
||||
_entry_bci(osr_bci),
|
||||
_initial_gvn(NULL),
|
||||
_for_igvn(NULL),
|
||||
_warm_calls(NULL),
|
||||
_subsume_loads(subsume_loads),
|
||||
_do_escape_analysis(do_escape_analysis),
|
||||
_eliminate_boxing(eliminate_boxing),
|
||||
_failure_reason(NULL),
|
||||
_code_buffer("Compile::Fill_buffer"),
|
||||
_method(target),
|
||||
_entry_bci(osr_bci),
|
||||
_stub_function(NULL),
|
||||
_stub_name(NULL),
|
||||
_stub_entry_point(NULL),
|
||||
_max_node_limit(MaxNodeLimit),
|
||||
_orig_pc_slot(0),
|
||||
_orig_pc_slot_offset_in_bytes(0),
|
||||
_has_method_handle_invokes(false),
|
||||
_mach_constant_base_node(NULL),
|
||||
_node_bundling_limit(0),
|
||||
_node_bundling_base(NULL),
|
||||
_java_calls(0),
|
||||
_inner_loops(0),
|
||||
_scratch_const_size(-1),
|
||||
_in_scratch_emit_size(false),
|
||||
_dead_node_list(comp_arena()),
|
||||
_dead_node_count(0),
|
||||
_inlining_progress(false),
|
||||
_inlining_incrementally(false),
|
||||
_has_reserved_stack_access(target->has_reserved_stack_access()),
|
||||
#ifndef PRODUCT
|
||||
_trace_opto_output(directive->TraceOptoOutputOption),
|
||||
_in_dump_cnt(0),
|
||||
#endif
|
||||
_has_method_handle_invokes(false),
|
||||
_comp_arena(mtCompiler),
|
||||
_barrier_set_state(BarrierSet::barrier_set()->barrier_set_c2()->create_barrier_state(comp_arena())),
|
||||
_env(ci_env),
|
||||
_directive(directive),
|
||||
_log(ci_env->log()),
|
||||
_failure_reason(NULL),
|
||||
_congraph(NULL),
|
||||
#ifndef PRODUCT
|
||||
_printer(IdealGraphPrinter::printer()),
|
||||
#endif
|
||||
_congraph(NULL),
|
||||
_comp_arena(mtCompiler),
|
||||
_dead_node_list(comp_arena()),
|
||||
_dead_node_count(0),
|
||||
_node_arena(mtCompiler),
|
||||
_old_arena(mtCompiler),
|
||||
_mach_constant_base_node(NULL),
|
||||
_Compile_types(mtCompiler),
|
||||
_replay_inline_data(NULL),
|
||||
_initial_gvn(NULL),
|
||||
_for_igvn(NULL),
|
||||
_warm_calls(NULL),
|
||||
_late_inlines(comp_arena(), 2, 0, NULL),
|
||||
_string_late_inlines(comp_arena(), 2, 0, NULL),
|
||||
_boxing_late_inlines(comp_arena(), 2, 0, NULL),
|
||||
_late_inlines_pos(0),
|
||||
_number_of_mh_late_inlines(0),
|
||||
_inlining_progress(false),
|
||||
_inlining_incrementally(false),
|
||||
_print_inlining_list(NULL),
|
||||
_print_inlining_stream(NULL),
|
||||
_print_inlining_list(NULL),
|
||||
_print_inlining_idx(0),
|
||||
_print_inlining_output(NULL),
|
||||
_replay_inline_data(NULL),
|
||||
_java_calls(0),
|
||||
_inner_loops(0),
|
||||
_interpreter_frame_size(0),
|
||||
_max_node_limit(MaxNodeLimit),
|
||||
_has_reserved_stack_access(target->has_reserved_stack_access()) {
|
||||
_node_bundling_limit(0),
|
||||
_node_bundling_base(NULL),
|
||||
_code_buffer("Compile::Fill_buffer"),
|
||||
_scratch_const_size(-1),
|
||||
_in_scratch_emit_size(false)
|
||||
#ifndef PRODUCT
|
||||
, _in_dump_cnt(0)
|
||||
#endif
|
||||
{
|
||||
C = this;
|
||||
#ifndef PRODUCT
|
||||
if (_printer != NULL) {
|
||||
@ -959,56 +964,60 @@ Compile::Compile( ciEnv* ci_env,
|
||||
bool return_pc,
|
||||
DirectiveSet* directive)
|
||||
: Phase(Compiler),
|
||||
_env(ci_env),
|
||||
_directive(directive),
|
||||
_log(ci_env->log()),
|
||||
_compile_id(0),
|
||||
_save_argument_registers(save_arg_registers),
|
||||
_method(NULL),
|
||||
_stub_name(stub_name),
|
||||
_stub_function(stub_function),
|
||||
_stub_entry_point(NULL),
|
||||
_entry_bci(InvocationEntryBci),
|
||||
_initial_gvn(NULL),
|
||||
_for_igvn(NULL),
|
||||
_warm_calls(NULL),
|
||||
_orig_pc_slot(0),
|
||||
_orig_pc_slot_offset_in_bytes(0),
|
||||
_subsume_loads(true),
|
||||
_do_escape_analysis(false),
|
||||
_eliminate_boxing(false),
|
||||
_failure_reason(NULL),
|
||||
_code_buffer("Compile::Fill_buffer"),
|
||||
_has_method_handle_invokes(false),
|
||||
_mach_constant_base_node(NULL),
|
||||
_node_bundling_limit(0),
|
||||
_node_bundling_base(NULL),
|
||||
_java_calls(0),
|
||||
_inner_loops(0),
|
||||
#ifndef PRODUCT
|
||||
_trace_opto_output(directive->TraceOptoOutputOption),
|
||||
_in_dump_cnt(0),
|
||||
_printer(NULL),
|
||||
#endif
|
||||
_comp_arena(mtCompiler),
|
||||
_node_arena(mtCompiler),
|
||||
_old_arena(mtCompiler),
|
||||
_Compile_types(mtCompiler),
|
||||
_dead_node_list(comp_arena()),
|
||||
_dead_node_count(0),
|
||||
_congraph(NULL),
|
||||
_replay_inline_data(NULL),
|
||||
_number_of_mh_late_inlines(0),
|
||||
_method(NULL),
|
||||
_entry_bci(InvocationEntryBci),
|
||||
_stub_function(stub_function),
|
||||
_stub_name(stub_name),
|
||||
_stub_entry_point(NULL),
|
||||
_max_node_limit(MaxNodeLimit),
|
||||
_orig_pc_slot(0),
|
||||
_orig_pc_slot_offset_in_bytes(0),
|
||||
_inlining_progress(false),
|
||||
_inlining_incrementally(false),
|
||||
_print_inlining_list(NULL),
|
||||
_has_reserved_stack_access(false),
|
||||
#ifndef PRODUCT
|
||||
_trace_opto_output(directive->TraceOptoOutputOption),
|
||||
#endif
|
||||
_has_method_handle_invokes(false),
|
||||
_comp_arena(mtCompiler),
|
||||
_env(ci_env),
|
||||
_directive(directive),
|
||||
_log(ci_env->log()),
|
||||
_failure_reason(NULL),
|
||||
_congraph(NULL),
|
||||
#ifndef PRODUCT
|
||||
_printer(NULL),
|
||||
#endif
|
||||
_dead_node_list(comp_arena()),
|
||||
_dead_node_count(0),
|
||||
_node_arena(mtCompiler),
|
||||
_old_arena(mtCompiler),
|
||||
_mach_constant_base_node(NULL),
|
||||
_Compile_types(mtCompiler),
|
||||
_initial_gvn(NULL),
|
||||
_for_igvn(NULL),
|
||||
_warm_calls(NULL),
|
||||
_number_of_mh_late_inlines(0),
|
||||
_print_inlining_stream(NULL),
|
||||
_print_inlining_list(NULL),
|
||||
_print_inlining_idx(0),
|
||||
_print_inlining_output(NULL),
|
||||
_allowed_reasons(0),
|
||||
_replay_inline_data(NULL),
|
||||
_java_calls(0),
|
||||
_inner_loops(0),
|
||||
_interpreter_frame_size(0),
|
||||
_max_node_limit(MaxNodeLimit),
|
||||
_has_reserved_stack_access(false) {
|
||||
_node_bundling_limit(0),
|
||||
_node_bundling_base(NULL),
|
||||
_code_buffer("Compile::Fill_buffer"),
|
||||
#ifndef PRODUCT
|
||||
_in_dump_cnt(0),
|
||||
#endif
|
||||
_allowed_reasons(0) {
|
||||
C = this;
|
||||
|
||||
TraceTime t1(NULL, &_t_totalCompilation, CITime, false);
|
||||
|
@ -601,13 +601,13 @@ public:
|
||||
inline PointsToNode::PointsToNode(ConnectionGraph *CG, Node* n, EscapeState es, NodeType type):
|
||||
_edges(CG->_compile->comp_arena(), 2, 0, NULL),
|
||||
_uses (CG->_compile->comp_arena(), 2, 0, NULL),
|
||||
_node(n),
|
||||
_idx(n->_idx),
|
||||
_pidx(CG->next_pidx()),
|
||||
_type((u1)type),
|
||||
_flags(ScalarReplaceable),
|
||||
_escape((u1)es),
|
||||
_fields_escape((u1)es),
|
||||
_flags(ScalarReplaceable) {
|
||||
_node(n),
|
||||
_idx(n->_idx),
|
||||
_pidx(CG->next_pidx()) {
|
||||
assert(n != NULL && es != UnknownEscape, "sanity");
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ const uint IdealKit::first_var = TypeFunc::Parms + 1;
|
||||
|
||||
//----------------------------IdealKit-----------------------------------------
|
||||
IdealKit::IdealKit(GraphKit* gkit, bool delay_all_transforms, bool has_declarations) :
|
||||
_gvn(gkit->gvn()), C(gkit->C) {
|
||||
C(gkit->C), _gvn(gkit->gvn()) {
|
||||
_initial_ctrl = gkit->control();
|
||||
_initial_memory = gkit->merged_memory();
|
||||
_initial_i_o = gkit->i_o();
|
||||
|
@ -44,11 +44,11 @@
|
||||
// live-out sets. This separate compilation is done in the outer loop below.
|
||||
PhaseLive::PhaseLive(const PhaseCFG &cfg, const LRG_List &names, Arena *arena, bool keep_deltas)
|
||||
: Phase(LIVE),
|
||||
_live(0),
|
||||
_livein(0),
|
||||
_cfg(cfg),
|
||||
_names(names),
|
||||
_arena(arena),
|
||||
_live(0),
|
||||
_livein(0),
|
||||
_keep_deltas(keep_deltas) {
|
||||
}
|
||||
|
||||
|
@ -549,9 +549,10 @@ class Invariance : public StackObj {
|
||||
|
||||
public:
|
||||
Invariance(Arena* area, IdealLoopTree* lpt) :
|
||||
_lpt(lpt), _phase(lpt->_phase),
|
||||
_visited(area), _invariant(area), _stack(area, 10 /* guess */),
|
||||
_clone_visited(area), _old_new(area)
|
||||
_visited(area), _invariant(area),
|
||||
_stack(area, 10 /* guess */),
|
||||
_clone_visited(area), _old_new(area),
|
||||
_lpt(lpt), _phase(lpt->_phase)
|
||||
{
|
||||
LoopNode* head = _lpt->_head->as_Loop();
|
||||
Node* entry = head->skip_strip_mined()->in(LoopNode::EntryControl);
|
||||
|
@ -482,11 +482,11 @@ public:
|
||||
: _parent(0), _next(0), _child(0),
|
||||
_head(head), _tail(tail),
|
||||
_phase(phase),
|
||||
_local_loop_unroll_limit(0), _local_loop_unroll_factor(0),
|
||||
_nest(0), _irreducible(0), _has_call(0), _has_sfpt(0), _rce_candidate(0),
|
||||
_safepts(NULL),
|
||||
_required_safept(NULL),
|
||||
_allow_optimizations(true),
|
||||
_nest(0), _irreducible(0), _has_call(0), _has_sfpt(0), _rce_candidate(0),
|
||||
_local_loop_unroll_limit(0), _local_loop_unroll_factor(0)
|
||||
_allow_optimizations(true)
|
||||
{ }
|
||||
|
||||
// Is 'l' a member of 'this'?
|
||||
@ -919,9 +919,9 @@ public:
|
||||
PhaseIdealLoop( PhaseIterGVN &igvn) :
|
||||
PhaseTransform(Ideal_Loop),
|
||||
_igvn(igvn),
|
||||
_dom_lca_tags(arena()), // Thread::resource_area
|
||||
_verify_me(NULL),
|
||||
_verify_only(true) {
|
||||
_verify_only(true),
|
||||
_dom_lca_tags(arena()) { // Thread::resource_area
|
||||
build_and_optimize(false, false);
|
||||
}
|
||||
|
||||
@ -939,9 +939,9 @@ public:
|
||||
PhaseIdealLoop( PhaseIterGVN &igvn, bool do_split_ifs, bool skip_loop_opts = false, bool last_round = false) :
|
||||
PhaseTransform(Ideal_Loop),
|
||||
_igvn(igvn),
|
||||
_dom_lca_tags(arena()), // Thread::resource_area
|
||||
_verify_me(NULL),
|
||||
_verify_only(false) {
|
||||
_verify_only(false),
|
||||
_dom_lca_tags(arena()) { // Thread::resource_area
|
||||
build_and_optimize(do_split_ifs, skip_loop_opts, last_round);
|
||||
}
|
||||
|
||||
@ -949,9 +949,9 @@ public:
|
||||
PhaseIdealLoop( PhaseIterGVN &igvn, const PhaseIdealLoop *verify_me) :
|
||||
PhaseTransform(Ideal_Loop),
|
||||
_igvn(igvn),
|
||||
_dom_lca_tags(arena()), // Thread::resource_area
|
||||
_verify_me(verify_me),
|
||||
_verify_only(false) {
|
||||
_verify_only(false),
|
||||
_dom_lca_tags(arena()) { // Thread::resource_area
|
||||
build_and_optimize(false, false);
|
||||
}
|
||||
|
||||
|
@ -569,7 +569,7 @@ private:
|
||||
const SpillType _spill_type;
|
||||
public:
|
||||
MachSpillCopyNode(SpillType spill_type, Node *n, const RegMask &in, const RegMask &out ) :
|
||||
MachIdealNode(), _spill_type(spill_type), _in(&in), _out(&out), _type(n->bottom_type()) {
|
||||
MachIdealNode(), _in(&in), _out(&out), _type(n->bottom_type()), _spill_type(spill_type) {
|
||||
init_class_id(Class_MachSpillCopy);
|
||||
init_flags(Flag_is_Copy);
|
||||
add_req(NULL);
|
||||
@ -1040,7 +1040,7 @@ public:
|
||||
|
||||
uint _block_num;
|
||||
|
||||
labelOper() : _block_num(0), _label(0) {}
|
||||
labelOper() : _label(0), _block_num(0) {}
|
||||
|
||||
labelOper(Label* label, uint block_num) : _label(label), _block_num(block_num) {}
|
||||
|
||||
|
@ -57,25 +57,25 @@ const uint Matcher::_end_rematerialize = _END_REMATERIALIZE;
|
||||
//---------------------------Matcher-------------------------------------------
|
||||
Matcher::Matcher()
|
||||
: PhaseTransform( Phase::Ins_Select ),
|
||||
#ifdef ASSERT
|
||||
_old2new_map(C->comp_arena()),
|
||||
_new2old_map(C->comp_arena()),
|
||||
#endif
|
||||
_shared_nodes(C->comp_arena()),
|
||||
_states_arena(Chunk::medium_size, mtCompiler),
|
||||
_visited(&_states_arena),
|
||||
_shared(&_states_arena),
|
||||
_dontcare(&_states_arena),
|
||||
_reduceOp(reduceOp), _leftOp(leftOp), _rightOp(rightOp),
|
||||
_swallowed(swallowed),
|
||||
_begin_inst_chain_rule(_BEGIN_INST_CHAIN_RULE),
|
||||
_end_inst_chain_rule(_END_INST_CHAIN_RULE),
|
||||
_must_clone(must_clone),
|
||||
_shared_nodes(C->comp_arena()),
|
||||
#ifdef ASSERT
|
||||
_old2new_map(C->comp_arena()),
|
||||
_new2old_map(C->comp_arena()),
|
||||
#endif
|
||||
_allocation_started(false),
|
||||
_ruleName(ruleName),
|
||||
_register_save_policy(register_save_policy),
|
||||
_c_reg_save_policy(c_reg_save_policy),
|
||||
_register_save_type(register_save_type),
|
||||
_ruleName(ruleName),
|
||||
_allocation_started(false),
|
||||
_states_arena(Chunk::medium_size, mtCompiler),
|
||||
_visited(&_states_arena),
|
||||
_shared(&_states_arena),
|
||||
_dontcare(&_states_arena) {
|
||||
_register_save_type(register_save_type) {
|
||||
C->set_matcher(this);
|
||||
|
||||
idealreg2spillmask [Op_RegI] = NULL;
|
||||
|
@ -3158,8 +3158,8 @@ Node *MemBarNode::match( const ProjNode *proj, const Matcher *m ) {
|
||||
|
||||
//---------------------------InitializeNode------------------------------------
|
||||
InitializeNode::InitializeNode(Compile* C, int adr_type, Node* rawoop)
|
||||
: _is_complete(Incomplete), _does_not_escape(false),
|
||||
MemBarNode(C, adr_type, rawoop)
|
||||
: MemBarNode(C, adr_type, rawoop),
|
||||
_is_complete(Incomplete), _does_not_escape(false)
|
||||
{
|
||||
init_class_id(Class_Initialize);
|
||||
|
||||
|
@ -190,7 +190,7 @@ protected:
|
||||
public:
|
||||
|
||||
LoadNode(Node *c, Node *mem, Node *adr, const TypePtr* at, const Type *rt, MemOrd mo, ControlDependency control_dependency)
|
||||
: MemNode(c,mem,adr,at), _type(rt), _mo(mo), _control_dependency(control_dependency) {
|
||||
: MemNode(c,mem,adr,at), _control_dependency(control_dependency), _mo(mo), _type(rt) {
|
||||
init_class_id(Class_Load);
|
||||
}
|
||||
inline bool is_unordered() const { return !is_acquire(); }
|
||||
|
@ -120,7 +120,7 @@ class ProfileBooleanNode : public Node {
|
||||
virtual uint cmp( const Node &n ) const;
|
||||
public:
|
||||
ProfileBooleanNode(Node *n, uint false_cnt, uint true_cnt) : Node(0, n),
|
||||
_false_cnt(false_cnt), _true_cnt(true_cnt), _delay_removal(true), _consumed(false) {}
|
||||
_false_cnt(false_cnt), _true_cnt(true_cnt), _consumed(false), _delay_removal(true) {}
|
||||
|
||||
uint false_count() const { return _false_cnt; }
|
||||
uint true_count() const { return _true_cnt; }
|
||||
|
@ -1672,14 +1672,14 @@ Scheduling::Scheduling(Arena *arena, Compile &compile)
|
||||
: _arena(arena),
|
||||
_cfg(compile.cfg()),
|
||||
_regalloc(compile.regalloc()),
|
||||
_reg_node(arena),
|
||||
_bundle_instr_count(0),
|
||||
_bundle_cycle_number(0),
|
||||
_scheduled(arena),
|
||||
_available(arena),
|
||||
_reg_node(arena),
|
||||
_pinch_free_list(arena),
|
||||
_next_node(NULL),
|
||||
_bundle_use(0, 0, resource_count, &_bundle_use_elements[0]),
|
||||
_pinch_free_list(arena)
|
||||
_bundle_instr_count(0),
|
||||
_bundle_cycle_number(0),
|
||||
_bundle_use(0, 0, resource_count, &_bundle_use_elements[0])
|
||||
#ifndef PRODUCT
|
||||
, _branches(0)
|
||||
, _unconditional_delays(0)
|
||||
|
@ -44,15 +44,14 @@
|
||||
#define NODE_HASH_MINIMUM_SIZE 255
|
||||
//------------------------------NodeHash---------------------------------------
|
||||
NodeHash::NodeHash(uint est_max_size) :
|
||||
_max( round_up(est_max_size < NODE_HASH_MINIMUM_SIZE ? NODE_HASH_MINIMUM_SIZE : est_max_size) ),
|
||||
_a(Thread::current()->resource_area()),
|
||||
_table( NEW_ARENA_ARRAY( _a , Node* , _max ) ), // (Node**)_a->Amalloc(_max * sizeof(Node*)) ),
|
||||
_inserts(0), _insert_limit( insert_limit() )
|
||||
_max( round_up(est_max_size < NODE_HASH_MINIMUM_SIZE ? NODE_HASH_MINIMUM_SIZE : est_max_size) ),
|
||||
_inserts(0), _insert_limit( insert_limit() ),
|
||||
_table( NEW_ARENA_ARRAY( _a , Node* , _max ) ) // (Node**)_a->Amalloc(_max * sizeof(Node*)) ),
|
||||
#ifndef PRODUCT
|
||||
,_look_probes(0), _lookup_hits(0), _lookup_misses(0),
|
||||
_delete_probes(0), _delete_hits(0), _delete_misses(0),
|
||||
_total_insert_probes(0), _total_inserts(0),
|
||||
_insert_probes(0), _grows(0)
|
||||
, _grows(0),_look_probes(0), _lookup_hits(0), _lookup_misses(0),
|
||||
_insert_probes(0), _delete_probes(0), _delete_hits(0), _delete_misses(0),
|
||||
_total_inserts(0), _total_insert_probes(0)
|
||||
#endif
|
||||
{
|
||||
// _sentinel must be in the current node space
|
||||
@ -62,15 +61,14 @@ NodeHash::NodeHash(uint est_max_size) :
|
||||
|
||||
//------------------------------NodeHash---------------------------------------
|
||||
NodeHash::NodeHash(Arena *arena, uint est_max_size) :
|
||||
_max( round_up(est_max_size < NODE_HASH_MINIMUM_SIZE ? NODE_HASH_MINIMUM_SIZE : est_max_size) ),
|
||||
_a(arena),
|
||||
_table( NEW_ARENA_ARRAY( _a , Node* , _max ) ),
|
||||
_inserts(0), _insert_limit( insert_limit() )
|
||||
_max( round_up(est_max_size < NODE_HASH_MINIMUM_SIZE ? NODE_HASH_MINIMUM_SIZE : est_max_size) ),
|
||||
_inserts(0), _insert_limit( insert_limit() ),
|
||||
_table( NEW_ARENA_ARRAY( _a , Node* , _max ) )
|
||||
#ifndef PRODUCT
|
||||
,_look_probes(0), _lookup_hits(0), _lookup_misses(0),
|
||||
_delete_probes(0), _delete_hits(0), _delete_misses(0),
|
||||
_total_insert_probes(0), _total_inserts(0),
|
||||
_insert_probes(0), _grows(0)
|
||||
, _grows(0),_look_probes(0), _lookup_hits(0), _lookup_misses(0),
|
||||
_insert_probes(0), _delete_probes(0), _delete_hits(0), _delete_misses(0),
|
||||
_total_inserts(0), _total_insert_probes(0)
|
||||
#endif
|
||||
{
|
||||
// _sentinel must be in the current node space
|
||||
@ -890,30 +888,31 @@ void PhaseGVN::dead_loop_check( Node *n ) {
|
||||
//=============================================================================
|
||||
//------------------------------PhaseIterGVN-----------------------------------
|
||||
// Initialize hash table to fresh and clean for +VerifyOpto
|
||||
PhaseIterGVN::PhaseIterGVN( PhaseIterGVN *igvn, const char *dummy ) : PhaseGVN(igvn,dummy), _worklist( ),
|
||||
PhaseIterGVN::PhaseIterGVN( PhaseIterGVN *igvn, const char *dummy ) : PhaseGVN(igvn,dummy),
|
||||
_delay_transform(false),
|
||||
_stack(C->live_nodes() >> 1),
|
||||
_delay_transform(false) {
|
||||
_worklist( ) {
|
||||
}
|
||||
|
||||
//------------------------------PhaseIterGVN-----------------------------------
|
||||
// Initialize with previous PhaseIterGVN info; used by PhaseCCP
|
||||
PhaseIterGVN::PhaseIterGVN( PhaseIterGVN *igvn ) : PhaseGVN(igvn),
|
||||
_worklist( igvn->_worklist ),
|
||||
_delay_transform(igvn->_delay_transform),
|
||||
_stack( igvn->_stack ),
|
||||
_delay_transform(igvn->_delay_transform)
|
||||
_worklist( igvn->_worklist )
|
||||
{
|
||||
}
|
||||
|
||||
//------------------------------PhaseIterGVN-----------------------------------
|
||||
// Initialize with previous PhaseGVN info from Parser
|
||||
PhaseIterGVN::PhaseIterGVN( PhaseGVN *gvn ) : PhaseGVN(gvn),
|
||||
_worklist(*C->for_igvn()),
|
||||
_delay_transform(false),
|
||||
// TODO: Before incremental inlining it was allocated only once and it was fine. Now that
|
||||
// the constructor is used in incremental inlining, this consumes too much memory:
|
||||
// _stack(C->live_nodes() >> 1),
|
||||
// So, as a band-aid, we replace this by:
|
||||
_stack(C->comp_arena(), 32),
|
||||
_delay_transform(false)
|
||||
_worklist(*C->for_igvn())
|
||||
{
|
||||
uint max;
|
||||
|
||||
|
@ -37,11 +37,13 @@ int PhaseRegAlloc::_max_framesize = 0;
|
||||
PhaseRegAlloc::PhaseRegAlloc( uint unique, PhaseCFG &cfg,
|
||||
Matcher &matcher,
|
||||
void (*pr_stats)() ):
|
||||
Phase(Register_Allocation), _cfg(cfg), _matcher(matcher),
|
||||
_node_oops(Thread::current()->resource_area()),
|
||||
Phase(Register_Allocation),
|
||||
_node_regs(0),
|
||||
_node_regs_max_index(0),
|
||||
_framesize(0xdeadbeef)
|
||||
_node_oops(Thread::current()->resource_area()),
|
||||
_cfg(cfg),
|
||||
_framesize(0xdeadbeef),
|
||||
_matcher(matcher)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -77,8 +77,8 @@ private:
|
||||
NamedCounter(const char *n, CounterTag tag = NoTag):
|
||||
_name(n == NULL ? NULL : os::strdup(n)),
|
||||
_count(0),
|
||||
_next(NULL),
|
||||
_tag(tag) {}
|
||||
_tag(tag),
|
||||
_next(NULL) {}
|
||||
|
||||
~NamedCounter() {
|
||||
if (_name != NULL) {
|
||||
|
@ -66,11 +66,11 @@ class StringConcat : public ResourceObj {
|
||||
};
|
||||
|
||||
StringConcat(PhaseStringOpts* stringopts, CallStaticJavaNode* end):
|
||||
_end(end),
|
||||
_begin(NULL),
|
||||
_multiple(false),
|
||||
_stringopts(stringopts),
|
||||
_string_alloc(NULL),
|
||||
_stringopts(stringopts) {
|
||||
_begin(NULL),
|
||||
_end(end),
|
||||
_multiple(false) {
|
||||
_arguments = new Node(1);
|
||||
_arguments->del_req(0);
|
||||
}
|
||||
|
@ -307,7 +307,7 @@ class BoolNode : public Node {
|
||||
int cmp1_op, const TypeInt* cmp2_type);
|
||||
public:
|
||||
const BoolTest _test;
|
||||
BoolNode( Node *cc, BoolTest::mask t): _test(t), Node(0,cc) {
|
||||
BoolNode( Node *cc, BoolTest::mask t): Node(0,cc), _test(t) {
|
||||
init_class_id(Class_Bool);
|
||||
}
|
||||
// Convert an arbitrary int value to a Bool or other suitable predicate.
|
||||
|
@ -47,8 +47,8 @@
|
||||
//------------------------------SuperWord---------------------------
|
||||
SuperWord::SuperWord(PhaseIdealLoop* phase) :
|
||||
_phase(phase),
|
||||
_igvn(phase->_igvn),
|
||||
_arena(phase->C->comp_arena()),
|
||||
_igvn(phase->_igvn),
|
||||
_packset(arena(), 8, 0, NULL), // packs for the current block
|
||||
_bb_idx(arena(), (int)(1.10 * phase->C->unique()), 0, 0), // node idx to index in bb
|
||||
_block(arena(), 8, 0, NULL), // nodes in current block
|
||||
@ -65,18 +65,18 @@ SuperWord::SuperWord(PhaseIdealLoop* phase) :
|
||||
_visited(arena()), // visited node set
|
||||
_post_visited(arena()), // post visited node set
|
||||
_n_idx_list(arena(), 8), // scratch list of (node,index) pairs
|
||||
_stk(arena(), 8, 0, NULL), // scratch stack of nodes
|
||||
_nlist(arena(), 8, 0, NULL), // scratch list of nodes
|
||||
_stk(arena(), 8, 0, NULL), // scratch stack of nodes
|
||||
_lpt(NULL), // loop tree node
|
||||
_lp(NULL), // LoopNode
|
||||
_bb(NULL), // basic block
|
||||
_iv(NULL), // induction var
|
||||
_race_possible(false), // cases where SDMU is true
|
||||
_early_return(true), // analysis evaluations routine
|
||||
_num_work_vecs(0), // amount of vector work we have
|
||||
_num_reductions(0), // amount of reduction work we have
|
||||
_do_vector_loop(phase->C->do_vector_loop()), // whether to do vectorization/simd style
|
||||
_do_reserve_copy(DoReserveCopyInSuperWord),
|
||||
_num_work_vecs(0), // amount of vector work we have
|
||||
_num_reductions(0), // amount of reduction work we have
|
||||
_ii_first(-1), // first loop generation index - only if do_vector_loop()
|
||||
_ii_last(-1), // last loop generation index - only if do_vector_loop()
|
||||
_ii_order(arena(), 8, 0, 0)
|
||||
|
@ -802,8 +802,8 @@ protected:
|
||||
TypePtr(TYPES t, PTR ptr, int offset,
|
||||
const TypePtr* speculative = NULL,
|
||||
int inline_depth = InlineDepthBottom) :
|
||||
Type(t), _ptr(ptr), _offset(offset), _speculative(speculative),
|
||||
_inline_depth(inline_depth) {}
|
||||
Type(t), _speculative(speculative), _inline_depth(inline_depth), _offset(offset),
|
||||
_ptr(ptr) {}
|
||||
static const PTR ptr_meet[lastPTR][lastPTR];
|
||||
static const PTR ptr_dual[lastPTR];
|
||||
static const char * const ptr_msg[lastPTR];
|
||||
@ -1359,8 +1359,8 @@ class TypeNarrowPtr : public Type {
|
||||
protected:
|
||||
const TypePtr* _ptrtype; // Could be TypePtr::NULL_PTR
|
||||
|
||||
TypeNarrowPtr(TYPES t, const TypePtr* ptrtype): _ptrtype(ptrtype),
|
||||
Type(t) {
|
||||
TypeNarrowPtr(TYPES t, const TypePtr* ptrtype): Type(t),
|
||||
_ptrtype(ptrtype) {
|
||||
assert(ptrtype->offset() == 0 ||
|
||||
ptrtype->offset() == OffsetBot ||
|
||||
ptrtype->offset() == OffsetTop, "no real offsets");
|
||||
|
Loading…
Reference in New Issue
Block a user