| 199 | } |
| 200 | |
| 201 | std::set<RDNode> RDAnalyzer::getPrevsMemoryBase(RDNode &Node) { |
| 202 | auto &Target = Node.getTarget().getIR(); |
| 203 | std::set<RDNode> Result; |
| 204 | for (auto *I : Space.next(Node.getLocation())) { |
| 205 | if (isa<AllocaInst>(&Target)) { |
| 206 | // Memory SSA does not care alloca instruction. |
| 207 | // Thus get prevs should stopped if found memory related instruction |
| 208 | // does not dominates alloca instruction. |
| 209 | auto &AI = *dyn_cast<AllocaInst>(&Target); |
| 210 | if (!Space.dominates(AI, *I)) |
| 211 | continue; |
| 212 | } |
| 213 | |
| 214 | RDNode NewNode(Node); |
| 215 | NewNode.setLocation(*I); |
| 216 | Result.insert(NewNode); |
| 217 | } |
| 218 | return Result; |
| 219 | } |
| 220 | |
| 221 | std::set<RDNode> RDAnalyzer::getPrevsRegBase(RDNode &Node) { |
| 222 | auto &Target = Node.getTarget().getIR(); |
nothing calls this directly
no test coverage detected