| 847 | } |
| 848 | |
| 849 | bool RDAnalyzer::terminates(RDNode &Node) const { |
| 850 | if (Node.isRootDefinition()) |
| 851 | return true; |
| 852 | |
| 853 | auto &Location = Node.getLocation(); |
| 854 | auto *CB = dyn_cast_or_null<CallBase>(&Location); |
| 855 | if (!CB) |
| 856 | return false; |
| 857 | |
| 858 | auto Idx = Node.getIdx(); |
| 859 | if (Idx < 0) |
| 860 | return false; |
| 861 | assert((size_t)Idx < CB->getNumArgOperands() && "Unexpected Program State"); |
| 862 | |
| 863 | return Extension.isTermination(*CB, Idx); |
| 864 | } |
| 865 | |
| 866 | bool RDAnalyzer::isMemoryIntrinsic(llvm::CallBase &CB) const { |
| 867 |
nothing calls this directly
no test coverage detected