MCPcopy Create free account
hub / github.com/AliveToolkit/alive2 / getStoreByteSize

Method getStoreByteSize

ir/memory.cpp:2268–2282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2266}
2267
2268unsigned Memory::getStoreByteSize(const Type &ty) {
2269 assert(bits_program_pointer != 0);
2270
2271 if (ty.isPtrType())
2272 return divide_up(bits_program_pointer, 8);
2273
2274 auto aty = ty.getAsAggregateType();
2275 if (aty && !isNonPtrVector(ty)) {
2276 unsigned sz = 0;
2277 for (unsigned i = 0, e = aty->numElementsConst(); i < e; ++i)
2278 sz += getStoreByteSize(aty->getChild(i));
2279 return sz;
2280 }
2281 return divide_up(ty.bits(), 8);
2282}
2283
2284void Memory::store(const StateValue &v, const Type &type, unsigned offset0,
2285 vector<pair<unsigned, expr>> &data) {

Callers

nothing calls this directly

Calls 6

divide_upFunction · 0.85
isNonPtrVectorFunction · 0.85
isPtrTypeMethod · 0.80
getAsAggregateTypeMethod · 0.80
numElementsConstMethod · 0.80
bitsMethod · 0.45

Tested by

no test coverage detected