| 840 | } |
| 841 | |
| 842 | LoopDescriptor* IRContext::GetLoopDescriptor(const Function* f) { |
| 843 | if (!AreAnalysesValid(kAnalysisLoopAnalysis)) { |
| 844 | ResetLoopAnalysis(); |
| 845 | } |
| 846 | |
| 847 | std::unordered_map<const Function*, LoopDescriptor>::iterator it = |
| 848 | loop_descriptors_.find(f); |
| 849 | if (it == loop_descriptors_.end()) { |
| 850 | return &loop_descriptors_ |
| 851 | .emplace(std::make_pair(f, LoopDescriptor(this, f))) |
| 852 | .first->second; |
| 853 | } |
| 854 | |
| 855 | return &it->second; |
| 856 | } |
| 857 | |
| 858 | uint32_t IRContext::FindBuiltinInputVar(uint32_t builtin) { |
| 859 | for (auto& a : module_->annotations()) { |
no test coverage detected