# HG changeset patch # User psandoz # Date 1423606956 0 # Node ID c90fb9fd47bd2d0e1fc2fcb679df5f9003e0360b # Parent 75f0bfa6ea14097edab1827a488561fca523637c# Parent 7dda6c26cc98f51609ca5bfdfa59af97b241cea3 Merge diff -r 75f0bfa6ea14 -r c90fb9fd47bd hotspot/src/cpu/ppc/vm/ppc.ad --- a/hotspot/src/cpu/ppc/vm/ppc.ad Tue Feb 10 15:10:47 2015 -0500 +++ b/hotspot/src/cpu/ppc/vm/ppc.ad Tue Feb 10 22:22:36 2015 +0000 @@ -6365,58 +6365,6 @@ // 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)); diff -r 75f0bfa6ea14 -r c90fb9fd47bd hotspot/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp --- a/hotspot/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp Tue Feb 10 15:10:47 2015 -0500 +++ b/hotspot/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp Tue Feb 10 22:22:36 2015 +0000 @@ -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::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()) { diff -r 75f0bfa6ea14 -r c90fb9fd47bd hotspot/src/cpu/sparc/vm/sparc.ad --- a/hotspot/src/cpu/sparc/vm/sparc.ad Tue Feb 10 15:10:47 2015 -0500 +++ b/hotspot/src/cpu/sparc/vm/sparc.ad Tue Feb 10 22:22:36 2015 +0000 @@ -889,8 +889,6 @@ !(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,33 +6314,9 @@ ins_pipe(loadConFD); %} -// Prefetch instructions. +// Prefetch instructions for allocation. // 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. - instruct prefetchAlloc( memory mem ) %{ predicate(AllocatePrefetchInstr == 0); match( PrefetchAllocation mem ); diff -r 75f0bfa6ea14 -r c90fb9fd47bd hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp --- a/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp Tue Feb 10 15:10:47 2015 -0500 +++ b/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp Tue Feb 10 22:22:36 2015 +0000 @@ -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::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); diff -r 75f0bfa6ea14 -r c90fb9fd47bd hotspot/src/cpu/x86/vm/globals_x86.hpp --- a/hotspot/src/cpu/x86/vm/globals_x86.hpp Tue Feb 10 15:10:47 2015 -0500 +++ b/hotspot/src/cpu/x86/vm/globals_x86.hpp Tue Feb 10 22:22:36 2015 +0000 @@ -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 @@ 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") \ \ diff -r 75f0bfa6ea14 -r c90fb9fd47bd hotspot/src/cpu/x86/vm/vm_version_x86.cpp --- a/hotspot/src/cpu/x86/vm/vm_version_x86.cpp Tue Feb 10 15:10:47 2015 -0500 +++ b/hotspot/src/cpu/x86/vm/vm_version_x86.cpp Tue Feb 10 22:22:36 2015 +0000 @@ -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 @@ } #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; diff -r 75f0bfa6ea14 -r c90fb9fd47bd hotspot/src/cpu/x86/vm/x86_32.ad --- a/hotspot/src/cpu/x86/vm/x86_32.ad Tue Feb 10 15:10:47 2015 -0500 +++ b/hotspot/src/cpu/x86/vm/x86_32.ad Tue Feb 10 22:22:36 2015 +0000 @@ -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,103 +6061,9 @@ ins_pipe( fpu_reg_mem ); %} -// Prefetch instructions. +// Prefetch instructions for allocation. // 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. - instruct prefetchAlloc0( memory mem ) %{ predicate(UseSSE==0 && AllocatePrefetchInstr!=3); match(PrefetchAllocation mem); diff -r 75f0bfa6ea14 -r c90fb9fd47bd hotspot/src/cpu/x86/vm/x86_64.ad --- a/hotspot/src/cpu/x86/vm/x86_64.ad Tue Feb 10 15:10:47 2015 -0500 +++ b/hotspot/src/cpu/x86/vm/x86_64.ad Tue Feb 10 22:22:36 2015 +0000 @@ -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,70 +5319,9 @@ ins_pipe(pipe_slow); // XXX %} -// Prefetch instructions. +// Prefetch instructions for allocation. // 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. - instruct prefetchAlloc( memory mem ) %{ predicate(AllocatePrefetchInstr==3); match(PrefetchAllocation mem); diff -r 75f0bfa6ea14 -r c90fb9fd47bd hotspot/src/share/vm/adlc/formssel.cpp --- a/hotspot/src/share/vm/adlc/formssel.cpp Tue Feb 10 15:10:47 2015 -0500 +++ b/hotspot/src/share/vm/adlc/formssel.cpp Tue Feb 10 22:22:36 2015 +0000 @@ -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 @@ "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; diff -r 75f0bfa6ea14 -r c90fb9fd47bd hotspot/src/share/vm/c1/c1_Canonicalizer.cpp --- a/hotspot/src/share/vm/c1/c1_Canonicalizer.cpp Tue Feb 10 15:10:47 2015 -0500 +++ b/hotspot/src/share/vm/c1/c1_Canonicalizer.cpp Tue Feb 10 22:22:36 2015 +0000 @@ -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_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) {} diff -r 75f0bfa6ea14 -r c90fb9fd47bd hotspot/src/share/vm/c1/c1_Canonicalizer.hpp --- a/hotspot/src/share/vm/c1/c1_Canonicalizer.hpp Tue Feb 10 15:10:47 2015 -0500 +++ b/hotspot/src/share/vm/c1/c1_Canonicalizer.hpp Tue Feb 10 22:22:36 2015 +0000 @@ -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 @@ 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); diff -r 75f0bfa6ea14 -r c90fb9fd47bd hotspot/src/share/vm/c1/c1_GraphBuilder.cpp --- a/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp Tue Feb 10 15:10:47 2015 -0500 +++ b/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp Tue Feb 10 22:22:36 2015 +0000 @@ -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 @@ 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_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()); diff -r 75f0bfa6ea14 -r c90fb9fd47bd hotspot/src/share/vm/c1/c1_GraphBuilder.hpp --- a/hotspot/src/share/vm/c1/c1_GraphBuilder.hpp Tue Feb 10 15:10:47 2015 -0500 +++ b/hotspot/src/share/vm/c1/c1_GraphBuilder.hpp Tue Feb 10 22:22:36 2015 +0000 @@ -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 @@ 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); diff -r 75f0bfa6ea14 -r c90fb9fd47bd hotspot/src/share/vm/c1/c1_Instruction.hpp --- a/hotspot/src/share/vm/c1/c1_Instruction.hpp Tue Feb 10 15:10:47 2015 -0500 +++ b/hotspot/src/share/vm/c1/c1_Instruction.hpp Tue Feb 10 22:22:36 2015 +0000 @@ -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 UnsafeGetObject; class UnsafePutObject; class UnsafeGetAndSetObject; -class UnsafePrefetch; -class UnsafePrefetchRead; -class UnsafePrefetchWrite; class ProfileCall; class ProfileReturnType; class ProfileInvoke; @@ -209,8 +206,6 @@ 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 @@ 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; diff -r 75f0bfa6ea14 -r c90fb9fd47bd hotspot/src/share/vm/c1/c1_InstructionPrinter.cpp --- a/hotspot/src/share/vm/c1/c1_InstructionPrinter.cpp Tue Feb 10 15:10:47 2015 -0500 +++ b/hotspot/src/share/vm/c1/c1_InstructionPrinter.cpp Tue Feb 10 22:22:36 2015 +0000 @@ -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 @@ 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 @@ } #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()); diff -r 75f0bfa6ea14 -r c90fb9fd47bd hotspot/src/share/vm/c1/c1_InstructionPrinter.hpp --- a/hotspot/src/share/vm/c1/c1_InstructionPrinter.hpp Tue Feb 10 15:10:47 2015 -0500 +++ b/hotspot/src/share/vm/c1/c1_InstructionPrinter.hpp Tue Feb 10 22:22:36 2015 +0000 @@ -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 @@ 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); diff -r 75f0bfa6ea14 -r c90fb9fd47bd hotspot/src/share/vm/c1/c1_LIR.cpp --- a/hotspot/src/share/vm/c1/c1_LIR.cpp Tue Feb 10 15:10:47 2015 -0500 +++ b/hotspot/src/share/vm/c1/c1_LIR.cpp Tue Feb 10 22:22:36 2015 +0000 @@ -527,8 +527,6 @@ 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::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, diff -r 75f0bfa6ea14 -r c90fb9fd47bd hotspot/src/share/vm/c1/c1_LIR.hpp --- a/hotspot/src/share/vm/c1/c1_LIR.hpp Tue Feb 10 15:10:47 2015 -0500 +++ b/hotspot/src/share/vm/c1/c1_LIR.hpp Tue Feb 10 22:22:36 2015 +0000 @@ -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 @@ , lir_branch , lir_cond_float_branch , lir_move - , lir_prefetchr - , lir_prefetchw , lir_convert , lir_alloc_object , lir_monaddr @@ -2212,8 +2210,6 @@ 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); diff -r 75f0bfa6ea14 -r c90fb9fd47bd hotspot/src/share/vm/c1/c1_LIRAssembler.cpp --- a/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp Tue Feb 10 15:10:47 2015 -0500 +++ b/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp Tue Feb 10 22:22:36 2015 +0000 @@ -503,14 +503,6 @@ } 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()); diff -r 75f0bfa6ea14 -r c90fb9fd47bd hotspot/src/share/vm/c1/c1_LIRAssembler.hpp --- a/hotspot/src/share/vm/c1/c1_LIRAssembler.hpp Tue Feb 10 15:10:47 2015 -0500 +++ b/hotspot/src/share/vm/c1/c1_LIRAssembler.hpp Tue Feb 10 22:22:36 2015 +0000 @@ -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 @@ 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); diff -r 75f0bfa6ea14 -r c90fb9fd47bd hotspot/src/share/vm/c1/c1_LIRGenerator.cpp --- a/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp Tue Feb 10 15:10:47 2015 -0500 +++ b/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp Tue Feb 10 22:22:36 2015 +0000 @@ -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_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(); diff -r 75f0bfa6ea14 -r c90fb9fd47bd hotspot/src/share/vm/c1/c1_LIRGenerator.hpp --- a/hotspot/src/share/vm/c1/c1_LIRGenerator.hpp Tue Feb 10 15:10:47 2015 -0500 +++ b/hotspot/src/share/vm/c1/c1_LIRGenerator.hpp Tue Feb 10 22:22:36 2015 +0000 @@ -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 @@ 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 @@ 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); diff -r 75f0bfa6ea14 -r c90fb9fd47bd hotspot/src/share/vm/c1/c1_Optimizer.cpp --- a/hotspot/src/share/vm/c1/c1_Optimizer.cpp Tue Feb 10 15:10:47 2015 -0500 +++ b/hotspot/src/share/vm/c1/c1_Optimizer.cpp Tue Feb 10 22:22:36 2015 +0000 @@ -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 @@ 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_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); } diff -r 75f0bfa6ea14 -r c90fb9fd47bd hotspot/src/share/vm/c1/c1_RangeCheckElimination.hpp --- a/hotspot/src/share/vm/c1/c1_RangeCheckElimination.hpp Tue Feb 10 15:10:47 2015 -0500 +++ b/hotspot/src/share/vm/c1/c1_RangeCheckElimination.hpp Tue Feb 10 22:22:36 2015 +0000 @@ -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 @@ 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 */ }; diff -r 75f0bfa6ea14 -r c90fb9fd47bd hotspot/src/share/vm/c1/c1_ValueMap.hpp --- a/hotspot/src/share/vm/c1/c1_ValueMap.hpp Tue Feb 10 15:10:47 2015 -0500 +++ b/hotspot/src/share/vm/c1/c1_ValueMap.hpp Tue Feb 10 22:22:36 2015 +0000 @@ -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 @@ 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 */ }; diff -r 75f0bfa6ea14 -r c90fb9fd47bd hotspot/src/share/vm/classfile/vmSymbols.hpp --- a/hotspot/src/share/vm/classfile/vmSymbols.hpp Tue Feb 10 15:10:47 2015 -0500 +++ b/hotspot/src/share/vm/classfile/vmSymbols.hpp Tue Feb 10 22:22:36 2015 +0000 @@ -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 @@ #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, diff -r 75f0bfa6ea14 -r c90fb9fd47bd hotspot/src/share/vm/opto/classes.hpp --- a/hotspot/src/share/vm/opto/classes.hpp Tue Feb 10 15:10:47 2015 -0500 +++ b/hotspot/src/share/vm/opto/classes.hpp Tue Feb 10 22:22:36 2015 +0000 @@ -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(PopCountL) macro(PowD) macro(PrefetchAllocation) -macro(PrefetchRead) -macro(PrefetchWrite) macro(Proj) macro(RShiftI) macro(RShiftL) diff -r 75f0bfa6ea14 -r c90fb9fd47bd hotspot/src/share/vm/opto/library_call.cpp --- a/hotspot/src/share/vm/opto/library_call.cpp Tue Feb 10 15:10:47 2015 -0500 +++ b/hotspot/src/share/vm/opto/library_call.cpp Tue Feb 10 22:22:36 2015 +0000 @@ -232,7 +232,6 @@ // 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 @@ 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 @@ 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 @@ 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): // diff -r 75f0bfa6ea14 -r c90fb9fd47bd hotspot/src/share/vm/opto/matcher.cpp --- a/hotspot/src/share/vm/opto/matcher.cpp Tue Feb 10 15:10:47 2015 -0500 +++ b/hotspot/src/share/vm/opto/matcher.cpp Tue Feb 10 22:22:36 2015 +0000 @@ -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 @@ // %%% 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; diff -r 75f0bfa6ea14 -r c90fb9fd47bd hotspot/src/share/vm/opto/memnode.hpp --- a/hotspot/src/share/vm/opto/memnode.hpp Tue Feb 10 15:10:47 2015 -0500 +++ b/hotspot/src/share/vm/opto/memnode.hpp Tue Feb 10 22:22:36 2015 +0000 @@ -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 @@ //------------------------------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: diff -r 75f0bfa6ea14 -r c90fb9fd47bd hotspot/src/share/vm/runtime/vmStructs.cpp --- a/hotspot/src/share/vm/runtime/vmStructs.cpp Tue Feb 10 15:10:47 2015 -0500 +++ b/hotspot/src/share/vm/runtime/vmStructs.cpp Tue Feb 10 22:22:36 2015 +0000 @@ -1920,8 +1920,6 @@ 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) \