Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
4f49057a
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看板
提交
4f49057a
编写于
8月 18, 2016
作者:
K
kvn
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8162496: missing precedence edge for anti_dependence
Summary: fix Implicit Null Check optimization code. Reviewed-by: roland, aph
上级
f38b0dfb
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
32 addition
and
7 deletion
+32
-7
src/share/vm/opto/block.cpp
src/share/vm/opto/block.cpp
+3
-0
src/share/vm/opto/block.hpp
src/share/vm/opto/block.hpp
+3
-4
src/share/vm/opto/lcm.cpp
src/share/vm/opto/lcm.cpp
+26
-3
未找到文件。
src/share/vm/opto/block.cpp
浏览文件 @
4f49057a
...
...
@@ -1208,6 +1208,9 @@ void PhaseCFG::verify() const {
if
(
j
>=
1
&&
n
->
is_Mach
()
&&
n
->
as_Mach
()
->
ideal_Opcode
()
==
Op_CreateEx
)
{
assert
(
j
==
1
||
block
->
get_node
(
j
-
1
)
->
is_Phi
(),
"CreateEx must be first instruction in block"
);
}
if
(
n
->
needs_anti_dependence_check
())
{
verify_anti_dependences
(
block
,
n
);
}
for
(
uint
k
=
0
;
k
<
n
->
req
();
k
++
)
{
Node
*
def
=
n
->
in
(
k
);
if
(
def
&&
def
!=
n
)
{
...
...
src/share/vm/opto/block.hpp
浏览文件 @
4f49057a
...
...
@@ -185,14 +185,13 @@ public:
Block
*
lone_fall_through
();
// Return lone fall-through Block or null
Block
*
dom_lca
(
Block
*
that
);
// Compute LCA in dominator tree.
#ifdef ASSERT
bool
dominates
(
Block
*
that
)
{
int
dom_diff
=
this
->
_dom_depth
-
that
->
_dom_depth
;
if
(
dom_diff
>
0
)
return
false
;
for
(;
dom_diff
<
0
;
dom_diff
++
)
that
=
that
->
_idom
;
return
this
==
that
;
}
#endif
// Report the alignment required by this block. Must be a power of 2.
// The previous block will insert nops to get this alignment.
...
...
@@ -473,9 +472,9 @@ class PhaseCFG : public Phase {
MachNode
*
_goto
;
Block
*
insert_anti_dependences
(
Block
*
LCA
,
Node
*
load
,
bool
verify
=
false
);
void
verify_anti_dependences
(
Block
*
LCA
,
Node
*
load
)
{
void
verify_anti_dependences
(
Block
*
LCA
,
Node
*
load
)
const
{
assert
(
LCA
==
get_block_for_node
(
load
),
"should already be scheduled"
);
insert_anti_dependences
(
LCA
,
load
,
true
);
const_cast
<
PhaseCFG
*>
(
this
)
->
insert_anti_dependences
(
LCA
,
load
,
true
);
}
bool
move_to_next
(
Block
*
bx
,
uint
b_index
);
...
...
src/share/vm/opto/lcm.cpp
浏览文件 @
4f49057a
...
...
@@ -246,6 +246,14 @@ void PhaseCFG::implicit_null_check(Block* block, Node *proj, Node *val, int allo
continue
;
}
// Check that node's control edge is not-null block's head or dominates it,
// otherwise we can't hoist it because there are other control dependencies.
Node
*
ctrl
=
mach
->
in
(
0
);
if
(
ctrl
!=
NULL
&&
!
(
ctrl
==
not_null_block
->
head
()
||
get_block_for_node
(
ctrl
)
->
dominates
(
not_null_block
)))
{
continue
;
}
// check if the offset is not too high for implicit exception
{
intptr_t
offset
=
0
;
...
...
@@ -383,9 +391,12 @@ void PhaseCFG::implicit_null_check(Block* block, Node *proj, Node *val, int allo
block
->
add_inst
(
best
);
map_node_to_block
(
best
,
block
);
// Move the control dependence
if
(
best
->
in
(
0
)
&&
best
->
in
(
0
)
==
old_block
->
head
())
best
->
set_req
(
0
,
block
->
head
());
// Move the control dependence if it is pinned to not-null block.
// Don't change it in other cases: NULL or dominating control.
if
(
best
->
in
(
0
)
==
not_null_block
->
head
())
{
// Set it to control edge of null check.
best
->
set_req
(
0
,
proj
->
in
(
0
)
->
in
(
0
));
}
// Check for flag-killing projections that also need to be hoisted
// Should be DU safe because no edge updates.
...
...
@@ -441,6 +452,18 @@ void PhaseCFG::implicit_null_check(Block* block, Node *proj, Node *val, int allo
latency_from_uses
(
nul_chk
);
latency_from_uses
(
best
);
// insert anti-dependences to defs in this block
if
(
!
best
->
needs_anti_dependence_check
())
{
for
(
uint
k
=
1
;
k
<
block
->
number_of_nodes
();
k
++
)
{
Node
*
n
=
block
->
get_node
(
k
);
if
(
n
->
needs_anti_dependence_check
()
&&
n
->
in
(
LoadNode
::
Memory
)
==
best
->
in
(
StoreNode
::
Memory
))
{
// Found anti-dependent load
insert_anti_dependences
(
block
,
n
);
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录