Commit a85b2c88 authored by 陈清源's avatar 陈清源

update 4.2 README & loop3.cminus

parent b1dfdb1e
......@@ -279,6 +279,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 辅助类
......
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment