[midend]更新遍静态ID定义方法,
注册遍模板函数重构(针对遍的不同构造方法), 修复phi指令更新引起的旧代码错误, 将CFG优化适配到现有终端框架中, 独立CFG优化方法使得其他优化遍能独立调用, usedelete方法回调取消删除功能。 IRGenerator代码风格修改。
This commit is contained in:
@@ -129,14 +129,19 @@ int main(int argc, char **argv) {
|
||||
DEBUG = 1; // 这里可能需要更精细地控制 DEBUG 的开启时机和范围
|
||||
}
|
||||
|
||||
// 创建 Pass 管理器并运行优化管道
|
||||
PassManager passManager(moduleIR); // 创建 Pass 管理器
|
||||
passManager.runOptimizationPipeline(moduleIR, optLevel);
|
||||
|
||||
if (DEBUG) {
|
||||
cout << "=== Init IR ===\n";
|
||||
SysYPrinter(moduleIR).printIR(); // 临时打印器用于调试
|
||||
}
|
||||
|
||||
// 创建 Pass 管理器并运行优化管道
|
||||
PassManager passManager(moduleIR, builder); // 创建 Pass 管理器
|
||||
// 好像都不用传递module和builder了,因为 PassManager 初始化了
|
||||
passManager.runOptimizationPipeline(moduleIR, builder, optLevel);
|
||||
|
||||
|
||||
|
||||
|
||||
AddressCalculationExpansion ace(moduleIR, builder);
|
||||
if (ace.run()) {
|
||||
if (DEBUG) cout << "AddressCalculationExpansion made changes.\n";
|
||||
|
||||
Reference in New Issue
Block a user