1 Star 0 Fork 139

luofeng14/gcc

forked from src-openEuler/gcc 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0028-Array-widen-compare-Fix-the-return-value-match-after.patch 1.23 KB
一键复制 编辑 原始数据 按行查看 历史
dingguangya 提交于 2023-09-11 11:38 . [Sync] Sync patch from openeuler/gcc
From a89b84cd038e02f0cdafecea1cf337d5f8480683 Mon Sep 17 00:00:00 2001
From: dingguangya <dingguangya1@huawei.com>
Date: Fri, 8 Sep 2023 11:55:04 +0800
Subject: [PATCH] [Array-widen-compare] Fix the return value match after update
the get_loop_exit_edges interface
The get_loop_exit_edges interface returns a value type
from vec<edge> -> auto_vec<edge>
diff --git a/gcc/tree-ssa-loop-array-widen-compare.cc b/gcc/tree-ssa-loop-array-widen-compare.cc
index ba6170fa0..d27f91f11 100644
--- a/gcc/tree-ssa-loop-array-widen-compare.cc
+++ b/gcc/tree-ssa-loop-array-widen-compare.cc
@@ -272,12 +272,12 @@ record_origin_loop_exit_info (class loop *loop)
|| origin_loop.cond_stmt1 != NULL || origin_loop.cond_stmt2 != NULL)
return false;
- vec<edge> exit_edges = get_loop_exit_edges (loop);
+ auto_vec<edge> exit_edges = get_loop_exit_edges (loop);
if (exit_edges == vNULL)
return false;
if (exit_edges.length () != 2)
- goto fail;
+ return false;
FOR_EACH_VEC_ELT (exit_edges, i, e)
{
@@ -304,8 +304,6 @@ record_origin_loop_exit_info (class loop *loop)
&& origin_loop.cond_stmt1 != NULL && origin_loop.cond_stmt2 != NULL)
found = true;
-fail:
- exit_edges.release ();
return found;
}
--
2.33.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/luofeng14/gcc.git
git@gitee.com:luofeng14/gcc.git
luofeng14
gcc
gcc
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385