| 886 | } |
| 887 | |
| 888 | void Pass::ControlFlow::Update(const BasicBlock& block) { |
| 889 | if (in_loop) { |
| 890 | if (block.GetLabelId() == merge_target_id) { |
| 891 | in_loop = false; |
| 892 | merge_target_id = 0; |
| 893 | } |
| 894 | } else if (block.IsLoopHeader()) { |
| 895 | in_loop = true; |
| 896 | merge_target_id = block.loop_header_merge_target_; |
| 897 | } |
| 898 | } |
| 899 | |
| 900 | // Helper for passes with multiple linked functions they may grab |
| 901 | // Pass in cached link_function_id and only update it the first time |
no test coverage detected