diff --git a/Documentations/4.2-gvn/README.md b/Documentations/4.2-gvn/README.md index e5435c915c237662d386f6920720a0104269dfe1..29ba08acd7d6da5369c5d2fa42bcb5f600cc118c 100644 --- a/Documentations/4.2-gvn/README.md +++ b/Documentations/4.2-gvn/README.md @@ -293,6 +293,12 @@ GVN 通过数据流分析来检测冗余的变量和计算,通过替换和死 我们会在测试样例中对这三点进行考察。 +**case 考察范围说明:**在 Lab4-2 的公开 case 与隐藏 case 中,以下情况不会出现: + +1. 不会对加法乘法运算的交换律,结合律造成的冗余进行考察。 +2. 不会对访存指令之间的等价性进行考察。 +3. 对于 value phi function 的冗余仅仅考察`phi(a+b, c+d)`与`phi(a,c)+phi(b,d)`之间的冗余。(其中 + 代表四则二元运算+ - * /,value phi function 上某一路径的常量传播可以不考虑,例如 case 不会涉及如下情况冗余`phi(0, c+d)`与 `phi(0,c)+phi(0,d)`) + **注**:我们为大家提供了冗余删除的函数 `GVN::replace_cc_members` ,只需要正确填充在 `GVN` 类中的 `pout` 变量,我们的替换逻辑将会根据每个 bb 的 pout 自行使用`CongruenceClass` 的 `leader_` 成员来替换在此 bb 内与其等价其他指令。 ### 3.2 GVN 辅助类 @@ -558,6 +564,12 @@ root@3fd22a9ed627:/labs/2022fall-compiler_cminus-taversion/tests/4-ir-opt# final_grade = grade * (0.9)^x, 0 < x <= 7 final_grade = 0, x > 7 # 这一条严格执行,请对自己负责 ``` + + ======= + + * `Deadline`: 2023/01/14 23:59:59 (北京标准时间,UTC+8) + + 本次实验不接受补交 * 关于抄袭和雷同 经过助教和老师判定属于实验抄袭或雷同情况,所有参与方一律零分,不接受任何解释和反驳(严禁对开源代码或者其他同学代码的直接搬运)。 diff --git a/README.md b/README.md index cd2bcdb1faf396fcee08f195b4c2f5c0ca6c96bc..08d4bc8c3e0857a768b17547bb5e1d8162f2a159 100644 --- a/README.md +++ b/README.md @@ -13,16 +13,19 @@ - [report](./Reports/2-ir-gen-warmup/report.md) * [lab3](./Documentations/3-ir-gen/) - + DDL:2022-11-13 23:59:59 (UTC+8) - - [report](./Reports/3-ir-gen/report.md) + + + DDL:2022-11-13 23:59:59 (UTC+8) + - [report](./Reports/3-ir-gen/report.md) * [lab4.1](./Documentations/4.1-ssa/) - + DDL:2022-11-27 23:59:59 (UTC+8) - - [report](./Reports/4.1-ssa/report.md) + + + DDL:2022-11-27 23:59:59 (UTC+8) + - [report](./Reports/4.1-ssa/report.md) * [lab4.2](./Documentations/4.2-gvn/) - + DDL: 2022-12-12 23:59:59 (UTC+8) - - [report](./Reports/4.2-gvn/report.md) + + + DDL: 2022-12-12 23:59:59 (UTC+8) + - [report](./Reports/4.2-gvn/report.md) ## FAQ: How to merge upstream remote branches diff --git a/tests/4-ir-opt/testcases/GVN/functional/loop3.cminus b/tests/4-ir-opt/testcases/GVN/functional/loop3.cminus index 2567a98116a43bc8c5905dd8bbe7e59a4fb1a0fb..55016637eed0543957cd2558df462edebf378f41 100644 --- a/tests/4-ir-opt/testcases/GVN/functional/loop3.cminus +++ b/tests/4-ir-opt/testcases/GVN/functional/loop3.cminus @@ -9,12 +9,12 @@ int main(void) { int e; int f; - a = 0; - b = 0; - c = 0; - d = 0; - e = 0; - f = 0; + a = 2; + b = 2; + c = 2; + d = 2; + e = 2; + f = 2; i = 1; while (i < 10) {