MCPcopy Create free account
hub / github.com/Samsung/UTopia / checkTrue

Method checkTrue

tests/propanalysis/TestLoopAnalyzer.cpp:26–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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,

Callers

nothing calls this directly

Calls 2

hasMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected