Merge
This commit is contained in:
commit
03d00d97a5
@ -6365,58 +6365,6 @@ instruct loadConD_Ex(regD dst, immD src) %{
|
||||
// Prefetch instructions.
|
||||
// Must be safe to execute with invalid address (cannot fault).
|
||||
|
||||
instruct prefetchr(indirectMemory mem, iRegLsrc src) %{
|
||||
match(PrefetchRead (AddP mem src));
|
||||
ins_cost(MEMORY_REF_COST);
|
||||
|
||||
format %{ "PREFETCH $mem, 0, $src \t// Prefetch read-many" %}
|
||||
size(4);
|
||||
ins_encode %{
|
||||
// TODO: PPC port $archOpcode(ppc64Opcode_dcbt);
|
||||
__ dcbt($src$$Register, $mem$$base$$Register);
|
||||
%}
|
||||
ins_pipe(pipe_class_memory);
|
||||
%}
|
||||
|
||||
instruct prefetchr_no_offset(indirectMemory mem) %{
|
||||
match(PrefetchRead mem);
|
||||
ins_cost(MEMORY_REF_COST);
|
||||
|
||||
format %{ "PREFETCH $mem" %}
|
||||
size(4);
|
||||
ins_encode %{
|
||||
// TODO: PPC port $archOpcode(ppc64Opcode_dcbt);
|
||||
__ dcbt($mem$$base$$Register);
|
||||
%}
|
||||
ins_pipe(pipe_class_memory);
|
||||
%}
|
||||
|
||||
instruct prefetchw(indirectMemory mem, iRegLsrc src) %{
|
||||
match(PrefetchWrite (AddP mem src));
|
||||
ins_cost(MEMORY_REF_COST);
|
||||
|
||||
format %{ "PREFETCH $mem, 2, $src \t// Prefetch write-many (and read)" %}
|
||||
size(4);
|
||||
ins_encode %{
|
||||
// TODO: PPC port $archOpcode(ppc64Opcode_dcbtst);
|
||||
__ dcbtst($src$$Register, $mem$$base$$Register);
|
||||
%}
|
||||
ins_pipe(pipe_class_memory);
|
||||
%}
|
||||
|
||||
instruct prefetchw_no_offset(indirectMemory mem) %{
|
||||
match(PrefetchWrite mem);
|
||||
ins_cost(MEMORY_REF_COST);
|
||||
|
||||
format %{ "PREFETCH $mem" %}
|
||||
size(4);
|
||||
ins_encode %{
|
||||
// TODO: PPC port $archOpcode(ppc64Opcode_dcbtst);
|
||||
__ dcbtst($mem$$base$$Register);
|
||||
%}
|
||||
ins_pipe(pipe_class_memory);
|
||||
%}
|
||||
|
||||
// Special prefetch versions which use the dcbz instruction.
|
||||
instruct prefetch_alloc_zero(indirectMemory mem, iRegLsrc src) %{
|
||||
match(PrefetchAllocation (AddP mem src));
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -1436,26 +1436,6 @@ void LIR_Assembler::mem2reg(LIR_Opr src_opr, LIR_Opr dest, BasicType type,
|
||||
}
|
||||
|
||||
|
||||
void LIR_Assembler::prefetchr(LIR_Opr src) {
|
||||
LIR_Address* addr = src->as_address_ptr();
|
||||
Address from_addr = as_Address(addr);
|
||||
|
||||
if (VM_Version::has_v9()) {
|
||||
__ prefetch(from_addr, Assembler::severalReads);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LIR_Assembler::prefetchw(LIR_Opr src) {
|
||||
LIR_Address* addr = src->as_address_ptr();
|
||||
Address from_addr = as_Address(addr);
|
||||
|
||||
if (VM_Version::has_v9()) {
|
||||
__ prefetch(from_addr, Assembler::severalWritesAndPossiblyReads);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LIR_Assembler::stack2reg(LIR_Opr src, LIR_Opr dest, BasicType type) {
|
||||
Address addr;
|
||||
if (src->is_single_word()) {
|
||||
|
@ -889,8 +889,6 @@ void emit_form3_mem_reg(CodeBuffer &cbuf, PhaseRegAlloc* ra, const MachNode* n,
|
||||
!(n->ideal_Opcode()==Op_LoadD_unaligned && ld_op==Op_LoadF) &&
|
||||
!(n->ideal_Opcode()==Op_ConvI2F && ld_op==Op_LoadF) &&
|
||||
!(n->ideal_Opcode()==Op_ConvI2D && ld_op==Op_LoadF) &&
|
||||
!(n->ideal_Opcode()==Op_PrefetchRead && ld_op==Op_LoadI) &&
|
||||
!(n->ideal_Opcode()==Op_PrefetchWrite && ld_op==Op_LoadI) &&
|
||||
!(n->ideal_Opcode()==Op_PrefetchAllocation && ld_op==Op_LoadI) &&
|
||||
!(n->ideal_Opcode()==Op_LoadVector && ld_op==Op_LoadD) &&
|
||||
!(n->rule() == loadUB_rule)) {
|
||||
@ -6316,32 +6314,8 @@ instruct loadConD(regD dst, immD con, o7RegI tmp) %{
|
||||
ins_pipe(loadConFD);
|
||||
%}
|
||||
|
||||
// Prefetch instructions.
|
||||
// Must be safe to execute with invalid address (cannot fault).
|
||||
|
||||
instruct prefetchr( memory mem ) %{
|
||||
match( PrefetchRead mem );
|
||||
ins_cost(MEMORY_REF_COST);
|
||||
size(4);
|
||||
|
||||
format %{ "PREFETCH $mem,0\t! Prefetch read-many" %}
|
||||
opcode(Assembler::prefetch_op3);
|
||||
ins_encode( form3_mem_prefetch_read( mem ) );
|
||||
ins_pipe(iload_mem);
|
||||
%}
|
||||
|
||||
instruct prefetchw( memory mem ) %{
|
||||
match( PrefetchWrite mem );
|
||||
ins_cost(MEMORY_REF_COST);
|
||||
size(4);
|
||||
|
||||
format %{ "PREFETCH $mem,2\t! Prefetch write-many (and read)" %}
|
||||
opcode(Assembler::prefetch_op3);
|
||||
ins_encode( form3_mem_prefetch_write( mem ) );
|
||||
ins_pipe(iload_mem);
|
||||
%}
|
||||
|
||||
// Prefetch instructions for allocation.
|
||||
// Must be safe to execute with invalid address (cannot fault).
|
||||
|
||||
instruct prefetchAlloc( memory mem ) %{
|
||||
predicate(AllocatePrefetchInstr == 0);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -1398,50 +1398,6 @@ void LIR_Assembler::mem2reg(LIR_Opr src, LIR_Opr dest, BasicType type, LIR_Patch
|
||||
}
|
||||
|
||||
|
||||
void LIR_Assembler::prefetchr(LIR_Opr src) {
|
||||
LIR_Address* addr = src->as_address_ptr();
|
||||
Address from_addr = as_Address(addr);
|
||||
|
||||
if (VM_Version::supports_sse()) {
|
||||
switch (ReadPrefetchInstr) {
|
||||
case 0:
|
||||
__ prefetchnta(from_addr); break;
|
||||
case 1:
|
||||
__ prefetcht0(from_addr); break;
|
||||
case 2:
|
||||
__ prefetcht2(from_addr); break;
|
||||
default:
|
||||
ShouldNotReachHere(); break;
|
||||
}
|
||||
} else if (VM_Version::supports_3dnow_prefetch()) {
|
||||
__ prefetchr(from_addr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LIR_Assembler::prefetchw(LIR_Opr src) {
|
||||
LIR_Address* addr = src->as_address_ptr();
|
||||
Address from_addr = as_Address(addr);
|
||||
|
||||
if (VM_Version::supports_sse()) {
|
||||
switch (AllocatePrefetchInstr) {
|
||||
case 0:
|
||||
__ prefetchnta(from_addr); break;
|
||||
case 1:
|
||||
__ prefetcht0(from_addr); break;
|
||||
case 2:
|
||||
__ prefetcht2(from_addr); break;
|
||||
case 3:
|
||||
__ prefetchw(from_addr); break;
|
||||
default:
|
||||
ShouldNotReachHere(); break;
|
||||
}
|
||||
} else if (VM_Version::supports_3dnow_prefetch()) {
|
||||
__ prefetchw(from_addr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
NEEDS_CLEANUP; // This could be static?
|
||||
Address::ScaleFactor LIR_Assembler::array_element_size(BasicType type) const {
|
||||
int elem_size = type2aelembytes(type);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -90,9 +90,6 @@ define_pd_global(uintx, TypeProfileLevel, 111);
|
||||
product(intx, FenceInstruction, 0, \
|
||||
"(Unsafe,Unstable) Experimental") \
|
||||
\
|
||||
product(intx, ReadPrefetchInstr, 0, \
|
||||
"Prefetch instruction to prefetch ahead") \
|
||||
\
|
||||
product(bool, UseStoreImmI16, true, \
|
||||
"Use store immediate 16-bits value instruction on x86") \
|
||||
\
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -924,15 +924,9 @@ void VM_Version::get_processor_features() {
|
||||
}
|
||||
#endif // COMPILER2
|
||||
|
||||
assert(0 <= ReadPrefetchInstr && ReadPrefetchInstr <= 3, "invalid value");
|
||||
assert(0 <= AllocatePrefetchInstr && AllocatePrefetchInstr <= 3, "invalid value");
|
||||
|
||||
// set valid Prefetch instruction
|
||||
if( ReadPrefetchInstr < 0 ) ReadPrefetchInstr = 0;
|
||||
if( ReadPrefetchInstr > 3 ) ReadPrefetchInstr = 3;
|
||||
if( ReadPrefetchInstr == 3 && !supports_3dnow_prefetch() ) ReadPrefetchInstr = 0;
|
||||
if( !supports_sse() && supports_3dnow_prefetch() ) ReadPrefetchInstr = 3;
|
||||
|
||||
if( AllocatePrefetchInstr < 0 ) AllocatePrefetchInstr = 0;
|
||||
if( AllocatePrefetchInstr > 3 ) AllocatePrefetchInstr = 3;
|
||||
if( AllocatePrefetchInstr == 3 && !supports_3dnow_prefetch() ) AllocatePrefetchInstr=0;
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
// Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
//
|
||||
// This code is free software; you can redistribute it and/or modify it
|
||||
@ -6061,102 +6061,8 @@ instruct loadSSD(regDPR dst, stackSlotD src) %{
|
||||
ins_pipe( fpu_reg_mem );
|
||||
%}
|
||||
|
||||
// Prefetch instructions.
|
||||
// Must be safe to execute with invalid address (cannot fault).
|
||||
|
||||
instruct prefetchr0( memory mem ) %{
|
||||
predicate(UseSSE==0 && !VM_Version::supports_3dnow_prefetch());
|
||||
match(PrefetchRead mem);
|
||||
ins_cost(0);
|
||||
size(0);
|
||||
format %{ "PREFETCHR (non-SSE is empty encoding)" %}
|
||||
ins_encode();
|
||||
ins_pipe(empty);
|
||||
%}
|
||||
|
||||
instruct prefetchr( memory mem ) %{
|
||||
predicate(UseSSE==0 && VM_Version::supports_3dnow_prefetch() || ReadPrefetchInstr==3);
|
||||
match(PrefetchRead mem);
|
||||
ins_cost(100);
|
||||
|
||||
format %{ "PREFETCHR $mem\t! Prefetch into level 1 cache for read" %}
|
||||
ins_encode %{
|
||||
__ prefetchr($mem$$Address);
|
||||
%}
|
||||
ins_pipe(ialu_mem);
|
||||
%}
|
||||
|
||||
instruct prefetchrNTA( memory mem ) %{
|
||||
predicate(UseSSE>=1 && ReadPrefetchInstr==0);
|
||||
match(PrefetchRead mem);
|
||||
ins_cost(100);
|
||||
|
||||
format %{ "PREFETCHNTA $mem\t! Prefetch into non-temporal cache for read" %}
|
||||
ins_encode %{
|
||||
__ prefetchnta($mem$$Address);
|
||||
%}
|
||||
ins_pipe(ialu_mem);
|
||||
%}
|
||||
|
||||
instruct prefetchrT0( memory mem ) %{
|
||||
predicate(UseSSE>=1 && ReadPrefetchInstr==1);
|
||||
match(PrefetchRead mem);
|
||||
ins_cost(100);
|
||||
|
||||
format %{ "PREFETCHT0 $mem\t! Prefetch into L1 and L2 caches for read" %}
|
||||
ins_encode %{
|
||||
__ prefetcht0($mem$$Address);
|
||||
%}
|
||||
ins_pipe(ialu_mem);
|
||||
%}
|
||||
|
||||
instruct prefetchrT2( memory mem ) %{
|
||||
predicate(UseSSE>=1 && ReadPrefetchInstr==2);
|
||||
match(PrefetchRead mem);
|
||||
ins_cost(100);
|
||||
|
||||
format %{ "PREFETCHT2 $mem\t! Prefetch into L2 cache for read" %}
|
||||
ins_encode %{
|
||||
__ prefetcht2($mem$$Address);
|
||||
%}
|
||||
ins_pipe(ialu_mem);
|
||||
%}
|
||||
|
||||
instruct prefetchw0( memory mem ) %{
|
||||
predicate(UseSSE==0 && !VM_Version::supports_3dnow_prefetch());
|
||||
match(PrefetchWrite mem);
|
||||
ins_cost(0);
|
||||
size(0);
|
||||
format %{ "Prefetch (non-SSE is empty encoding)" %}
|
||||
ins_encode();
|
||||
ins_pipe(empty);
|
||||
%}
|
||||
|
||||
instruct prefetchw( memory mem ) %{
|
||||
predicate(UseSSE==0 && VM_Version::supports_3dnow_prefetch());
|
||||
match( PrefetchWrite mem );
|
||||
ins_cost(100);
|
||||
|
||||
format %{ "PREFETCHW $mem\t! Prefetch into L1 cache and mark modified" %}
|
||||
ins_encode %{
|
||||
__ prefetchw($mem$$Address);
|
||||
%}
|
||||
ins_pipe(ialu_mem);
|
||||
%}
|
||||
|
||||
instruct prefetchwNTA( memory mem ) %{
|
||||
predicate(UseSSE>=1);
|
||||
match(PrefetchWrite mem);
|
||||
ins_cost(100);
|
||||
|
||||
format %{ "PREFETCHNTA $mem\t! Prefetch into non-temporal cache for write" %}
|
||||
ins_encode %{
|
||||
__ prefetchnta($mem$$Address);
|
||||
%}
|
||||
ins_pipe(ialu_mem);
|
||||
%}
|
||||
|
||||
// Prefetch instructions for allocation.
|
||||
// Must be safe to execute with invalid address (cannot fault).
|
||||
|
||||
instruct prefetchAlloc0( memory mem ) %{
|
||||
predicate(UseSSE==0 && AllocatePrefetchInstr!=3);
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
// Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
//
|
||||
// This code is free software; you can redistribute it and/or modify it
|
||||
@ -5319,69 +5319,8 @@ instruct loadSSD(regD dst, stackSlotD src)
|
||||
ins_pipe(pipe_slow); // XXX
|
||||
%}
|
||||
|
||||
// Prefetch instructions.
|
||||
// Must be safe to execute with invalid address (cannot fault).
|
||||
|
||||
instruct prefetchr( memory mem ) %{
|
||||
predicate(ReadPrefetchInstr==3);
|
||||
match(PrefetchRead mem);
|
||||
ins_cost(125);
|
||||
|
||||
format %{ "PREFETCHR $mem\t# Prefetch into level 1 cache" %}
|
||||
ins_encode %{
|
||||
__ prefetchr($mem$$Address);
|
||||
%}
|
||||
ins_pipe(ialu_mem);
|
||||
%}
|
||||
|
||||
instruct prefetchrNTA( memory mem ) %{
|
||||
predicate(ReadPrefetchInstr==0);
|
||||
match(PrefetchRead mem);
|
||||
ins_cost(125);
|
||||
|
||||
format %{ "PREFETCHNTA $mem\t# Prefetch into non-temporal cache for read" %}
|
||||
ins_encode %{
|
||||
__ prefetchnta($mem$$Address);
|
||||
%}
|
||||
ins_pipe(ialu_mem);
|
||||
%}
|
||||
|
||||
instruct prefetchrT0( memory mem ) %{
|
||||
predicate(ReadPrefetchInstr==1);
|
||||
match(PrefetchRead mem);
|
||||
ins_cost(125);
|
||||
|
||||
format %{ "PREFETCHT0 $mem\t# prefetch into L1 and L2 caches for read" %}
|
||||
ins_encode %{
|
||||
__ prefetcht0($mem$$Address);
|
||||
%}
|
||||
ins_pipe(ialu_mem);
|
||||
%}
|
||||
|
||||
instruct prefetchrT2( memory mem ) %{
|
||||
predicate(ReadPrefetchInstr==2);
|
||||
match(PrefetchRead mem);
|
||||
ins_cost(125);
|
||||
|
||||
format %{ "PREFETCHT2 $mem\t# prefetch into L2 caches for read" %}
|
||||
ins_encode %{
|
||||
__ prefetcht2($mem$$Address);
|
||||
%}
|
||||
ins_pipe(ialu_mem);
|
||||
%}
|
||||
|
||||
instruct prefetchwNTA( memory mem ) %{
|
||||
match(PrefetchWrite mem);
|
||||
ins_cost(125);
|
||||
|
||||
format %{ "PREFETCHNTA $mem\t# Prefetch to non-temporal cache for write" %}
|
||||
ins_encode %{
|
||||
__ prefetchnta($mem$$Address);
|
||||
%}
|
||||
ins_pipe(ialu_mem);
|
||||
%}
|
||||
|
||||
// Prefetch instructions for allocation.
|
||||
// Must be safe to execute with invalid address (cannot fault).
|
||||
|
||||
instruct prefetchAlloc( memory mem ) %{
|
||||
predicate(AllocatePrefetchInstr==3);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -3489,9 +3489,7 @@ int MatchNode::needs_ideal_memory_edge(FormDict &globals) const {
|
||||
"GetAndAddL", "GetAndSetL", "GetAndSetN",
|
||||
};
|
||||
int cnt = sizeof(needs_ideal_memory_list)/sizeof(char*);
|
||||
if( strcmp(_opType,"PrefetchRead")==0 ||
|
||||
strcmp(_opType,"PrefetchWrite")==0 ||
|
||||
strcmp(_opType,"PrefetchAllocation")==0 )
|
||||
if( strcmp(_opType,"PrefetchAllocation")==0 )
|
||||
return 1;
|
||||
if( _lChild ) {
|
||||
const char *opType = _lChild->_opType;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -964,8 +964,6 @@ void Canonicalizer::do_UnsafePutRaw(UnsafePutRaw* x) { if (OptimizeUnsafes) do_U
|
||||
void Canonicalizer::do_UnsafeGetObject(UnsafeGetObject* x) {}
|
||||
void Canonicalizer::do_UnsafePutObject(UnsafePutObject* x) {}
|
||||
void Canonicalizer::do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x) {}
|
||||
void Canonicalizer::do_UnsafePrefetchRead (UnsafePrefetchRead* x) {}
|
||||
void Canonicalizer::do_UnsafePrefetchWrite(UnsafePrefetchWrite* x) {}
|
||||
void Canonicalizer::do_ProfileCall(ProfileCall* x) {}
|
||||
void Canonicalizer::do_ProfileReturnType(ProfileReturnType* x) {}
|
||||
void Canonicalizer::do_ProfileInvoke(ProfileInvoke* x) {}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -101,8 +101,6 @@ class Canonicalizer: InstructionVisitor {
|
||||
virtual void do_UnsafeGetObject(UnsafeGetObject* x);
|
||||
virtual void do_UnsafePutObject(UnsafePutObject* x);
|
||||
virtual void do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x);
|
||||
virtual void do_UnsafePrefetchRead (UnsafePrefetchRead* x);
|
||||
virtual void do_UnsafePrefetchWrite(UnsafePrefetchWrite* x);
|
||||
virtual void do_ProfileCall (ProfileCall* x);
|
||||
virtual void do_ProfileReturnType (ProfileReturnType* x);
|
||||
virtual void do_ProfileInvoke (ProfileInvoke* x);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -3497,11 +3497,6 @@ bool GraphBuilder::try_inline_intrinsics(ciMethod* callee) {
|
||||
case vmIntrinsics::_putFloat_raw : return append_unsafe_put_raw(callee, T_FLOAT);
|
||||
case vmIntrinsics::_putDouble_raw : return append_unsafe_put_raw(callee, T_DOUBLE);
|
||||
|
||||
case vmIntrinsics::_prefetchRead : return append_unsafe_prefetch(callee, false, false);
|
||||
case vmIntrinsics::_prefetchWrite : return append_unsafe_prefetch(callee, false, true);
|
||||
case vmIntrinsics::_prefetchReadStatic : return append_unsafe_prefetch(callee, true, false);
|
||||
case vmIntrinsics::_prefetchWriteStatic : return append_unsafe_prefetch(callee, true, true);
|
||||
|
||||
case vmIntrinsics::_checkIndex :
|
||||
if (!InlineNIOCheckIndex) return false;
|
||||
preserves_state = true;
|
||||
@ -4258,27 +4253,6 @@ bool GraphBuilder::append_unsafe_put_raw(ciMethod* callee, BasicType t) {
|
||||
}
|
||||
|
||||
|
||||
bool GraphBuilder::append_unsafe_prefetch(ciMethod* callee, bool is_static, bool is_store) {
|
||||
if (InlineUnsafeOps) {
|
||||
Values* args = state()->pop_arguments(callee->arg_size());
|
||||
int obj_arg_index = 1; // Assume non-static case
|
||||
if (is_static) {
|
||||
obj_arg_index = 0;
|
||||
} else {
|
||||
null_check(args->at(0));
|
||||
}
|
||||
Instruction* offset = args->at(obj_arg_index + 1);
|
||||
#ifndef _LP64
|
||||
offset = append(new Convert(Bytecodes::_l2i, offset, as_ValueType(T_INT)));
|
||||
#endif
|
||||
Instruction* op = is_store ? append(new UnsafePrefetchWrite(args->at(obj_arg_index), offset))
|
||||
: append(new UnsafePrefetchRead (args->at(obj_arg_index), offset));
|
||||
compilation()->set_has_unsafe_access(true);
|
||||
}
|
||||
return InlineUnsafeOps;
|
||||
}
|
||||
|
||||
|
||||
void GraphBuilder::append_unsafe_CAS(ciMethod* callee) {
|
||||
ValueStack* state_before = copy_state_for_exception();
|
||||
ValueType* result_type = as_ValueType(callee->return_type());
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -368,7 +368,6 @@ class GraphBuilder VALUE_OBJ_CLASS_SPEC {
|
||||
bool append_unsafe_put_obj(ciMethod* callee, BasicType t, bool is_volatile);
|
||||
bool append_unsafe_get_raw(ciMethod* callee, BasicType t);
|
||||
bool append_unsafe_put_raw(ciMethod* callee, BasicType t);
|
||||
bool append_unsafe_prefetch(ciMethod* callee, bool is_store, bool is_static);
|
||||
void append_unsafe_CAS(ciMethod* callee);
|
||||
bool append_unsafe_get_and_set_obj(ciMethod* callee, bool is_add);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -103,9 +103,6 @@ class UnsafeObjectOp;
|
||||
class UnsafeGetObject;
|
||||
class UnsafePutObject;
|
||||
class UnsafeGetAndSetObject;
|
||||
class UnsafePrefetch;
|
||||
class UnsafePrefetchRead;
|
||||
class UnsafePrefetchWrite;
|
||||
class ProfileCall;
|
||||
class ProfileReturnType;
|
||||
class ProfileInvoke;
|
||||
@ -209,8 +206,6 @@ class InstructionVisitor: public StackObj {
|
||||
virtual void do_UnsafeGetObject(UnsafeGetObject* x) = 0;
|
||||
virtual void do_UnsafePutObject(UnsafePutObject* x) = 0;
|
||||
virtual void do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x) = 0;
|
||||
virtual void do_UnsafePrefetchRead (UnsafePrefetchRead* x) = 0;
|
||||
virtual void do_UnsafePrefetchWrite(UnsafePrefetchWrite* x) = 0;
|
||||
virtual void do_ProfileCall (ProfileCall* x) = 0;
|
||||
virtual void do_ProfileReturnType (ProfileReturnType* x) = 0;
|
||||
virtual void do_ProfileInvoke (ProfileInvoke* x) = 0;
|
||||
@ -2442,34 +2437,6 @@ LEAF(UnsafeGetAndSetObject, UnsafeObjectOp)
|
||||
f->visit(&_value); }
|
||||
};
|
||||
|
||||
BASE(UnsafePrefetch, UnsafeObjectOp)
|
||||
public:
|
||||
UnsafePrefetch(Value object, Value offset)
|
||||
: UnsafeObjectOp(T_VOID, object, offset, false, false)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
LEAF(UnsafePrefetchRead, UnsafePrefetch)
|
||||
public:
|
||||
UnsafePrefetchRead(Value object, Value offset)
|
||||
: UnsafePrefetch(object, offset)
|
||||
{
|
||||
ASSERT_VALUES
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
LEAF(UnsafePrefetchWrite, UnsafePrefetch)
|
||||
public:
|
||||
UnsafePrefetchWrite(Value object, Value offset)
|
||||
: UnsafePrefetch(object, offset)
|
||||
{
|
||||
ASSERT_VALUES
|
||||
}
|
||||
};
|
||||
|
||||
LEAF(ProfileCall, Instruction)
|
||||
private:
|
||||
ciMethod* _method;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -853,11 +853,6 @@ void InstructionPrinter::do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x) {
|
||||
output()->put(')');
|
||||
}
|
||||
|
||||
void InstructionPrinter::do_UnsafePrefetchRead(UnsafePrefetchRead* x) {
|
||||
print_unsafe_object_op(x, "UnsafePrefetchRead");
|
||||
output()->put(')');
|
||||
}
|
||||
|
||||
void InstructionPrinter::do_RangeCheckPredicate(RangeCheckPredicate* x) {
|
||||
|
||||
if (x->x() != NULL && x->y() != NULL) {
|
||||
@ -880,11 +875,6 @@ void InstructionPrinter::do_Assert(Assert* x) {
|
||||
}
|
||||
#endif
|
||||
|
||||
void InstructionPrinter::do_UnsafePrefetchWrite(UnsafePrefetchWrite* x) {
|
||||
print_unsafe_object_op(x, "UnsafePrefetchWrite");
|
||||
output()->put(')');
|
||||
}
|
||||
|
||||
void InstructionPrinter::do_ProfileCall(ProfileCall* x) {
|
||||
output()->print("profile ");
|
||||
print_value(x->recv());
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -129,8 +129,6 @@ class InstructionPrinter: public InstructionVisitor {
|
||||
virtual void do_UnsafeGetObject(UnsafeGetObject* x);
|
||||
virtual void do_UnsafePutObject(UnsafePutObject* x);
|
||||
virtual void do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x);
|
||||
virtual void do_UnsafePrefetchRead (UnsafePrefetchRead* x);
|
||||
virtual void do_UnsafePrefetchWrite(UnsafePrefetchWrite* x);
|
||||
virtual void do_ProfileCall (ProfileCall* x);
|
||||
virtual void do_ProfileReturnType (ProfileReturnType* x);
|
||||
virtual void do_ProfileInvoke (ProfileInvoke* x);
|
||||
|
@ -527,8 +527,6 @@ void LIR_OpVisitState::visit(LIR_Op* op) {
|
||||
case lir_move: // input and result always valid, may have info
|
||||
case lir_pack64: // input and result always valid
|
||||
case lir_unpack64: // input and result always valid
|
||||
case lir_prefetchr: // input always valid, result and info always invalid
|
||||
case lir_prefetchw: // input always valid, result and info always invalid
|
||||
{
|
||||
assert(op->as_Op1() != NULL, "must be");
|
||||
LIR_Op1* op1 = (LIR_Op1*)op;
|
||||
@ -1266,13 +1264,6 @@ void LIR_List::volatile_load_unsafe_reg(LIR_Opr base, LIR_Opr offset, LIR_Opr ds
|
||||
}
|
||||
|
||||
|
||||
void LIR_List::prefetch(LIR_Address* addr, bool is_store) {
|
||||
append(new LIR_Op1(
|
||||
is_store ? lir_prefetchw : lir_prefetchr,
|
||||
LIR_OprFact::address(addr)));
|
||||
}
|
||||
|
||||
|
||||
void LIR_List::store_mem_int(jint v, LIR_Opr base, int offset_in_bytes, BasicType type, CodeEmitInfo* info, LIR_PatchCode patch_code) {
|
||||
append(new LIR_Op1(
|
||||
lir_move,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -925,8 +925,6 @@ enum LIR_Code {
|
||||
, lir_branch
|
||||
, lir_cond_float_branch
|
||||
, lir_move
|
||||
, lir_prefetchr
|
||||
, lir_prefetchw
|
||||
, lir_convert
|
||||
, lir_alloc_object
|
||||
, lir_monaddr
|
||||
@ -2212,8 +2210,6 @@ class LIR_List: public CompilationResourceObj {
|
||||
|
||||
void load(LIR_Address* addr, LIR_Opr src, CodeEmitInfo* info = NULL, LIR_PatchCode patch_code = lir_patch_none);
|
||||
|
||||
void prefetch(LIR_Address* addr, bool is_store);
|
||||
|
||||
void store_mem_int(jint v, LIR_Opr base, int offset_in_bytes, BasicType type, CodeEmitInfo* info, LIR_PatchCode patch_code = lir_patch_none);
|
||||
void store_mem_oop(jobject o, LIR_Opr base, int offset_in_bytes, BasicType type, CodeEmitInfo* info, LIR_PatchCode patch_code = lir_patch_none);
|
||||
void store(LIR_Opr src, LIR_Address* addr, CodeEmitInfo* info = NULL, LIR_PatchCode patch_code = lir_patch_none);
|
||||
|
@ -503,14 +503,6 @@ void LIR_Assembler::emit_op1(LIR_Op1* op) {
|
||||
}
|
||||
break;
|
||||
|
||||
case lir_prefetchr:
|
||||
prefetchr(op->in_opr());
|
||||
break;
|
||||
|
||||
case lir_prefetchw:
|
||||
prefetchw(op->in_opr());
|
||||
break;
|
||||
|
||||
case lir_roundfp: {
|
||||
LIR_OpRoundFP* round_op = op->as_OpRoundFP();
|
||||
roundfp_op(round_op->in_opr(), round_op->tmp(), round_op->result_opr(), round_op->pop_fpu_stack());
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -182,9 +182,6 @@ class LIR_Assembler: public CompilationResourceObj {
|
||||
LIR_PatchCode patch_code,
|
||||
CodeEmitInfo* info, bool wide, bool unaligned);
|
||||
|
||||
void prefetchr (LIR_Opr src);
|
||||
void prefetchw (LIR_Opr src);
|
||||
|
||||
void shift_op(LIR_Code code, LIR_Opr left, LIR_Opr count, LIR_Opr dest, LIR_Opr tmp);
|
||||
void shift_op(LIR_Code code, LIR_Opr left, jint count, LIR_Opr dest);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -2385,35 +2385,6 @@ void LIRGenerator::do_UnsafePutObject(UnsafePutObject* x) {
|
||||
}
|
||||
|
||||
|
||||
void LIRGenerator::do_UnsafePrefetch(UnsafePrefetch* x, bool is_store) {
|
||||
LIRItem src(x->object(), this);
|
||||
LIRItem off(x->offset(), this);
|
||||
|
||||
src.load_item();
|
||||
if (off.is_constant() && can_inline_as_constant(x->offset())) {
|
||||
// let it be a constant
|
||||
off.dont_load_item();
|
||||
} else {
|
||||
off.load_item();
|
||||
}
|
||||
|
||||
set_no_result(x);
|
||||
|
||||
LIR_Address* addr = generate_address(src.result(), off.result(), 0, 0, T_BYTE);
|
||||
__ prefetch(addr, is_store);
|
||||
}
|
||||
|
||||
|
||||
void LIRGenerator::do_UnsafePrefetchRead(UnsafePrefetchRead* x) {
|
||||
do_UnsafePrefetch(x, false);
|
||||
}
|
||||
|
||||
|
||||
void LIRGenerator::do_UnsafePrefetchWrite(UnsafePrefetchWrite* x) {
|
||||
do_UnsafePrefetch(x, true);
|
||||
}
|
||||
|
||||
|
||||
void LIRGenerator::do_SwitchRanges(SwitchRangeArray* x, LIR_Opr value, BlockBegin* default_sux) {
|
||||
int lng = x->length();
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -251,8 +251,6 @@ class LIRGenerator: public InstructionVisitor, public BlockClosure {
|
||||
void do_Reference_get(Intrinsic* x);
|
||||
void do_update_CRC32(Intrinsic* x);
|
||||
|
||||
void do_UnsafePrefetch(UnsafePrefetch* x, bool is_store);
|
||||
|
||||
LIR_Opr call_runtime(BasicTypeArray* signature, LIRItemList* args, address entry, ValueType* result_type, CodeEmitInfo* info);
|
||||
LIR_Opr call_runtime(BasicTypeArray* signature, LIR_OprList* args, address entry, ValueType* result_type, CodeEmitInfo* info);
|
||||
|
||||
@ -539,8 +537,6 @@ class LIRGenerator: public InstructionVisitor, public BlockClosure {
|
||||
virtual void do_UnsafeGetObject(UnsafeGetObject* x);
|
||||
virtual void do_UnsafePutObject(UnsafePutObject* x);
|
||||
virtual void do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x);
|
||||
virtual void do_UnsafePrefetchRead (UnsafePrefetchRead* x);
|
||||
virtual void do_UnsafePrefetchWrite(UnsafePrefetchWrite* x);
|
||||
virtual void do_ProfileCall (ProfileCall* x);
|
||||
virtual void do_ProfileReturnType (ProfileReturnType* x);
|
||||
virtual void do_ProfileInvoke (ProfileInvoke* x);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -528,8 +528,6 @@ public:
|
||||
void do_UnsafeGetObject(UnsafeGetObject* x);
|
||||
void do_UnsafePutObject(UnsafePutObject* x);
|
||||
void do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x);
|
||||
void do_UnsafePrefetchRead (UnsafePrefetchRead* x);
|
||||
void do_UnsafePrefetchWrite(UnsafePrefetchWrite* x);
|
||||
void do_ProfileCall (ProfileCall* x);
|
||||
void do_ProfileReturnType (ProfileReturnType* x);
|
||||
void do_ProfileInvoke (ProfileInvoke* x);
|
||||
@ -716,8 +714,6 @@ void NullCheckVisitor::do_UnsafePutRaw (UnsafePutRaw* x) {}
|
||||
void NullCheckVisitor::do_UnsafeGetObject(UnsafeGetObject* x) {}
|
||||
void NullCheckVisitor::do_UnsafePutObject(UnsafePutObject* x) {}
|
||||
void NullCheckVisitor::do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x) {}
|
||||
void NullCheckVisitor::do_UnsafePrefetchRead (UnsafePrefetchRead* x) {}
|
||||
void NullCheckVisitor::do_UnsafePrefetchWrite(UnsafePrefetchWrite* x) {}
|
||||
void NullCheckVisitor::do_ProfileCall (ProfileCall* x) { nce()->clear_last_explicit_null_check();
|
||||
nce()->handle_ProfileCall(x); }
|
||||
void NullCheckVisitor::do_ProfileReturnType (ProfileReturnType* x) { nce()->handle_ProfileReturnType(x); }
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -159,8 +159,6 @@ public:
|
||||
void do_UnsafeGetRaw (UnsafeGetRaw* x) { /* nothing to do */ };
|
||||
void do_UnsafeGetObject(UnsafeGetObject* x) { /* nothing to do */ };
|
||||
void do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x) { /* nothing to do */ };
|
||||
void do_UnsafePrefetchRead (UnsafePrefetchRead* x) { /* nothing to do */ };
|
||||
void do_UnsafePrefetchWrite(UnsafePrefetchWrite* x) { /* nothing to do */ };
|
||||
void do_ProfileCall (ProfileCall* x) { /* nothing to do */ };
|
||||
void do_ProfileReturnType (ProfileReturnType* x) { /* nothing to do */ };
|
||||
void do_ProfileInvoke (ProfileInvoke* x) { /* nothing to do */ };
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -200,8 +200,6 @@ class ValueNumberingVisitor: public InstructionVisitor {
|
||||
void do_RoundFP (RoundFP* x) { /* nothing to do */ }
|
||||
void do_UnsafeGetRaw (UnsafeGetRaw* x) { /* nothing to do */ }
|
||||
void do_UnsafeGetObject(UnsafeGetObject* x) { /* nothing to do */ }
|
||||
void do_UnsafePrefetchRead (UnsafePrefetchRead* x) { /* nothing to do */ }
|
||||
void do_UnsafePrefetchWrite(UnsafePrefetchWrite* x) { /* nothing to do */ }
|
||||
void do_ProfileCall (ProfileCall* x) { /* nothing to do */ }
|
||||
void do_ProfileReturnType (ProfileReturnType* x) { /* nothing to do */ }
|
||||
void do_ProfileInvoke (ProfileInvoke* x) { /* nothing to do */ };
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -1017,18 +1017,6 @@
|
||||
do_intrinsic(_getAndSetObject, sun_misc_Unsafe, getAndSetObject_name, getAndSetObject_signature, F_R)\
|
||||
do_name( getAndSetObject_name, "getAndSetObject") \
|
||||
do_signature(getAndSetObject_signature, "(Ljava/lang/Object;JLjava/lang/Object;)Ljava/lang/Object;" ) \
|
||||
\
|
||||
/* prefetch_signature is shared by all prefetch variants */ \
|
||||
do_signature( prefetch_signature, "(Ljava/lang/Object;J)V") \
|
||||
\
|
||||
do_intrinsic(_prefetchRead, sun_misc_Unsafe, prefetchRead_name, prefetch_signature, F_RN) \
|
||||
do_name( prefetchRead_name, "prefetchRead") \
|
||||
do_intrinsic(_prefetchWrite, sun_misc_Unsafe, prefetchWrite_name, prefetch_signature, F_RN) \
|
||||
do_name( prefetchWrite_name, "prefetchWrite") \
|
||||
do_intrinsic(_prefetchReadStatic, sun_misc_Unsafe, prefetchReadStatic_name, prefetch_signature, F_SN) \
|
||||
do_name( prefetchReadStatic_name, "prefetchReadStatic") \
|
||||
do_intrinsic(_prefetchWriteStatic, sun_misc_Unsafe, prefetchWriteStatic_name, prefetch_signature, F_SN) \
|
||||
do_name( prefetchWriteStatic_name, "prefetchWriteStatic") \
|
||||
/*== LAST_COMPILER_INLINE*/ \
|
||||
/*the compiler does have special inlining code for these; bytecode inline is just fine */ \
|
||||
\
|
||||
@ -1203,7 +1191,7 @@ class vmIntrinsics: AllStatic {
|
||||
#undef VM_INTRINSIC_ENUM
|
||||
|
||||
ID_LIMIT,
|
||||
LAST_COMPILER_INLINE = _prefetchWriteStatic,
|
||||
LAST_COMPILER_INLINE = _getAndSetObject,
|
||||
FIRST_MH_SIG_POLY = _invokeGeneric,
|
||||
FIRST_MH_STATIC = _linkToVirtual,
|
||||
LAST_MH_SIG_POLY = _linkToInterface,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -216,8 +216,6 @@ macro(PopCountI)
|
||||
macro(PopCountL)
|
||||
macro(PowD)
|
||||
macro(PrefetchAllocation)
|
||||
macro(PrefetchRead)
|
||||
macro(PrefetchWrite)
|
||||
macro(Proj)
|
||||
macro(RShiftI)
|
||||
macro(RShiftL)
|
||||
|
@ -232,7 +232,6 @@ class LibraryCallKit : public GraphKit {
|
||||
// Unsafe.getObject should be recorded in an SATB log buffer.
|
||||
void insert_pre_barrier(Node* base_oop, Node* offset, Node* pre_val, bool need_mem_bar);
|
||||
bool inline_unsafe_access(bool is_native_ptr, bool is_store, BasicType type, bool is_volatile);
|
||||
bool inline_unsafe_prefetch(bool is_native_ptr, bool is_store, bool is_static);
|
||||
static bool klass_needs_init_guard(Node* kls);
|
||||
bool inline_unsafe_allocate();
|
||||
bool inline_unsafe_copyMemory();
|
||||
@ -796,11 +795,6 @@ bool LibraryCallKit::try_to_inline(int predicate) {
|
||||
case vmIntrinsics::_putFloatVolatile: return inline_unsafe_access(!is_native_ptr, is_store, T_FLOAT, is_volatile);
|
||||
case vmIntrinsics::_putDoubleVolatile: return inline_unsafe_access(!is_native_ptr, is_store, T_DOUBLE, is_volatile);
|
||||
|
||||
case vmIntrinsics::_prefetchRead: return inline_unsafe_prefetch(!is_native_ptr, !is_store, !is_static);
|
||||
case vmIntrinsics::_prefetchWrite: return inline_unsafe_prefetch(!is_native_ptr, is_store, !is_static);
|
||||
case vmIntrinsics::_prefetchReadStatic: return inline_unsafe_prefetch(!is_native_ptr, !is_store, is_static);
|
||||
case vmIntrinsics::_prefetchWriteStatic: return inline_unsafe_prefetch(!is_native_ptr, is_store, is_static);
|
||||
|
||||
case vmIntrinsics::_compareAndSwapObject: return inline_unsafe_load_store(T_OBJECT, LS_cmpxchg);
|
||||
case vmIntrinsics::_compareAndSwapInt: return inline_unsafe_load_store(T_INT, LS_cmpxchg);
|
||||
case vmIntrinsics::_compareAndSwapLong: return inline_unsafe_load_store(T_LONG, LS_cmpxchg);
|
||||
@ -2506,7 +2500,7 @@ bool LibraryCallKit::inline_unsafe_access(bool is_native_ptr, bool is_store, Bas
|
||||
|
||||
Node* receiver = argument(0); // type: oop
|
||||
|
||||
// Build address expression. See the code in inline_unsafe_prefetch.
|
||||
// Build address expression.
|
||||
Node* adr;
|
||||
Node* heap_base_oop = top();
|
||||
Node* offset = top();
|
||||
@ -2695,73 +2689,6 @@ bool LibraryCallKit::inline_unsafe_access(bool is_native_ptr, bool is_store, Bas
|
||||
return true;
|
||||
}
|
||||
|
||||
//----------------------------inline_unsafe_prefetch----------------------------
|
||||
|
||||
bool LibraryCallKit::inline_unsafe_prefetch(bool is_native_ptr, bool is_store, bool is_static) {
|
||||
#ifndef PRODUCT
|
||||
{
|
||||
ResourceMark rm;
|
||||
// Check the signatures.
|
||||
ciSignature* sig = callee()->signature();
|
||||
#ifdef ASSERT
|
||||
// Object getObject(Object base, int/long offset), etc.
|
||||
BasicType rtype = sig->return_type()->basic_type();
|
||||
if (!is_native_ptr) {
|
||||
assert(sig->count() == 2, "oop prefetch has 2 arguments");
|
||||
assert(sig->type_at(0)->basic_type() == T_OBJECT, "prefetch base is object");
|
||||
assert(sig->type_at(1)->basic_type() == T_LONG, "prefetcha offset is correct");
|
||||
} else {
|
||||
assert(sig->count() == 1, "native prefetch has 1 argument");
|
||||
assert(sig->type_at(0)->basic_type() == T_LONG, "prefetch base is long");
|
||||
}
|
||||
#endif // ASSERT
|
||||
}
|
||||
#endif // !PRODUCT
|
||||
|
||||
C->set_has_unsafe_access(true); // Mark eventual nmethod as "unsafe".
|
||||
|
||||
const int idx = is_static ? 0 : 1;
|
||||
if (!is_static) {
|
||||
null_check_receiver();
|
||||
if (stopped()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Build address expression. See the code in inline_unsafe_access.
|
||||
Node *adr;
|
||||
if (!is_native_ptr) {
|
||||
// The base is either a Java object or a value produced by Unsafe.staticFieldBase
|
||||
Node* base = argument(idx + 0); // type: oop
|
||||
// The offset is a value produced by Unsafe.staticFieldOffset or Unsafe.objectFieldOffset
|
||||
Node* offset = argument(idx + 1); // type: long
|
||||
// We currently rely on the cookies produced by Unsafe.xxxFieldOffset
|
||||
// to be plain byte offsets, which are also the same as those accepted
|
||||
// by oopDesc::field_base.
|
||||
assert(Unsafe_field_offset_to_byte_offset(11) == 11,
|
||||
"fieldOffset must be byte-scaled");
|
||||
// 32-bit machines ignore the high half!
|
||||
offset = ConvL2X(offset);
|
||||
adr = make_unsafe_address(base, offset);
|
||||
} else {
|
||||
Node* ptr = argument(idx + 0); // type: long
|
||||
ptr = ConvL2X(ptr); // adjust Java long to machine word
|
||||
adr = make_unsafe_address(NULL, ptr);
|
||||
}
|
||||
|
||||
// Generate the read or write prefetch
|
||||
Node *prefetch;
|
||||
if (is_store) {
|
||||
prefetch = new PrefetchWriteNode(i_o(), adr);
|
||||
} else {
|
||||
prefetch = new PrefetchReadNode(i_o(), adr);
|
||||
}
|
||||
prefetch->init_req(0, control());
|
||||
set_i_o(_gvn.transform(prefetch));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//----------------------------inline_unsafe_load_store----------------------------
|
||||
// This method serves a couple of different customers (depending on LoadStoreKind):
|
||||
//
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -884,8 +884,6 @@ static void match_alias_type(Compile* C, Node* n, Node* m) {
|
||||
// %%% Kludgery. Instead, fix ideal adr_type methods for all these cases:
|
||||
if (nidx == Compile::AliasIdxTop && midx == Compile::AliasIdxRaw) {
|
||||
switch (n->Opcode()) {
|
||||
case Op_PrefetchRead:
|
||||
case Op_PrefetchWrite:
|
||||
case Op_PrefetchAllocation:
|
||||
nidx = Compile::AliasIdxRaw;
|
||||
nat = TypeRawPtr::BOTTOM;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -1376,26 +1376,6 @@ class MergeMemStream : public StackObj {
|
||||
|
||||
//------------------------------Prefetch---------------------------------------
|
||||
|
||||
// Non-faulting prefetch load. Prefetch for many reads.
|
||||
class PrefetchReadNode : public Node {
|
||||
public:
|
||||
PrefetchReadNode(Node *abio, Node *adr) : Node(0,abio,adr) {}
|
||||
virtual int Opcode() const;
|
||||
virtual uint ideal_reg() const { return NotAMachineReg; }
|
||||
virtual uint match_edge(uint idx) const { return idx==2; }
|
||||
virtual const Type *bottom_type() const { return Type::ABIO; }
|
||||
};
|
||||
|
||||
// Non-faulting prefetch load. Prefetch for many reads & many writes.
|
||||
class PrefetchWriteNode : public Node {
|
||||
public:
|
||||
PrefetchWriteNode(Node *abio, Node *adr) : Node(0,abio,adr) {}
|
||||
virtual int Opcode() const;
|
||||
virtual uint ideal_reg() const { return NotAMachineReg; }
|
||||
virtual uint match_edge(uint idx) const { return idx==2; }
|
||||
virtual const Type *bottom_type() const { return Type::ABIO; }
|
||||
};
|
||||
|
||||
// Allocation prefetch which may fault, TLAB size have to be adjusted.
|
||||
class PrefetchAllocationNode : public Node {
|
||||
public:
|
||||
|
@ -1920,8 +1920,6 @@ typedef CompactHashtable<Symbol*, char> SymbolCompactHashTable;
|
||||
declare_c2_type(CompareAndSwapINode, LoadStoreNode) \
|
||||
declare_c2_type(CompareAndSwapPNode, LoadStoreNode) \
|
||||
declare_c2_type(CompareAndSwapNNode, LoadStoreNode) \
|
||||
declare_c2_type(PrefetchReadNode, Node) \
|
||||
declare_c2_type(PrefetchWriteNode, Node) \
|
||||
declare_c2_type(MulNode, Node) \
|
||||
declare_c2_type(MulINode, MulNode) \
|
||||
declare_c2_type(MulLNode, MulNode) \
|
||||
|
Loading…
Reference in New Issue
Block a user