docs(doc): 文档添加mem2reg内容
This commit is contained in:
@@ -2,6 +2,7 @@ add_library(ir_passes STATIC
|
||||
PassManager.cpp
|
||||
Mem2Reg.cpp
|
||||
ConstFold.cpp
|
||||
CSE.cpp
|
||||
DCE.cpp
|
||||
CFGSimplify.cpp
|
||||
)
|
||||
|
||||
5
src/ir/passes/CSE.cpp
Normal file
5
src/ir/passes/CSE.cpp
Normal file
@@ -0,0 +1,5 @@
|
||||
// 公共子表达式消除(CSE):
|
||||
// - 识别并复用重复计算的等价表达式
|
||||
// - 典型放置在 ConstFold 之后、DCE 之前
|
||||
// - 当前为 Lab5 的框架占位,具体算法由实验实现
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
// IR Pass 管理:
|
||||
// - 按优化级别组织优化 pipeline
|
||||
// - 统一运行 pass、统计与调试输出(按需要扩展)
|
||||
|
||||
//
|
||||
// Lab5 推荐顺序(可迭代多轮):
|
||||
// 1. ConstFold
|
||||
// 2. CSE
|
||||
// 3. DCE
|
||||
// 4. CFGSimplify
|
||||
|
||||
Reference in New Issue
Block a user