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

Method analyzeDirection

lib/propanalysis/DirectionAnalyzer.cpp:61–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61void DirectionAnalyzer::analyzeDirection(llvm::Argument &A) {
62
63 std::set<Value *> VisitedNodes;
64
65 ArgFlow &AF = getOrCreateArgFlow(A);
66
67 if (auto *T = A.getType()) {
68 if (!T->isPointerTy()) {
69 AF |= Dir_In;
70 return;
71 }
72 }
73
74 // DefUseChanins used as stack,
75 // StackFrame includes the value(Argument/Field) need to tracking,
76 // and ArgFlow for which analysis result will be updated.
77 std::stack<StackFrame> DefUseChains;
78 DefUseChains.emplace(&A, AF);
79
80 while (!DefUseChains.empty()) {
81 auto Frame = DefUseChains.top();
82 DefUseChains.pop();
83 handleStackFrame(Frame, DefUseChains, VisitedNodes);
84 }
85}
86
87void DirectionAnalyzer::handleStackFrame(StackFrame &Frame,
88 std::stack<StackFrame> &DefUseChains,

Callers

nothing calls this directly

Calls 3

emptyMethod · 0.80
popMethod · 0.80
getTypeMethod · 0.45

Tested by

no test coverage detected