1 Star 0 Fork 139

yangxin/gcc

forked from eastb233/src-openeuler_gcc 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
add-check-for-pressure-in-sche1.patch 1.46 KB
一键复制 编辑 原始数据 按行查看 历史
--- a/gcc/haifa-sched.c 2021-03-08 14:46:59.204000000 +0800
+++ b/gcc/haifa-sched.c 2021-03-09 13:32:40.656000000 +0800
@@ -2036,8 +2036,10 @@ model_start_update_pressure (struct mode
/* The instruction wasn't part of the model schedule; it was moved
from a different block. Update the pressure for the end of
the model schedule. */
- MODEL_REF_PRESSURE (group, point, pci) += delta;
- MODEL_MAX_PRESSURE (group, point, pci) += delta;
+ if (MODEL_REF_PRESSURE (group, point, pci) != -1 || delta > 0)
+ MODEL_REF_PRESSURE (group, point, pci) += delta;
+ if (MODEL_MAX_PRESSURE (group, point, pci) != -1 || delta > 0)
+ MODEL_MAX_PRESSURE (group, point, pci) += delta;
}
else
{
diff -uprN a/gcc/testsuite/gcc.dg/sche1-pressure-check.c b/gcc/testsuite/gcc.dg/sche1-pressure-check.c
--- a/gcc/testsuite/gcc.dg/sche1-pressure-check.c 1970-01-01 08:00:00.000000000 +0800
+++ b/gcc/testsuite/gcc.dg/sche1-pressure-check.c 2021-03-09 13:40:34.036000000 +0800
@@ -0,0 +1,33 @@
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+int a, g, h;
+char b, c;
+short d;
+static int e;
+int *volatile f;
+void i() {
+ int j = 0;
+ int *k = &a;
+ for (; c; c--) {
+ g && (d = 0);
+ j ^= 10;
+ {
+ int l[2];
+ l;
+ h = l[1];
+ }
+ e = 1;
+ for (; e <= 7; e++) {
+ *k = 6;
+ *f = b = 0;
+ for (; b <= 7; b++) {
+ int m = 5;
+ if (g)
+ *k &= m ^= j;
+ }
+ }
+ }
+}
+int main() {}
+
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/anar/gcc.git
git@gitee.com:anar/gcc.git
anar
gcc
gcc
master

搜索帮助