1 Star 0 Fork 82

李振华/openjdk-1.8.0

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
8146792.patch 1.83 KB
一键复制 编辑 原始数据 按行查看 历史
jdkboy 提交于 2020-03-21 11:30 . delete redundant info
From 81b3011925783d6eb1effec9b858e1d0e162d378 Mon Sep 17 00:00:00 2001
Date: Tue, 20 Aug 2019 21:09:30 +0000
Subject: [PATCH] Backport of JDK-8146792
summary: Predicate moved after partial peel may lead to broken
LLT:
Bug url: https://bugs.openjdk.java.net/browse/JDK-8146792
---
hotspot/src/share/vm/opto/loopPredicate.cpp | 26 +++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
diff --git a/hotspot/src/share/vm/opto/loopPredicate.cpp b/hotspot/src/share/vm/opto/loopPredicate.cpp
index db3447dc6e..f216fd9d1e 100644
--- a/hotspot/src/share/vm/opto/loopPredicate.cpp
+++ b/hotspot/src/share/vm/opto/loopPredicate.cpp
@@ -505,7 +505,31 @@ class Invariance : public StackObj {
_lpt(lpt), _phase(lpt->_phase),
_visited(area), _invariant(area), _stack(area, 10 /* guess */),
_clone_visited(area), _old_new(area)
- {}
+ {
+ Node* head = _lpt->_head;
+ Node* entry = head->in(LoopNode::EntryControl);
+ if (entry->outcnt() != 1) {
+ // If a node is pinned between the predicates and the loop
+ // entry, we won't be able to move any node in the loop that
+ // depends on it above it in a predicate. Mark all those nodes
+ // as non loop invariatnt.
+ Unique_Node_List wq;
+ wq.push(entry);
+ for (uint next = 0; next < wq.size(); ++next) {
+ Node *n = wq.at(next);
+ for (DUIterator_Fast imax, i = n->fast_outs(imax); i < imax; i++) {
+ Node* u = n->fast_out(i);
+ if (!u->is_CFG()) {
+ Node* c = _phase->get_ctrl(u);
+ if (_lpt->is_member(_phase->get_loop(c)) || _phase->is_dominator(c, head)) {
+ _visited.set(u->_idx);
+ wq.push(u);
+ }
+ }
+ }
+ }
+ }
+ }
// Map old to n for invariance computation and clone
void map_ctrl(Node* old, Node* n) {
--
2.12.3
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/li_zhen_hua/openjdk-1.8.0.git
git@gitee.com:li_zhen_hua/openjdk-1.8.0.git
li_zhen_hua
openjdk-1.8.0
openjdk-1.8.0
master

搜索帮助