1 Star 0 Fork 152

erik_yuan/gcc

forked from src-openEuler/gcc 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
PR92303-Try-to-simplify-memory-subreg.patch 1.08 KB
一键复制 编辑 原始数据 按行查看 历史
This backport contains 1 patch from gcc main stream tree.
The commit id of these patchs list as following in the order of time.
0001-PR92303-Try-to-simplify-memory-subreg.patch
a4504f32c056db781a2bdc104dffa1b29684c930
diff -uprN a/gcc/lra-spills.c b/gcc/lra-spills.c
--- a/gcc/lra-spills.c
+++ b/gcc/lra-spills.c
@@ -421,7 +421,16 @@ remove_pseudos (rtx *loc, rtx_insn *insn)
if (*loc == NULL_RTX)
return res;
code = GET_CODE (*loc);
- if (code == REG && (i = REGNO (*loc)) >= FIRST_PSEUDO_REGISTER
+ if (code == SUBREG && REG_P (SUBREG_REG (*loc)))
+ {
+ /* Try to remove memory subregs to simplify LRA job
+ and avoid LRA cycling in case of subreg memory reload. */
+ res = remove_pseudos (&SUBREG_REG (*loc), insn);
+ if (GET_CODE (SUBREG_REG (*loc)) == MEM)
+ alter_subreg (loc, false);
+ return res;
+ }
+ else if (code == REG && (i = REGNO (*loc)) >= FIRST_PSEUDO_REGISTER
&& lra_get_regno_hard_regno (i) < 0
/* We do not want to assign memory for former scratches because
it might result in an address reload for some targets. In
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/erik_yuan/gcc.git
git@gitee.com:erik_yuan/gcc.git
erik_yuan
gcc
gcc
master

搜索帮助