| 836 | } |
| 837 | |
| 838 | void InlinePass::InitializeInline() { |
| 839 | false_id_ = 0; |
| 840 | |
| 841 | // clear collections |
| 842 | id2function_.clear(); |
| 843 | id2block_.clear(); |
| 844 | inlinable_.clear(); |
| 845 | no_return_in_loop_.clear(); |
| 846 | early_return_funcs_.clear(); |
| 847 | funcs_called_from_continue_ = |
| 848 | context()->GetStructuredCFGAnalysis()->FindFuncsCalledFromContinue(); |
| 849 | |
| 850 | for (auto& fn : *get_module()) { |
| 851 | // Initialize function and block maps. |
| 852 | id2function_[fn.result_id()] = &fn; |
| 853 | for (auto& blk : fn) { |
| 854 | id2block_[blk.id()] = &blk; |
| 855 | } |
| 856 | // Compute inlinability |
| 857 | if (IsInlinableFunction(&fn)) inlinable_.insert(fn.result_id()); |
| 858 | } |
| 859 | } |
| 860 | |
| 861 | InlinePass::InlinePass() {} |
| 862 |
nothing calls this directly
no test coverage detected