Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
c1d73f96
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看板
提交
c1d73f96
编写于
8月 14, 2009
作者:
N
never
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
654e029b
e0205e1d
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
27 addition
and
10 deletion
+27
-10
src/share/vm/opto/chaitin.hpp
src/share/vm/opto/chaitin.hpp
+10
-0
src/share/vm/opto/postaloc.cpp
src/share/vm/opto/postaloc.cpp
+17
-10
未找到文件。
src/share/vm/opto/chaitin.hpp
浏览文件 @
c1d73f96
...
@@ -458,6 +458,16 @@ private:
...
@@ -458,6 +458,16 @@ private:
// Post-Allocation peephole copy removal
// Post-Allocation peephole copy removal
void
post_allocate_copy_removal
();
void
post_allocate_copy_removal
();
Node
*
skip_copies
(
Node
*
c
);
Node
*
skip_copies
(
Node
*
c
);
// Replace the old node with the current live version of that value
// and yank the old value if it's dead.
int
replace_and_yank_if_dead
(
Node
*
old
,
OptoReg
::
Name
nreg
,
Block
*
current_block
,
Node_List
&
value
,
Node_List
&
regnd
)
{
Node
*
v
=
regnd
[
nreg
];
assert
(
v
->
outcnt
()
!=
0
,
"no dead values"
);
old
->
replace_by
(
v
);
return
yank_if_dead
(
old
,
current_block
,
&
value
,
&
regnd
);
}
int
yank_if_dead
(
Node
*
old
,
Block
*
current_block
,
Node_List
*
value
,
Node_List
*
regnd
);
int
yank_if_dead
(
Node
*
old
,
Block
*
current_block
,
Node_List
*
value
,
Node_List
*
regnd
);
int
elide_copy
(
Node
*
n
,
int
k
,
Block
*
current_block
,
Node_List
&
value
,
Node_List
&
regnd
,
bool
can_change_regs
);
int
elide_copy
(
Node
*
n
,
int
k
,
Block
*
current_block
,
Node_List
&
value
,
Node_List
&
regnd
,
bool
can_change_regs
);
int
use_prior_register
(
Node
*
copy
,
uint
idx
,
Node
*
def
,
Block
*
current_block
,
Node_List
&
value
,
Node_List
&
regnd
);
int
use_prior_register
(
Node
*
copy
,
uint
idx
,
Node
*
def
,
Block
*
current_block
,
Node_List
&
value
,
Node_List
&
regnd
);
...
...
src/share/vm/opto/postaloc.cpp
浏览文件 @
c1d73f96
...
@@ -88,6 +88,7 @@ int PhaseChaitin::yank_if_dead( Node *old, Block *current_block, Node_List *valu
...
@@ -88,6 +88,7 @@ int PhaseChaitin::yank_if_dead( Node *old, Block *current_block, Node_List *valu
value
->
map
(
old_reg
,
NULL
);
// Yank from value/regnd maps
value
->
map
(
old_reg
,
NULL
);
// Yank from value/regnd maps
regnd
->
map
(
old_reg
,
NULL
);
// This register's value is now unknown
regnd
->
map
(
old_reg
,
NULL
);
// This register's value is now unknown
}
}
assert
(
old
->
req
()
<=
2
,
"can't handle more inputs"
);
Node
*
tmp
=
old
->
req
()
>
1
?
old
->
in
(
1
)
:
NULL
;
Node
*
tmp
=
old
->
req
()
>
1
?
old
->
in
(
1
)
:
NULL
;
old
->
disconnect_inputs
(
NULL
);
old
->
disconnect_inputs
(
NULL
);
if
(
!
tmp
)
break
;
if
(
!
tmp
)
break
;
...
@@ -530,6 +531,16 @@ void PhaseChaitin::post_allocate_copy_removal() {
...
@@ -530,6 +531,16 @@ void PhaseChaitin::post_allocate_copy_removal() {
// Do not change from int to pointer
// Do not change from int to pointer
Node
*
val
=
skip_copies
(
n
);
Node
*
val
=
skip_copies
(
n
);
// Clear out a dead definition before starting so that the
// elimination code doesn't have to guard against it. The
// definition could in fact be a kill projection with a count of
// 0 which is safe but since those are uninteresting for copy
// elimination just delete them as well.
if
(
regnd
[
nreg
]
!=
NULL
&&
regnd
[
nreg
]
->
outcnt
()
==
0
)
{
regnd
.
map
(
nreg
,
NULL
);
value
.
map
(
nreg
,
NULL
);
}
uint
n_ideal_reg
=
n
->
ideal_reg
();
uint
n_ideal_reg
=
n
->
ideal_reg
();
if
(
is_single_register
(
n_ideal_reg
)
)
{
if
(
is_single_register
(
n_ideal_reg
)
)
{
// If Node 'n' does not change the value mapped by the register,
// If Node 'n' does not change the value mapped by the register,
...
@@ -537,8 +548,7 @@ void PhaseChaitin::post_allocate_copy_removal() {
...
@@ -537,8 +548,7 @@ void PhaseChaitin::post_allocate_copy_removal() {
// mapping so 'n' will go dead.
// mapping so 'n' will go dead.
if
(
value
[
nreg
]
!=
val
)
{
if
(
value
[
nreg
]
!=
val
)
{
if
(
eliminate_copy_of_constant
(
val
,
n
,
b
,
value
,
regnd
,
nreg
,
OptoReg
::
Bad
))
{
if
(
eliminate_copy_of_constant
(
val
,
n
,
b
,
value
,
regnd
,
nreg
,
OptoReg
::
Bad
))
{
n
->
replace_by
(
regnd
[
nreg
]);
j
-=
replace_and_yank_if_dead
(
n
,
nreg
,
b
,
value
,
regnd
);
j
-=
yank_if_dead
(
n
,
b
,
&
value
,
&
regnd
);
}
else
{
}
else
{
// Update the mapping: record new Node defined by the register
// Update the mapping: record new Node defined by the register
regnd
.
map
(
nreg
,
n
);
regnd
.
map
(
nreg
,
n
);
...
@@ -546,10 +556,9 @@ void PhaseChaitin::post_allocate_copy_removal() {
...
@@ -546,10 +556,9 @@ void PhaseChaitin::post_allocate_copy_removal() {
// Node after skipping all copies.
// Node after skipping all copies.
value
.
map
(
nreg
,
val
);
value
.
map
(
nreg
,
val
);
}
}
}
else
if
(
!
may_be_copy_of_callee
(
n
)
&&
regnd
[
nreg
]
->
outcnt
()
!=
0
)
{
}
else
if
(
!
may_be_copy_of_callee
(
n
)
)
{
assert
(
n
->
is_Copy
(),
""
);
assert
(
n
->
is_Copy
(),
""
);
n
->
replace_by
(
regnd
[
nreg
]);
j
-=
replace_and_yank_if_dead
(
n
,
nreg
,
b
,
value
,
regnd
);
j
-=
yank_if_dead
(
n
,
b
,
&
value
,
&
regnd
);
}
}
}
else
{
}
else
{
// If the value occupies a register pair, record same info
// If the value occupies a register pair, record same info
...
@@ -565,18 +574,16 @@ void PhaseChaitin::post_allocate_copy_removal() {
...
@@ -565,18 +574,16 @@ void PhaseChaitin::post_allocate_copy_removal() {
}
}
if
(
value
[
nreg
]
!=
val
||
value
[
nreg_lo
]
!=
val
)
{
if
(
value
[
nreg
]
!=
val
||
value
[
nreg_lo
]
!=
val
)
{
if
(
eliminate_copy_of_constant
(
val
,
n
,
b
,
value
,
regnd
,
nreg
,
nreg_lo
))
{
if
(
eliminate_copy_of_constant
(
val
,
n
,
b
,
value
,
regnd
,
nreg
,
nreg_lo
))
{
n
->
replace_by
(
regnd
[
nreg
]);
j
-=
replace_and_yank_if_dead
(
n
,
nreg
,
b
,
value
,
regnd
);
j
-=
yank_if_dead
(
n
,
b
,
&
value
,
&
regnd
);
}
else
{
}
else
{
regnd
.
map
(
nreg
,
n
);
regnd
.
map
(
nreg
,
n
);
regnd
.
map
(
nreg_lo
,
n
);
regnd
.
map
(
nreg_lo
,
n
);
value
.
map
(
nreg
,
val
);
value
.
map
(
nreg
,
val
);
value
.
map
(
nreg_lo
,
val
);
value
.
map
(
nreg_lo
,
val
);
}
}
}
else
if
(
!
may_be_copy_of_callee
(
n
)
&&
regnd
[
nreg
]
->
outcnt
()
!=
0
)
{
}
else
if
(
!
may_be_copy_of_callee
(
n
)
)
{
assert
(
n
->
is_Copy
(),
""
);
assert
(
n
->
is_Copy
(),
""
);
n
->
replace_by
(
regnd
[
nreg
]);
j
-=
replace_and_yank_if_dead
(
n
,
nreg
,
b
,
value
,
regnd
);
j
-=
yank_if_dead
(
n
,
b
,
&
value
,
&
regnd
);
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录