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

Method computeConstant

lib/indcallsolver/CustomCVPPass.cpp:248–254  ·  view source on GitHub ↗

Compute a new lattice value for the given constant. The constant, after stripping any pointer casts, should be a Function. We ignore null pointers as an optimization, since calling these values is undefined behavior.

Source from the content-addressed store, hash-verified

246 /// pointers as an optimization, since calling these values is undefined
247 /// behavior.
248 CVPLatticeVal computeConstant(Constant *C) {
249 if (isa<ConstantPointerNull>(C))
250 return CVPLatticeVal(CVPLatticeVal::FunctionSet);
251 if (auto *F = dyn_cast<Function>(C->stripPointerCasts()))
252 return CVPLatticeVal({F});
253 return getOverdefinedVal();
254 }
255
256 /// Handle return instructions. The function's return state is the merge of
257 /// the returned value state and the function's return state.

Callers

nothing calls this directly

Calls 1

CVPLatticeValClass · 0.85

Tested by

no test coverage detected