| 24 | } |
| 25 | |
| 26 | bool checkTrue(bool AnswerLoopExit, unsigned AnswerLoopDepth, |
| 27 | const LoopAnalysisReport &Report, IRAccessHelper &IRAccess, |
| 28 | std::string FuncName, unsigned ArgIndex, |
| 29 | std::vector<int> Indices = {}) { |
| 30 | const auto *A = getArg(IRAccess, FuncName, ArgIndex); |
| 31 | if (!A) |
| 32 | return false; |
| 33 | |
| 34 | if (!Report.has(*A, Indices)) |
| 35 | return false; |
| 36 | |
| 37 | auto Result = Report.get(*A, Indices); |
| 38 | return Result.LoopExit == AnswerLoopExit && |
| 39 | Result.LoopDepth == AnswerLoopDepth; |
| 40 | } |
| 41 | |
| 42 | bool checkFalse(const LoopAnalysisReport &Report, IRAccessHelper &IRAccess, |
| 43 | std::string FuncName, unsigned ArgIndex, |