Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
5f85a401
D
dragonwell8_hotspot
项目概览
openanolis
/
dragonwell8_hotspot
通知
2
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_hotspot
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
5f85a401
编写于
8月 19, 2010
作者:
N
never
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6978249: spill between cpu and fpu registers when those moves are fast
Reviewed-by: kvn
上级
dd120b5e
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
116 addition
and
8 deletion
+116
-8
src/cpu/sparc/vm/vm_version_sparc.cpp
src/cpu/sparc/vm/vm_version_sparc.cpp
+5
-0
src/cpu/x86/vm/vm_version_x86.cpp
src/cpu/x86/vm/vm_version_x86.cpp
+14
-0
src/cpu/x86/vm/x86_32.ad
src/cpu/x86/vm/x86_32.ad
+46
-0
src/cpu/x86/vm/x86_64.ad
src/cpu/x86/vm/x86_64.ad
+4
-4
src/share/vm/opto/c2_globals.hpp
src/share/vm/opto/c2_globals.hpp
+3
-0
src/share/vm/opto/coalesce.cpp
src/share/vm/opto/coalesce.cpp
+8
-0
src/share/vm/opto/matcher.cpp
src/share/vm/opto/matcher.cpp
+17
-0
src/share/vm/opto/reg_split.cpp
src/share/vm/opto/reg_split.cpp
+13
-0
src/share/vm/runtime/arguments.cpp
src/share/vm/runtime/arguments.cpp
+0
-4
src/share/vm/runtime/init.cpp
src/share/vm/runtime/init.cpp
+6
-0
未找到文件。
src/cpu/sparc/vm/vm_version_sparc.cpp
浏览文件 @
5f85a401
...
@@ -112,6 +112,11 @@ void VM_Version::initialize() {
...
@@ -112,6 +112,11 @@ void VM_Version::initialize() {
}
}
}
}
#ifdef COMPILER2
// Currently not supported anywhere.
FLAG_SET_DEFAULT
(
UseFPUForSpilling
,
false
);
#endif
char
buf
[
512
];
char
buf
[
512
];
jio_snprintf
(
buf
,
sizeof
(
buf
),
"%s%s%s%s%s%s%s%s%s%s%s%s"
,
jio_snprintf
(
buf
,
sizeof
(
buf
),
"%s%s%s%s%s%s%s%s%s%s%s%s"
,
(
has_v8
()
?
", has_v8"
:
""
),
(
has_v8
()
?
", has_v8"
:
""
),
...
...
src/cpu/x86/vm/vm_version_x86.cpp
浏览文件 @
5f85a401
...
@@ -482,6 +482,15 @@ void VM_Version::get_processor_features() {
...
@@ -482,6 +482,15 @@ void VM_Version::get_processor_features() {
}
}
}
}
#ifdef COMPILER2
if
(
UseFPUForSpilling
)
{
if
(
UseSSE
<
2
)
{
// Only supported with SSE2+
FLAG_SET_DEFAULT
(
UseFPUForSpilling
,
false
);
}
}
#endif
assert
(
0
<=
ReadPrefetchInstr
&&
ReadPrefetchInstr
<=
3
,
"invalid value"
);
assert
(
0
<=
ReadPrefetchInstr
&&
ReadPrefetchInstr
<=
3
,
"invalid value"
);
assert
(
0
<=
AllocatePrefetchInstr
&&
AllocatePrefetchInstr
<=
3
,
"invalid value"
);
assert
(
0
<=
AllocatePrefetchInstr
&&
AllocatePrefetchInstr
<=
3
,
"invalid value"
);
...
@@ -520,6 +529,11 @@ void VM_Version::get_processor_features() {
...
@@ -520,6 +529,11 @@ void VM_Version::get_processor_features() {
if
(
supports_sse4_2
()
&&
supports_ht
()
)
{
// Nehalem based cpus
if
(
supports_sse4_2
()
&&
supports_ht
()
)
{
// Nehalem based cpus
AllocatePrefetchDistance
=
192
;
AllocatePrefetchDistance
=
192
;
AllocatePrefetchLines
=
4
;
AllocatePrefetchLines
=
4
;
#ifdef COMPILER2
if
(
AggressiveOpts
&&
FLAG_IS_DEFAULT
(
UseFPUForSpilling
))
{
FLAG_SET_DEFAULT
(
UseFPUForSpilling
,
true
);
}
#endif
}
}
}
}
assert
(
AllocatePrefetchDistance
%
AllocatePrefetchStepSize
==
0
,
"invalid value"
);
assert
(
AllocatePrefetchDistance
%
AllocatePrefetchStepSize
==
0
,
"invalid value"
);
...
...
src/cpu/x86/vm/x86_32.ad
浏览文件 @
5f85a401
...
@@ -852,6 +852,39 @@ static int impl_movx_helper( CodeBuffer *cbuf, bool do_size, int src_lo, int dst
...
@@ -852,6 +852,39 @@ static int impl_movx_helper( CodeBuffer *cbuf, bool do_size, int src_lo, int dst
}
}
}
}
static int impl_movgpr2x_helper( CodeBuffer *cbuf, bool do_size, int src_lo, int dst_lo,
int src_hi, int dst_hi, int size, outputStream* st ) {
// 32-bit
if (cbuf) {
emit_opcode(*cbuf, 0x66);
emit_opcode(*cbuf, 0x0F);
emit_opcode(*cbuf, 0x6E);
emit_rm(*cbuf, 0x3, Matcher::_regEncode[dst_lo] & 7, Matcher::_regEncode[src_lo] & 7);
#ifndef PRODUCT
} else if (!do_size) {
st->print("movdl %s, %s\t# spill", Matcher::regName[dst_lo], Matcher::regName[src_lo]);
#endif
}
return 4;
}
static int impl_movx2gpr_helper( CodeBuffer *cbuf, bool do_size, int src_lo, int dst_lo,
int src_hi, int dst_hi, int size, outputStream* st ) {
// 32-bit
if (cbuf) {
emit_opcode(*cbuf, 0x66);
emit_opcode(*cbuf, 0x0F);
emit_opcode(*cbuf, 0x7E);
emit_rm(*cbuf, 0x3, Matcher::_regEncode[src_lo] & 7, Matcher::_regEncode[dst_lo] & 7);
#ifndef PRODUCT
} else if (!do_size) {
st->print("movdl %s, %s\t# spill", Matcher::regName[dst_lo], Matcher::regName[src_lo]);
#endif
}
return 4;
}
static int impl_mov_helper( CodeBuffer *cbuf, bool do_size, int src, int dst, int size, outputStream* st ) {
static int impl_mov_helper( CodeBuffer *cbuf, bool do_size, int src, int dst, int size, outputStream* st ) {
if( cbuf ) {
if( cbuf ) {
emit_opcode(*cbuf, 0x8B );
emit_opcode(*cbuf, 0x8B );
...
@@ -947,6 +980,12 @@ uint MachSpillCopyNode::implementation( CodeBuffer *cbuf, PhaseRegAlloc *ra_, bo
...
@@ -947,6 +980,12 @@ uint MachSpillCopyNode::implementation( CodeBuffer *cbuf, PhaseRegAlloc *ra_, bo
if( dst_first_rc == rc_int && src_first_rc == rc_stack )
if( dst_first_rc == rc_int && src_first_rc == rc_stack )
size = impl_helper(cbuf,do_size,true ,ra_->reg2offset(src_first),dst_first,0x8B,"MOV ",size, st);
size = impl_helper(cbuf,do_size,true ,ra_->reg2offset(src_first),dst_first,0x8B,"MOV ",size, st);
// Check for integer reg-xmm reg copy
if( src_first_rc == rc_int && dst_first_rc == rc_xmm ) {
assert( (src_second_rc == rc_bad && dst_second_rc == rc_bad),
"no 64 bit integer-float reg moves" );
return impl_movgpr2x_helper(cbuf,do_size,src_first,dst_first,src_second, dst_second, size, st);
}
// --------------------------------------
// --------------------------------------
// Check for float reg-reg copy
// Check for float reg-reg copy
if( src_first_rc == rc_float && dst_first_rc == rc_float ) {
if( src_first_rc == rc_float && dst_first_rc == rc_float ) {
...
@@ -1018,6 +1057,13 @@ uint MachSpillCopyNode::implementation( CodeBuffer *cbuf, PhaseRegAlloc *ra_, bo
...
@@ -1018,6 +1057,13 @@ uint MachSpillCopyNode::implementation( CodeBuffer *cbuf, PhaseRegAlloc *ra_, bo
return impl_movx_helper(cbuf,do_size,src_first,dst_first,src_second, dst_second, size, st);
return impl_movx_helper(cbuf,do_size,src_first,dst_first,src_second, dst_second, size, st);
}
}
// Check for xmm reg-integer reg copy
if( src_first_rc == rc_xmm && dst_first_rc == rc_int ) {
assert( (src_second_rc == rc_bad && dst_second_rc == rc_bad),
"no 64 bit float-integer reg moves" );
return impl_movx2gpr_helper(cbuf,do_size,src_first,dst_first,src_second, dst_second, size, st);
}
// Check for xmm store
// Check for xmm store
if( src_first_rc == rc_xmm && dst_first_rc == rc_stack ) {
if( src_first_rc == rc_xmm && dst_first_rc == rc_stack ) {
return impl_x_helper(cbuf,do_size,false,ra_->reg2offset(dst_first),src_first, src_second, size, st);
return impl_x_helper(cbuf,do_size,false,ra_->reg2offset(dst_first),src_first, src_second, size, st);
...
...
src/cpu/x86/vm/x86_64.ad
浏览文件 @
5f85a401
...
@@ -1607,8 +1607,8 @@ uint MachSpillCopyNode::implementation(CodeBuffer* cbuf,
...
@@ -1607,8 +1607,8 @@ uint MachSpillCopyNode::implementation(CodeBuffer* cbuf,
emit_opcode(*cbuf, 0x0F);
emit_opcode(*cbuf, 0x0F);
emit_opcode(*cbuf, 0x7E);
emit_opcode(*cbuf, 0x7E);
emit_rm(*cbuf, 0x3,
emit_rm(*cbuf, 0x3,
Matcher::_regEncode[
dst
_first] & 7,
Matcher::_regEncode[
src
_first] & 7,
Matcher::_regEncode[
src
_first] & 7);
Matcher::_regEncode[
dst
_first] & 7);
#ifndef PRODUCT
#ifndef PRODUCT
} else if (!do_size) {
} else if (!do_size) {
st->print("movdq %s, %s\t# spill",
st->print("movdq %s, %s\t# spill",
...
@@ -1637,8 +1637,8 @@ uint MachSpillCopyNode::implementation(CodeBuffer* cbuf,
...
@@ -1637,8 +1637,8 @@ uint MachSpillCopyNode::implementation(CodeBuffer* cbuf,
emit_opcode(*cbuf, 0x0F);
emit_opcode(*cbuf, 0x0F);
emit_opcode(*cbuf, 0x7E);
emit_opcode(*cbuf, 0x7E);
emit_rm(*cbuf, 0x3,
emit_rm(*cbuf, 0x3,
Matcher::_regEncode[
dst
_first] & 7,
Matcher::_regEncode[
src
_first] & 7,
Matcher::_regEncode[
src
_first] & 7);
Matcher::_regEncode[
dst
_first] & 7);
#ifndef PRODUCT
#ifndef PRODUCT
} else if (!do_size) {
} else if (!do_size) {
st->print("movdl %s, %s\t# spill",
st->print("movdl %s, %s\t# spill",
...
...
src/share/vm/opto/c2_globals.hpp
浏览文件 @
5f85a401
...
@@ -178,6 +178,9 @@
...
@@ -178,6 +178,9 @@
product(bool, ReduceBulkZeroing, true, \
product(bool, ReduceBulkZeroing, true, \
"When bulk-initializing, try to avoid needless zeroing") \
"When bulk-initializing, try to avoid needless zeroing") \
\
\
product(bool, UseFPUForSpilling, false, \
"Spill integer registers to FPU instead of stack when possible") \
\
develop_pd(intx, RegisterCostAreaRatio, \
develop_pd(intx, RegisterCostAreaRatio, \
"Spill selection in reg allocator: scale area by (X/64K) before " \
"Spill selection in reg allocator: scale area by (X/64K) before " \
"adding cost") \
"adding cost") \
...
...
src/share/vm/opto/coalesce.cpp
浏览文件 @
5f85a401
...
@@ -780,6 +780,14 @@ bool PhaseConservativeCoalesce::copy_copy( Node *dst_copy, Node *src_copy, Block
...
@@ -780,6 +780,14 @@ bool PhaseConservativeCoalesce::copy_copy( Node *dst_copy, Node *src_copy, Block
// Number of bits free
// Number of bits free
uint
rm_size
=
rm
.
Size
();
uint
rm_size
=
rm
.
Size
();
if
(
UseFPUForSpilling
&&
rm
.
is_AllStack
()
)
{
// Don't coalesce when frequency difference is large
Block
*
dst_b
=
_phc
.
_cfg
.
_bbs
[
dst_copy
->
_idx
];
Block
*
src_def_b
=
_phc
.
_cfg
.
_bbs
[
src_def
->
_idx
];
if
(
src_def_b
->
_freq
>
10
*
dst_b
->
_freq
)
return
false
;
}
// If we can use any stack slot, then effective size is infinite
// If we can use any stack slot, then effective size is infinite
if
(
rm
.
is_AllStack
()
)
rm_size
+=
1000000
;
if
(
rm
.
is_AllStack
()
)
rm_size
+=
1000000
;
// Incompatible masks, no way to coalesce
// Incompatible masks, no way to coalesce
...
...
src/share/vm/opto/matcher.cpp
浏览文件 @
5f85a401
...
@@ -456,6 +456,23 @@ void Matcher::init_first_stack_mask() {
...
@@ -456,6 +456,23 @@ void Matcher::init_first_stack_mask() {
*
idealreg2spillmask
[
Op_RegP
]
=
*
idealreg2regmask
[
Op_RegP
];
*
idealreg2spillmask
[
Op_RegP
]
=
*
idealreg2regmask
[
Op_RegP
];
idealreg2spillmask
[
Op_RegP
]
->
OR
(
C
->
FIRST_STACK_mask
());
idealreg2spillmask
[
Op_RegP
]
->
OR
(
C
->
FIRST_STACK_mask
());
if
(
UseFPUForSpilling
)
{
// This mask logic assumes that the spill operations are
// symmetric and that the registers involved are the same size.
// On sparc for instance we may have to use 64 bit moves will
// kill 2 registers when used with F0-F31.
idealreg2spillmask
[
Op_RegI
]
->
OR
(
*
idealreg2regmask
[
Op_RegF
]);
idealreg2spillmask
[
Op_RegF
]
->
OR
(
*
idealreg2regmask
[
Op_RegI
]);
#ifdef _LP64
idealreg2spillmask
[
Op_RegN
]
->
OR
(
*
idealreg2regmask
[
Op_RegF
]);
idealreg2spillmask
[
Op_RegL
]
->
OR
(
*
idealreg2regmask
[
Op_RegD
]);
idealreg2spillmask
[
Op_RegD
]
->
OR
(
*
idealreg2regmask
[
Op_RegL
]);
idealreg2spillmask
[
Op_RegP
]
->
OR
(
*
idealreg2regmask
[
Op_RegD
]);
#else
idealreg2spillmask
[
Op_RegP
]
->
OR
(
*
idealreg2regmask
[
Op_RegF
]);
#endif
}
// Make up debug masks. Any spill slot plus callee-save registers.
// Make up debug masks. Any spill slot plus callee-save registers.
// Caller-save registers are assumed to be trashable by the various
// Caller-save registers are assumed to be trashable by the various
// inline-cache fixup routines.
// inline-cache fixup routines.
...
...
src/share/vm/opto/reg_split.cpp
浏览文件 @
5f85a401
...
@@ -975,6 +975,19 @@ uint PhaseChaitin::Split( uint maxlrg ) {
...
@@ -975,6 +975,19 @@ uint PhaseChaitin::Split( uint maxlrg ) {
insidx
++
;
// Reset iterator to skip USE side split
insidx
++
;
// Reset iterator to skip USE side split
continue
;
continue
;
}
}
if
(
UseFPUForSpilling
&&
n
->
is_Call
()
&&
!
uup
&&
!
dup
)
{
// The use at the call can force the def down so insert
// a split before the use to allow the def more freedom.
maxlrg
=
split_USE
(
def
,
b
,
n
,
inpidx
,
maxlrg
,
dup
,
false
,
splits
,
slidx
);
// If it wasn't split bail
if
(
!
maxlrg
)
{
return
0
;
}
insidx
++
;
// Reset iterator to skip USE side split
continue
;
}
// Here is the logic chart which describes USE Splitting:
// Here is the logic chart which describes USE Splitting:
// 0 = false or DOWN, 1 = true or UP
// 0 = false or DOWN, 1 = true or UP
//
//
...
...
src/share/vm/runtime/arguments.cpp
浏览文件 @
5f85a401
...
@@ -3003,10 +3003,6 @@ jint Arguments::parse(const JavaVMInitArgs* args) {
...
@@ -3003,10 +3003,6 @@ jint Arguments::parse(const JavaVMInitArgs* args) {
CommandLineFlags
::
printSetFlags
();
CommandLineFlags
::
printSetFlags
();
}
}
if
(
PrintFlagsFinal
)
{
CommandLineFlags
::
printFlags
();
}
// Apply CPU specific policy for the BiasedLocking
// Apply CPU specific policy for the BiasedLocking
if
(
UseBiasedLocking
)
{
if
(
UseBiasedLocking
)
{
if
(
!
VM_Version
::
use_biased_locking
()
&&
if
(
!
VM_Version
::
use_biased_locking
()
&&
...
...
src/share/vm/runtime/init.cpp
浏览文件 @
5f85a401
...
@@ -128,6 +128,12 @@ jint init_globals() {
...
@@ -128,6 +128,12 @@ jint init_globals() {
Universe
::
verify
();
// make sure we're starting with a clean slate
Universe
::
verify
();
// make sure we're starting with a clean slate
}
}
// All the flags that get adjusted by VM_Version_init and os::init_2
// have been set so dump the flags now.
if
(
PrintFlagsFinal
)
{
CommandLineFlags
::
printFlags
();
}
return
JNI_OK
;
return
JNI_OK
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录