| 31 | |
| 32 | template <class Handler> |
| 33 | bool descendInstructionUseTree(llvm::Instruction *I, Handler &&H, |
| 34 | llvm::Instruction *Parent = nullptr) { |
| 35 | if(H(I, Parent)) { |
| 36 | for(auto* U : I->users()) { |
| 37 | if(auto* UI = llvm::dyn_cast<llvm::Instruction>(U)) { |
| 38 | if(!descendInstructionUseTree(UI, H, I)) |
| 39 | return false; |
| 40 | } else { |
| 41 | return false; |
| 42 | } |
| 43 | } |
| 44 | return true; |
| 45 | } else { |
| 46 | return false; |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | using InstToInstListMapT = |
| 51 | llvm::SmallDenseMap<llvm::Instruction *, llvm::SmallVector<llvm::Instruction *, 16>>; |
no outgoing calls
no test coverage detected