| 55 | } |
| 56 | |
| 57 | void ArrayAnalyzer::analyzeArray(llvm::Argument &A) { |
| 58 | std::set<Value *> VisitedNodes; |
| 59 | |
| 60 | ArgFlow &AF = getOrCreateArgFlow(A); |
| 61 | |
| 62 | // DefUseChanins used as stack, |
| 63 | // StackFrame includes the value(Argument/Field) need to tracking, |
| 64 | // and ArgFlow for which analysis result will be updated. |
| 65 | std::stack<StackFrame> DefUseChains; |
| 66 | DefUseChains.emplace(&A, AF); |
| 67 | |
| 68 | while (!DefUseChains.empty()) { |
| 69 | auto Frame = DefUseChains.top(); |
| 70 | DefUseChains.pop(); |
| 71 | handleStackFrame(Frame, DefUseChains, VisitedNodes); |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | void ArrayAnalyzer::analyzeArrayLen(Instruction &I, ArgFlow &AF) { |
| 76 | auto &LA = FAM.getResult<LoopAnalysis>(*AF.getLLVMArg().getParent()); |