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

Function pack_return

ir/instr.cpp:2557–2571  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2555}
2556
2557static StateValue
2558pack_return(State &s, Type &ty, StateValue &&val, const FnAttrs &attrs,
2559 const vector<pair<Value*, ParamAttrs>> &args) {
2560 if (auto agg = ty.getAsAggregateType()) {
2561 vector<StateValue> vs;
2562 for (unsigned i = 0, e = agg->numElementsConst(); i != e; ++i) {
2563 if (!agg->isPadding(i))
2564 vs.emplace_back(
2565 pack_return(s, agg->getChild(i), agg->extract(val, i), attrs, args));
2566 }
2567 return agg->aggregateVals(vs);
2568 }
2569
2570 return check_return_value(s, std::move(val), ty, attrs, args);
2571}
2572
2573StateValue FnCall::toSMT(State &s) const {
2574 if (approx)

Callers 1

toSMTMethod · 0.85

Calls 6

check_return_valueFunction · 0.85
getAsAggregateTypeMethod · 0.80
numElementsConstMethod · 0.80
isPaddingMethod · 0.80
aggregateValsMethod · 0.80
extractMethod · 0.45

Tested by

no test coverage detected