Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell11
提交
bb01a80b
D
dragonwell11
项目概览
openanolis
/
dragonwell11
通知
7
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell11
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
bb01a80b
编写于
2月 25, 2014
作者:
A
adlertz
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8032894: Remove dead code in Pressure::lower
Summary: Remove dead code in Pressure::lower Reviewed-by: kvn, roland
上级
7cc4fbc3
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
58 addition
and
30 deletion
+58
-30
hotspot/src/share/vm/opto/chaitin.hpp
hotspot/src/share/vm/opto/chaitin.hpp
+42
-4
hotspot/src/share/vm/opto/ifg.cpp
hotspot/src/share/vm/opto/ifg.cpp
+16
-26
未找到文件。
hotspot/src/share/vm/opto/chaitin.hpp
浏览文件 @
bb01a80b
...
...
@@ -501,8 +501,9 @@ private:
// Used for aggressive coalescing.
void
build_ifg_virtual
(
);
// used when computing the register pressure for each block in the CFG. This
// is done during IFG creation.
class
Pressure
{
public:
// keeps track of the register pressure at the current
// instruction (used when stepping backwards in the block)
uint
_current_pressure
;
...
...
@@ -518,6 +519,7 @@ private:
// number of live ranges that constitute high register pressure
const
uint
_high_pressure_limit
;
public:
// lower the register pressure and look for a low to high pressure
// transition
...
...
@@ -525,9 +527,6 @@ private:
_current_pressure
-=
lrg
.
reg_pressure
();
if
(
_current_pressure
==
_high_pressure_limit
)
{
_high_pressure_index
=
location
;
if
(
_current_pressure
>
_final_pressure
)
{
_final_pressure
=
_current_pressure
+
1
;
}
}
}
...
...
@@ -540,6 +539,45 @@ private:
}
}
uint
high_pressure_index
()
const
{
return
_high_pressure_index
;
}
uint
final_pressure
()
const
{
return
_final_pressure
;
}
uint
current_pressure
()
const
{
return
_current_pressure
;
}
uint
high_pressure_limit
()
const
{
return
_high_pressure_limit
;
}
void
lower_high_pressure_index
()
{
_high_pressure_index
--
;
}
void
set_high_pressure_index_to_block_start
()
{
_high_pressure_index
=
0
;
}
void
check_pressure_at_fatproj
(
uint
fatproj_location
,
RegMask
&
fatproj_mask
)
{
// this pressure is only valid at this instruction, i.e. we don't need to lower
// the register pressure since the fat proj was never live before (going backwards)
uint
new_pressure
=
current_pressure
()
+
fatproj_mask
.
Size
();
if
(
new_pressure
>
final_pressure
())
{
_final_pressure
=
new_pressure
;
}
// if we were at a low pressure and now and the fat proj is at high pressure, record the fat proj location
// as coming from a low to high (to low again)
if
(
current_pressure
()
<=
high_pressure_limit
()
&&
new_pressure
>
high_pressure_limit
())
{
_high_pressure_index
=
fatproj_location
;
}
}
Pressure
(
uint
high_pressure_index
,
uint
high_pressure_limit
)
:
_current_pressure
(
0
)
,
_high_pressure_index
(
high_pressure_index
)
...
...
hotspot/src/share/vm/opto/ifg.cpp
浏览文件 @
bb01a80b
...
...
@@ -439,8 +439,8 @@ void PhaseChaitin::lower_pressure(Block* b, uint location, LRG& lrg, IndexSet* l
}
}
}
assert
(
int_pressure
.
_current_pressure
==
count_int_pressure
(
liveout
),
"the int pressure is incorrect"
);
assert
(
float_pressure
.
_current_pressure
==
count_float_pressure
(
liveout
),
"the float pressure is incorrect"
);
assert
(
int_pressure
.
current_pressure
()
==
count_int_pressure
(
liveout
),
"the int pressure is incorrect"
);
assert
(
float_pressure
.
current_pressure
()
==
count_float_pressure
(
liveout
),
"the float pressure is incorrect"
);
}
/* Go to the first non-phi index in a block */
...
...
@@ -513,8 +513,8 @@ void PhaseChaitin::compute_initial_block_pressure(Block* b, IndexSet* liveout, P
raise_pressure
(
b
,
lrg
,
int_pressure
,
float_pressure
);
lid
=
elements
.
next
();
}
assert
(
int_pressure
.
_current_pressure
==
count_int_pressure
(
liveout
),
"the int pressure is incorrect"
);
assert
(
float_pressure
.
_current_pressure
==
count_float_pressure
(
liveout
),
"the float pressure is incorrect"
);
assert
(
int_pressure
.
current_pressure
()
==
count_int_pressure
(
liveout
),
"the int pressure is incorrect"
);
assert
(
float_pressure
.
current_pressure
()
==
count_float_pressure
(
liveout
),
"the float pressure is incorrect"
);
}
/*
...
...
@@ -548,17 +548,7 @@ bool PhaseChaitin::remove_node_if_not_used(Block* b, uint location, Node* n, uin
void
PhaseChaitin
::
check_for_high_pressure_transition_at_fatproj
(
uint
&
block_reg_pressure
,
uint
location
,
LRG
&
lrg
,
Pressure
&
pressure
,
const
int
op_regtype
)
{
RegMask
mask_tmp
=
lrg
.
mask
();
mask_tmp
.
AND
(
*
Matcher
::
idealreg2regmask
[
op_regtype
]);
// this pressure is only valid at this instruction, i.e. we don't need to lower
// the register pressure since the fat proj was never live before (going backwards)
uint
new_pressure
=
pressure
.
_current_pressure
+
mask_tmp
.
Size
();
if
(
new_pressure
>
pressure
.
_final_pressure
)
{
pressure
.
_final_pressure
=
new_pressure
;
}
// if we were at a low pressure and now at the fat proj is at high pressure, record the fat proj location
// as coming from a low to high (to low again)
if
(
pressure
.
_current_pressure
<=
pressure
.
_high_pressure_limit
&&
new_pressure
>
pressure
.
_high_pressure_limit
)
{
pressure
.
_high_pressure_index
=
location
;
}
pressure
.
check_pressure_at_fatproj
(
location
,
mask_tmp
);
}
/*
...
...
@@ -700,8 +690,8 @@ void PhaseChaitin::add_input_to_liveout(Block* b, Node* n, IndexSet* liveout, do
// Newly live things assumed live from here to top of block
lrg
.
_area
+=
cost
;
raise_pressure
(
b
,
lrg
,
int_pressure
,
float_pressure
);
assert
(
int_pressure
.
_current_pressure
==
count_int_pressure
(
liveout
),
"the int pressure is incorrect"
);
assert
(
float_pressure
.
_current_pressure
==
count_float_pressure
(
liveout
),
"the float pressure is incorrect"
);
assert
(
int_pressure
.
current_pressure
()
==
count_int_pressure
(
liveout
),
"the int pressure is incorrect"
);
assert
(
float_pressure
.
current_pressure
()
==
count_float_pressure
(
liveout
),
"the float pressure is incorrect"
);
}
assert
(
!
(
lrg
.
_area
<
0.0
),
"negative spill area"
);
}
...
...
@@ -710,13 +700,13 @@ void PhaseChaitin::add_input_to_liveout(Block* b, Node* n, IndexSet* liveout, do
/*
* If we run off the top of the block with high pressure just record that the
* whole block is high pressure. (Even though we might have a transition
* l
ow
er down in the block)
* l
at
er down in the block)
*/
void
PhaseChaitin
::
check_for_high_pressure_block
(
Pressure
&
pressure
)
{
// current pressure now means the pressure before the first instruction in the block
// (since we have stepped through all instructions backwards)
if
(
pressure
.
_current_pressure
>
pressure
.
_high_pressure_limit
)
{
pressure
.
_high_pressure_index
=
0
;
if
(
pressure
.
current_pressure
()
>
pressure
.
high_pressure_limit
()
)
{
pressure
.
set_high_pressure_index_to_block_start
()
;
}
}
...
...
@@ -725,7 +715,7 @@ void PhaseChaitin::check_for_high_pressure_block(Pressure& pressure) {
* and set the high pressure index for the block
*/
void
PhaseChaitin
::
adjust_high_pressure_index
(
Block
*
b
,
uint
&
block_hrp_index
,
Pressure
&
pressure
)
{
uint
i
=
pressure
.
_high_pressure_index
;
uint
i
=
pressure
.
high_pressure_index
()
;
if
(
i
<
b
->
number_of_nodes
()
&&
i
<
b
->
end_idx
()
+
1
)
{
Node
*
cur
=
b
->
get_node
(
i
);
while
(
cur
->
is_Proj
()
||
(
cur
->
is_MachNullCheck
())
||
cur
->
is_Catch
())
{
...
...
@@ -789,8 +779,8 @@ uint PhaseChaitin::build_ifg_physical( ResourceArea *a ) {
if
(
!
liveout
.
member
(
lid
)
&&
n
->
Opcode
()
!=
Op_SafePoint
)
{
if
(
remove_node_if_not_used
(
block
,
location
,
n
,
lid
,
&
liveout
))
{
float_pressure
.
_high_pressure_index
--
;
int_pressure
.
_high_pressure_index
--
;
float_pressure
.
lower_high_pressure_index
()
;
int_pressure
.
lower_high_pressure_index
()
;
continue
;
}
if
(
lrg
.
_fat_proj
)
{
...
...
@@ -837,13 +827,13 @@ uint PhaseChaitin::build_ifg_physical( ResourceArea *a ) {
adjust_high_pressure_index
(
block
,
block
->
_ihrp_index
,
int_pressure
);
adjust_high_pressure_index
(
block
,
block
->
_fhrp_index
,
float_pressure
);
// set the final_pressure as the register pressure for the block
block
->
_reg_pressure
=
int_pressure
.
_final_pressure
;
block
->
_freg_pressure
=
float_pressure
.
_final_pressure
;
block
->
_reg_pressure
=
int_pressure
.
final_pressure
()
;
block
->
_freg_pressure
=
float_pressure
.
final_pressure
()
;
#ifndef PRODUCT
// Gather Register Pressure Statistics
if
(
PrintOptoStatistics
)
{
if
(
block
->
_reg_pressure
>
int_pressure
.
_high_pressure_limit
||
block
->
_freg_pressure
>
float_pressure
.
_high_pressure_limit
)
{
if
(
block
->
_reg_pressure
>
int_pressure
.
high_pressure_limit
()
||
block
->
_freg_pressure
>
float_pressure
.
high_pressure_limit
()
)
{
_high_pressure
++
;
}
else
{
_low_pressure
++
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录