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

Method updateFieldFlow

lib/propanalysis/LoopAnalyzer.cpp:210–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208}
209
210void LoopAnalyzer::updateFieldFlow(ArgFlow &AF, std::vector<int> Indices) {
211 auto &A = AF.getLLVMArg();
212 auto *T = A.getType();
213 while (isa<llvm::PointerType>(T))
214 T = T->getPointerElementType();
215
216 auto *ST = dyn_cast_or_null<llvm::StructType>(T);
217 if (!ST)
218 return;
219
220 for (unsigned S = 0; S < ST->getNumElements(); ++S) {
221 Indices.push_back(S);
222 if (!Report.has(A, Indices)) {
223 Indices.pop_back();
224 continue;
225 }
226
227 AF.setStruct(ST);
228 auto &FF = AF.getOrCreateFieldFlow(S);
229 auto Value = Report.get(A, Indices);
230 FF.LoopExit = Value.LoopExit;
231 FF.LoopDepth = Value.LoopDepth;
232 auto FI = FF.getFieldInfo();
233 updateFieldFlow(FF, Indices);
234 Indices.pop_back();
235 }
236}
237
238} // namespace ftg

Callers

nothing calls this directly

Calls 5

setStructMethod · 0.80
getFieldInfoMethod · 0.80
getTypeMethod · 0.45
hasMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected