diff --git a/src/passes/LICM.cpp b/src/passes/LICM.cpp index 345aa03d4726844e04621adb99e95935ecb6cb68..1a8f9c99fd352a3c8deef4e053e265a68110200f 100644 --- a/src/passes/LICM.cpp +++ b/src/passes/LICM.cpp @@ -43,10 +43,12 @@ void LoopInvariantCodeMotion::traverse_loop(std::shared_ptr loop) { } run_on_loop(loop); } - // 1. 遍历当前循环及其子循环的所有指令 - // 2. 收集所有指令到loop_instructions中 - // 3. 检查store指令是否修改了全局变量,如果是则添加到updated_global中 - // 4. 检查是否包含非纯函数调用,如果有则设置contains_impure_call为true + +// TODO: 实现collect_loop_info函数 +// 1. 遍历当前循环及其子循环的所有指令 +// 2. 收集所有指令到loop_instructions中 +// 3. 检查store指令是否修改了全局变量,如果是则添加到updated_global中 +// 4. 检查是否包含非纯函数调用,如果有则设置contains_impure_call为true void LoopInvariantCodeMotion::collect_loop_info( std::shared_ptr loop, std::set &loop_instructions,